528 Commits

Author SHA1 Message Date
skotlex
bec2797d52 - All GMs will be sent to the char server through packet 0x2aff now.
- Made mob_searchname compare versus sprite, name and jname now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6263 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 02:51:01 +00:00
skotlex
e8e49ec9be - Cleaned up @grind2
- Updated @monsterbig, @monstersmall to use the event 2 and 4 rather than the max_mob_db code check.
- Modified override_mobs_names to work only on the mob spawn files.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6252 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 17:46:16 +00:00
skotlex
9f19b5cfdc - Fixed skill_delayfix not altering delay at all after you reached 150.
- Applied ers to pet loot drops.
- Cleaned up the pet loot drop function.
- Mob skill state MSS_ANY won't include MSS_DEAD now.
- Added mob skill state MSS_ANYTARGET ("anytarget") which means any state (except dead) on which the mob has a target set.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 14:52:11 +00:00
skotlex
72faf33f97 - Added new column to mob_db Sprite_Name to hold the mob's sprite name. Columns Name and JName now hold the mob's english and kro names respectively.
- Currently both Name and Jname have the KRO names, so someone will have to update them.
- Updated mob_db.sql and mob_db2.sql to latest.
- Added battle_config option override_mob_names to make the spawned mob names use the mob_db names instead of the specified names in the spawn files.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6246 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 03:53:29 +00:00
skotlex
cb00c164f7 - Idle skills won't trigger while the mob is walking.
- Idle skills will now trigger each IDLE_SKILL_INTERVAL iterations (10 currently)
- Added support for walk packet 0x22c (disabled currently as it's non-walk packet equivalent is yet missing), it will be used when PACKETVER is set to 7 or above.
- Normal walking will now also trigger mob skills (due to the walk skill condition)
- Updated mob_skill_db: all idle and walk skills had their rate go up x10.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 02:45:17 +00:00
shinomori
1f3b70b776 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6239 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-04-23 10:58:04 +00:00
skotlex
c176a131f0 - Fixed the delete_timer (@summons, alchemist plants) not invoking unit_free, hence causing memory leaks and the like.
- Applied jA's patch to fix a bug in the scripting engine in regards to priority of operators. Thanks to End of Exam for the information.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6161 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18 17:07:16 +00:00
skotlex
3a2c267be6 - Added state.running to unit_data to make it easier to check for running characters (saves having to get the sc data and check for the corresponding timer all the time)
- removed pc_run, pc_walktodir, replaced with unit_run. 
- moved the code that makes you walk that extra cell to unit_stop_walking, which is now invoked before resetting the walk-target.
- Flag &2 in unit_stop_walking is now to make the character force-move that extra tile if the walkpath pos is 0 at hit time.
- Added variable walk_count to unit_data to be use as a counter for cells walked for walk-triggered skills (walk path_pos is not good enough since it keeps resetting each time the walk path is updated)
- Increased WALK_SKILL_INTERVAL to 5 (it is the closest value that makes the average mob trigger a chase skill every second)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6137 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17 18:12:06 +00:00
skotlex
0a5c14f801 - Changed slave chasing from using unit_walktobl to map_search_freecell + unit_walktoxy, since the previous behaviour makes all slaves always end up on the same cell.
- Changed some function declarations to take x,y arguments as short rather than int.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 00:45:55 +00:00
skotlex
503a7759d0 - Added cast time to pick stone of 3 secs and 500ms delay
- Removed area of effect of Assumptio.
- Added "can't act" delay update when an auto-spell triggers.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 19:49:26 +00:00
skotlex
d29c6d8a27 - Simplified the mob-drops structure by using a single timer with a linked list of drops instead of separate timers for each drop.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 16:32:34 +00:00
skotlex
6676a74acd - Removed the piece of code that "guesses" that job classes between 24 and 68 are advanced classes from mob_avail reading since they conflict with NJ/GS. Use the correct class numbers from now on!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 02:28:43 +00:00
skotlex
c8ad3fbc64 - Fixed Looted items always dropping in quantities of 1.
- Removed the check that deletes Magnus Exorcism cells after they hit once.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 14:01:04 +00:00
skotlex
42c6f89d86 - Multiple optimizations to the unit_data auto-chase upgrade, also simplified the mob and pet ai routines.
- Simplified the walk routines to half the number of timers required for walking.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 04:10:41 +00:00
skotlex
e68983a063 - Fixes to the unit_data update that lets characters auto-chase while attacking.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5980 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 00:27:15 +00:00
skotlex
418c98ea0a - Modified the unit_data structure to handle automatically switching between chasing and attacking a character. Note that it's a work in progress and not yet properly tested/finished...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-10 21:38:05 +00:00
skotlex
3954b070de - Modified @warp/@rura to prevent causing pc_setpos position error messages.
- Fixed the mob's last_thinktime not being updated on mob_spawn, causing them to not "think".


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 22:13:25 +00:00
skotlex
3851b1299d - Fixed @npcmove not sending the correct packets to make the moving refresh client-side.
- Fixed mobs with aggressive + looter mode never looting.
- skill_wall_check now also checks for pits so that skill effects don't go through them.
- Now you can't leave/be-kicked from a guild inside guild castles.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 18:11:32 +00:00
skotlex
0ed5d38cdd - Small code cleanups. One should lower a bit function overhead when using mob_ai&32
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5967 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 16:33:11 +00:00
skotlex
b810c3cefb - Mob_ai update. The attacked checks will trigger even if the mob can't move. Being attacked while the mob can't move no longer will trigger rude-attacked skills.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5964 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 06:14:40 +00:00
skotlex
07c8dd3902 - Fixed @movenpc
- Cleaned up and improved the lootsearch routine to pick nearest item.
- Added INVISIBLE_CLASS to the list of classes supported by npc_get_viewdata
- Fixed trying to set the view_data for npcs who are located on a map, but have no visual data.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 17:56:31 +00:00
skotlex
8f20e263b2 - Added function status_change_init to initialize all the sc timers. Added sc_data initialization to the npc structures who were missing them.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5953 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 06:48:16 +00:00
skotlex
38bd5b5675 - Likely fixed a mob not returning to their original class view on respawn after they changed class.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5952 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 06:25:50 +00:00
skotlex
3b5c9e1f78 - Moved the devotion damage reduction to the block that only executes if flag is zero in battle_damage.
- skill_castcancel won't trigger on battle_damage when the passed flag is 1
- The flag in battle_heal is now used to determine whether Berserk blocks the healing or not.
- Moved the Fusion HP penalty to battle_calc_weapon_attack
- Some cleaning to use battle_heal/damage rather than pc_heal/damage where appropiate.
- cleaned up the deadly-poison hp reduction code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5949 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07 20:23:52 +00:00
skotlex
57ef599e9e - Corrected the Soul Drain formula, thanks to Haplo for pointing it out.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5932 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-06 17:38:17 +00:00
skotlex
85ac518297 - Changed the random warping of mobs with no players from mob_spawn to unit_warp, which prevents MSC_SPAWN from being retriggered for already spawned mobs.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5928 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-06 16:16:52 +00:00
skotlex
8980b04387 - Modified Rude-Attacked behaviour so that such skills only triggers when the rude-attacked count is greater than 3.
- Added config setting slaves_inherit_mode to determine whether slaves take on their master's aggressive/passive status (defaults to yes)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 18:43:19 +00:00
skotlex
cabad21166 - Cleaned up (fixed?) a possible overflow in pc_isUseitem, thanks to foobar.
- When you have the wrong ammo-type equipped the skill-failed message is now "skill can't be used with this weapon", which is less misleading than "please equip arrows first".
- Corrected pet-equipment display (I originally assumed they went in the shield view-position, when they actually go in the head-bottom position).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5883 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 14:13:13 +00:00
skotlex
b5203bb220 - Added a missing memset on ers_alloc'ing mob loot which was making data from looted items fill in normal drop info.
- Some more work on the display of Brandish Spear...


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-02 17:09:16 +00:00
skotlex
86cebfbf10 - Fixes to the mob_ai routines. Prevent casting rude-attacked skills in situations that shouldn't be considered as so. Fixed mobs failing to chase after enemies when range-attacked out of their view_range.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5848 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 19:07:58 +00:00
skotlex
e9c44b50c8 - Added structure view_data to handle sprite information for all characters (equipment, weapons, hair, dyes, etc). Unified a bunch of clif functions now that you only need to handle the view_data (so instead of clif_spawn[pc/mob/npc/pet] you just have clif_spawn)
- Fixed the clif_change_class packet (it should check for non players classes, not a class above MAX_PC_CLASS), it fixes morphing enemies.
- Rewrote the way cloth dye packets are resent to optimize bandwidth usage.
- Fixed the npc_item_flag thing (enable_items/disable_items script command)
- Rewrote the disguise implementation to be bandwidth friendly.
- Modified the hide options to change your class to INVISIBLE_CLASS, since such classes don't even get their view packets sent around.
- Rewrote several clif functions to adapt to the new view_data class;
- Added class 139 to npcdb_checkid which was required by some npcs in the swordman quest? o.O


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 02:23:56 +00:00
skotlex
39d33a2f80 - the auth function in login.c won't jstrescapecpy passwords that were encrypted.
- Moved the Endure and Gravitation sc ends to battle_damage from pc_damage.
- Endure level 11 and above are now considered infinite-endure.
- Set the minimum pet hungry delay to 10
- modified function skill_delayfix to only receive skill/lv, actual time is now always acquired from skill_get_delay. It also now will never return a value below min_skill_delay_limit.
- Modified brandish spear so you won't see the skill-animation for every targetted mob. Also cleaned it up to use map_foreachincell calls.
- splitted skill_cast_fix into skill_cast_fix and skill_cast_fix_sc, the first does cast adjustments based on dex and server settings, the later only based on sc changes. Mobs use the later while everyone else use the former (which invokes the later when appropiate)
- Added the Steel Body icon to auto-berserk.
- Now you can't cast auto-counter while the previous one is active.
- For the duration of Berserk, infinite-endure is activated.
- Added Veider's suggestion to do a hack-report when players request the name of an invisible/cloaked character.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30 15:50:54 +00:00
skotlex
e94e165db7 - Applied a fix to not do xs/ys checks on npc_doevent when the npc is not on a map.
- You can't return to egg a pet that has run away now.
- Added ers support to the delayed mob drops.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5800 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29 16:59:08 +00:00
skotlex
b286e0af1e - Some cleaning of the mob_ai. Mobs should stop chasing once you are beyond their min_chase range. Improved rude-attacked checking when mobs can't move.
- range3 is now used as min-chase value of mobs.
- Added a debug message when status_change_timer fails.
- Fixed tick direct modifications increasing duration instead of decreasing it.
- Fixed inf2 of Jump-Kick to make it a "combo-skill" so that it may do a BCT_ENEMY check.
- When sd->state.skill_flag is set, auto-targetting through combo-skills is disabled. 
- You can't SG_FEEL maps already memorized.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5796 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29 14:53:22 +00:00
skotlex
15092b4955 - Fixed summon mobs being able to cast "summon" skills.
- Summoned mobs will inherit the size and ai properties of the master.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5790 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28 15:49:36 +00:00
skotlex
b258d0485e - Another mob_summon fix. Slave summoning SHOULD be working now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5735 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 18:52:41 +00:00
skotlex
88541a357c - Fixed skillidx not being set whenever a mob uses a skill.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 18:46:47 +00:00
skotlex
77e57852cc - Added function map_search_freecell to locate an available cell around an area (for recall/warping skills)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 18:20:55 +00:00
skotlex
b6ff4970fa - Changed Preserve's cost to 30sp
- Fixed Arrow Shower, UNT_MAGIC_SKILLS was renamed to UNT_ATTACK_SKILLS
- Fixed skill_use_pos checking target tile CELL_CHKNOPASS as invalid instead of CELL_CHKNOREACH


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5708 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23 01:56:52 +00:00
skotlex
7a8371273a - Merged the unit_data structure from jA for handling unit-related data (attack times, walking, auto-attack timers, skill related data)
- Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable"
- Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type
- Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it.
- Cleaned up/rewrite of the pet ai, same for pet_calc_pos
- Implemented use of mob variable attacked_players as it is used on jA
- Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs.
- Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22 23:58:16 +00:00
skotlex
ee1080a99f - Added monster_ai&16 setting for executing the hard ai on ALL mobs in maps with players instead of just mobs in the vecinity of players.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5687 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-20 21:41:06 +00:00
Lance
6ef4e75bb4 * Recoded getmobdata script function. Fixed mob_damage typo sd -> mvp_sd. Cleanep up confusing indentation in clif.c.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-19 04:36:53 +00:00
Lance
e804a51220 * Fixed misleading and inaccurately documented events and added a missing flag.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5649 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 16:47:21 +00:00
Lance
d192fad9a4 * Another compiler warning...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 06:45:58 +00:00
Lance
d5cf7d95e0 * mob_chat_sub fix. Added buildin_pcblockmove.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5628 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 16:08:01 +00:00
Lance
46bdee18f9 * BL_PC and BL_MOB control script commands (experimental).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5627 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 15:39:49 +00:00
skotlex
7571250c04 - Fixed mob random walk interval being set to up to 6K seconds in some instances.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 02:17:48 +00:00
skotlex
8e1ec0bf39 - Removed the hardcoded duration of 30seconds for sleep.
- Fixed rangecheck for pet skill usage of INF_SELF_SKILL
- Removed inall/exall from atcommand.conf since those two do not exist! (pointed out by Ancyker)
- @me now uses entry 270 in msg_athena as output format.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-15 18:33:32 +00:00
skotlex
b9b10700aa - Added battle config options item_rate_adddrop, item_drop_add_min and item_drop_add_max to control drop rate of card-acquired loot bonuses.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5610 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-15 14:58:04 +00:00
skotlex
c22cfd5ae8 - Fixed WZ_WATERBALL + HW_MAGICPOWER
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5601 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-14 19:30:42 +00:00