525 Commits

Author SHA1 Message Date
skotlex
f7535ef5a9 - Fixed a compile warning. Some minor format cleanups.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18 16:14:44 +00:00
skotlex
97b00a11ad - Added a proper check to make aggressive mobs never override homun targets regardless of distance.
- Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not.
- Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18 13:25:21 +00:00
skotlex
01e97262a9 - Should have fixed the Cart Termination damage code to be scaled correctly when you change the max cart weight. Thanks to The Ultra Mage for the error clarification.
- Implemented Grandcross weird property where if there's noone on the path it'll hit twice for the skill's reported damage, and when there is (or you cant knockback the target) it'll do a splash attack that hits twice for 500% to all affected targets. 
- Some cleaning of the combo code. TK Rankers will now get their combo-time extended each time they trigger a kick, enabling them to do "unlimited combos".
- Modified the autosave function to use a sweep across the player db instead of across connected clients. This will cause non-connected players (like autotraders) to also be saved on a regular interval, may help with possible data-loss from said characters on unclean shutdowns.
- Added function map_foreachpc
- Removed the code that forces aggressive mobs to go after a Homun instead of their master (no reason why there should be such a condition).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7721 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17 16:16:51 +00:00
DracoRPG
15dd140846 Orn's and Albator's Homunculus system, finally, YAY!!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17 00:15:33 +00:00
skotlex
b29fb98681 - Fixed mob.c compilation...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11 20:21:17 +00:00
skotlex
a6c3f3a1fc - Coded @reset.
- Reenabled @changesex
- Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem.
- Cleaned up code of @item
- Added define UNKNOWN_ITEM_ID (512 = apple)
- Added IT_* enumation item_Types to identify said data from items.
- Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified.
- Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check.
- Removed itemdb.c considering item ids above 20000 as invalid.
- Cleaned up script commands getitem and card-counting related ones. 
- Cleaned up a bit more pc_isequip


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11 16:32:37 +00:00
Lance
aa70823081 * [Fixed]
- Scripting system screwing up script position after mixing timers with menus. 
- NPC attached AI mobs display as alive when dead. 
- View data not updating after buildin_unitdeadsit. 
[Improved] 
- NPCE_LOADMAP to execute after all (area) objects are sent to the player. 
- Simplified scripting system. sd will now use pointer to the script state itself. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29 08:47:14 +00:00
skotlex
029be2fe93 - Fixed a compile warning in the login txt/sql server.
- Changed the mob drop rate adjust function to receive a signed int argument. Probably will fix those drops with 0% becoming 100%


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7371 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28 14:42:04 +00:00
Lance
219f26b6a0 * [Optimized]:
- Setting of variables with defined scope in some frequently executed script events.
* [Added]: 
- Missing script_require_trigger flags for some power hungry events.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-24 02:41:32 +00:00
skotlex
eea63beee9 - Updated BD_INTOABYSS's unit flag to not affect mobs.
- Changed setting for skill_nocast flag 16. It is no longer a "pk-mode map" setting, it's now a clone-forbidden skill. That is, skills with the flag 16 will never be copied by clones. If you use a PK-mode server, use flag 2 now to forbid skills from common maps.
- Default skills from not being cloned are Magnus Exorcism and Turn Undead.
- The map search free cell will now use the size of the map # of tries before giving up when the spawn area is the whole map. Added a check to inmediately give up when the number of spawn retries has reached the max specified (no_spawn_onplayer = 100).
- Cleaned up a bit the clone code to account for the unit flags UF_NOPC/UF_NOMOB when the skill is not ground-based (accounts for self skill that causes a ground-tile to be placed, like Dances).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7315 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23 15:41:17 +00:00
skotlex
aa47683c94 - Fixed the compile error in mob.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 13:38:17 +00:00
Lance
67ff295ba4 * [Removed]:
- Redundant mob name copying. (it's already copied in mob_parse_dataset)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 13:16:45 +00:00
skotlex
04d6132e76 - Moved back Soul Drain code from mob_dead to skill_counter_additional_effect. Now we are back to where the skill animation does not shows, but you DO get SP T.T' (fixing this is turning out so difficult...)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7253 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-19 16:10:19 +00:00
Lance
93aac53572 - Fix for #102547
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7235 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18 09:11:43 +00:00
Lance
61cf41923c * [Removed]:
- Large part of scripted mob control commands are removed.
- Large part of scripted player control commands are removed.
- Scripted mob slaves changing master ID.

[Added]: 
- Unit control commands.
- CALLBACK_NPCCLICK for scripted mobs, added this to db/const.txt too.
- Macro RECURSIVE_MASTER_CHECK in battle.c

[Modified]: 
- buildin_skilluseid and buildin_skillusepos -> buildin_unitskilluseid and buildin_unitskillusepos.
- md->callback_flag to short (double word).	[Lance]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7233 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18 02:42:41 +00:00
Lance
58b728cc4a * [Added]:
- buildin_checkcell, buildin_mobwarp, buildin_pcattack.
* [Improved]:  
- buildin_skilluseid and buildin_skillusepos to accept a few more arguments.
- mob_script_callback to return sucess value.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17 07:48:10 +00:00
skotlex
ece6f8f781 - Removed unused variable aspd_rate in map_session_data.
- Modified aspd_rate in status_data to hold aspd change on a base of 1000 = 100% rather than 100 = 100%. All status changes that affect aspd have been updated. Study and Single Action should now correctly give +0.5% aspd per level.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 19:49:28 +00:00
skotlex
b45cf7f99c - Whoops, fixed compilation issue on mob_dead.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7210 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 16:44:27 +00:00
skotlex
5ebc258ce8 - Removed db_tables.sql as it's no longer used.
- the mvp_sd is removed when the mob is the emperium and there's no killer/exp-awarded (assumed killed by script), this prevents the on-kill event from triggering and giving the castle to whoever damaged the most the emperium without destroying it.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7208 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 15:39:16 +00:00
Lance
d79df825cd - Removed return from CALLBACK_ASSIST
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7205 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 15:11:39 +00:00
Lance
68a5b7bea5 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7204 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-16 14:52:44 +00:00
Lance
397f255a23 * [Improved]:
- Cleaned up Custom Mob Script Callback codes. Looks much better now :B.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 14:42:16 +00:00
skotlex
55df062534 - Added structure party_data and party_member_data to the map server to hold party-specific required information about parties including Monk/TK/SG/SN states and party member count.
- party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10 03:58:15 +00:00
Lance
530767d5e1 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7045 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-08 13:49:31 +00:00
skotlex
a5ae39dd6c - Fixed the mob state not being set to Berserk/Angry correctly after the mob reaches the target's location.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 22:53:06 +00:00
skotlex
b6a5dc4547 - Added config setting mob_npc_warp, when set to yes, enables mobs to be warped between maps when stepping on a npc-warp.
- Added monster_ai setting &64, when enabled makes a mob run to any nearby npc-warp when their current target has switched maps.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 20:15:23 +00:00
skotlex
d7a3b4d7e4 - Added pc_calcexp to calculate individual exp bonuses acquired from exp's source (race bonus cards, SG Exp skills, pk-mode higher level exp)
- pc_gain_exp now also receives the source of the exp, when said source exists, bonuses are applicated as needed.
- Added status_kill when capturing a mob, should take care of the mob not respawning after caputed.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 18:57:21 +00:00
skotlex
200032c28b - Moved souldrain code from skill_counter_additional_effect to mob_dead. It should display the skill animation correctly now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 14:52:59 +00:00
skotlex
b8ebd2882b - Solved an ambiguous if in mob_dead.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 03:36:01 +00:00
Lance
dc71d18c29 * [Improved]:
- mob_dead not to remove script controlled monsters with player sprites. (can be removed later using removemob command, it can be resurrected too :D)
* [Added]:
- buildin_mobdeadsit :D 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 02:51:50 +00:00
Lance
f5b5288a32 * [Fixed]:
- temp++ gets issued before if(mvp_damage<(unsigned int)md->dmglog[i].dmg) in mob_damage. Thanks to seahorsix.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 02:03:22 +00:00
skotlex
5e249646fc - Some cleaning of mob_damage, added a default case when attacked to retaliate to whatever attacked the mob.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06 21:05:10 +00:00
skotlex
38aacdd553 - The monsters can level up setting will not take effect when the mob's level is LESS than their db counter-part (should prevent under-leveling causing underflows and semi-immortal mobs)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06 16:12:44 +00:00
skotlex
4f89660d1a - cleaned up status_check_skilluse some to use status_data variables.
- Fixed mvp-exp calculations being messed up with more than one attacker.
- Changed the mob exp race bonus so that each player gets their own bonus, rather than the killer's bonus applying to everyone.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-06 14:16:22 +00:00
skotlex
7847189eae - Fixed a crash when using SL_SMA and the "combo" ain't ready.
- Hopefully fixed changing a mob's class causing them to get all sort of stat bonuses due to the mobs-level-up setting.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6994 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05 23:01:06 +00:00
skotlex
90764dcab4 - Fog of Wall won't affect the caster now in any way.
- Added a missing status_calc_mob on mob_spawn_guardian_sub
- Added clif_fixpos packets before attacking for the first time to clear any position sync issues with the client.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05 18:35:41 +00:00
skotlex
00082797ae - Some cleaning of the mob slave ai.
- Moved MOB_SLAVEDISTANCE to mob.h
- NPC_CALLSLAVES now uses the slave-distance previously mentioned.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6940 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02 17:01:44 +00:00
skotlex
cb8cc2d8a7 - Moved setting a mob's level from mob_spawn to status_calc_mob, resetting their level on death has also been removed (as it is handled now on spawn)
- Fixed a bug in status_revive
- Updated Holy Cross, Investigate and Finger Offensive to be usable by all weapons.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02 16:27:21 +00:00
Lance
f86847888e git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6927 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-02 03:38:56 +00:00
Lance
2e4166cbfc [Fixed]
- Yet another compilation warning. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6924 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02 02:23:56 +00:00
skotlex
bbe820d3e3 - Corrected setting slaves_inherit_mode to not apply to morphosis skills.
- Added define OPTION_CART which holds the 5 cart option values.
- Corrected pc_setoption to invoke status_calc_pc when getting/removing the cart.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01 19:21:04 +00:00
skotlex
ff4b163da3 - Fixed slaves warping endlessly to their master when the master-slave distance exceeds 30.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6909 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01 15:03:48 +00:00
skotlex
459b2a672f - Some small cleanups on status_calc_pet
- Fixed one valgrind error report.
- Added back the Freeze/Petrify adjustments of -50%def and +25%mdef (when where these lost?)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6903 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01 00:23:27 +00:00
skotlex
2c4bcef25a - Corrected the mob_ai&2 setting triggering rude-attacked due to can't walk delay.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 21:21:44 +00:00
skotlex
a2f222eb46 - Updated attr_fix_table reading code to account for ELE_MAX (will correctly read bigger elemental tables if ELE_MAX is changed)
- Aggressive mobs will now use battle_check_range rather than mob_can_reach to decide whether to lock-on or not to a target within sight-range. 
- Added warnings in mob_readdb when the mob's element is invalid.
- Updated the corresponding entries in map.h to use ELE_MAX
- Added error messages in pc_bonus* functions when an invalid element is passed to the relevant bonuses.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 18:25:55 +00:00
skotlex
1d027c8db8 - Removed the on-die specific code from unit_remove_map and placed it on the corresponding *_dead functions. unit_remove_map should never assume the char died, it is just a "remove from map" function.
- Updated status_damage to handle the general death code (clearing status changes, clearing skill related data, sending death packet, etc). The return value from the *_dead functions will tell it what to do or not with the object (death aborted, clear it from map/memory, etc)
- Cleaned up pc_dead to take advantage of the fact that status changes are not ended until after the function.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 17:06:55 +00:00
Lance
9516734715 Added decending npc to slaves. Custom feature.. nothing much.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6849 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 15:39:02 +00:00
Lance
435f579918 [Fixed]
- Typo in mob_dead causing crash. Thanks to reddozen and his gang for testing.
- Compilation warnings

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 07:07:59 +00:00
skotlex
d3832b5146 - Fixed pc_gainexp resetting your exp to 0 rather than adding it in... -.-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29 20:20:42 +00:00
skotlex
048bd9bd8f - Added a division by zero check in mob_dead to prevent the (impossible) case where a mob dies with received damage of zero.
- Fixed compilation errors with SC_FLING...


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6821 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29 16:01:02 +00:00