287 Commits

Author SHA1 Message Date
ultramage
e5a32cb5e7 Fixed a memleak that occurs when a player exits while waiting on a script select() or menu() (caused by r12481).
The change made the attached script not deallocate to avoid a crash when changing mapservers, however deallocation must occur here since scripts waiting for user input are unable to free themselves.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-24 12:19:34 +00:00
Inkfish
5485daa6df * NPC event code cleanups.
- removed the 'OnMyMobDead' dead code. It's never supported though documented.
- removed the 'feature' that events only trigger when the player is in the OnTouch area IF it's specified. 
  It's never documented and breaks official scripts.
- some cleanups and bug fixes to OnTouch_.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14173 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-26 12:01:19 +00:00
L0ne_W0lf
8d0be03e8a * Added battle_config.mob_slave_keep_target config option (monster.conf)
- When yes (default) MVP slaves will always keep their prior targets.
- When no the old behavior of switching to the closest target is enabled.
* Updated MAX_MOB_DB to 4000 (Monsters are starting to appear in the 2k ranges)
* Changed default respawn time (when 0) to 500 from 5000.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-03 01:39:45 +00:00
Inkfish
e8d9984582 * Cast time of Emergency Call is doubled if you master of High Jump.
* High Jump can't be used on PvP maps.
* Fixed a potential null pointer from last commit.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14106 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-27 14:46:42 +00:00
Inkfish
42987f61ad * Implemented the official version of 'OnTouch' named as 'OnTouch_'.(it can be defined in script_athena.conf)
* Adapted 'map_foreachinarea' to 'map_forsomeinarea' so that it allows you to specify the number of bl you wanna operate on.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-25 09:38:33 +00:00
Inkfish
395149b2b8 Fixed self skills affecting target unit when used within combo delay for Asura and Flying Kick. (bugreport:3495) (follow up to r13900)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14007 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-15 02:22:24 +00:00
zephyrus
6b710571ad - Optimization to instance system.
* Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid.
* Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name".
* Moved all instance features to separated files.
* Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h).
* Added recomendations for scripts commands by Saithis.
- Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-12 21:44:02 +00:00
zephyrus
86563064db - Fixed a bug cleaning instance variable on party when instance is destroy.
- Fixed a bug on Yuno Castle 2 and 3, not killing guardians.
- Moved battleground team leave on unit remove map to prevent a crash on multimap servers.
- Fixed a bug on checking range with the wrong target. Fix a crash on Item 2002 at refine >= 9.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-29 09:10:51 +00:00
Inkfish
4cafc71047 * Kaahi heals no matter if attack connects. (bugreport:2440)
* Fixed a typo causing skillitem always resets skill delay. (bugreport:3431)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13977 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-29 04:33:00 +00:00
ultramage
e54bf092d2 Fixed sql char deletion code using a broken pet deletion query (ran very slow, and had a typo in a binary shift operation) (bugreport:3304).
Fixed change r13774 to the code responsible for deciding whether to move 1 extra cell when stopping walking; it had its logic inverted by mistake (bugreport:3312).
Cleaned up the itemlist, cartlist and storagelist gm command code:
- fixed buffer overflows in all three functions (bugreport:456).
- merged all three atcommand functions into a single one; the appropriate behavior is detected from the command's name.
- using the StringBuf class instead of static-size buffers and string operations for more efficient and safe processing.
- using 'jname' (the one without underscores) as the primary item name in the list, and not using the aegis name for cards at all (since it's almost identical).
- fixed forged item details never being displayed due to a missing strcat().
- extended item info (crafted/named items, pet eggs) will now be displayed for storage and cart list as well.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13920 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-30 09:21:28 +00:00
Inkfish
5516002a5c * Implemented script command "autobonus". [Inkfish]
- "autobonus" is similar to "bonusautoscript", however it has a timer of its own.
- Updated itemdb changing items bonus using "bonusautoscript + sc_start" mode to "autobonus + bonus" mode.
- Remove bonusautoscript and status changes that was needed by bonusautoscript and is no longer in use.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-28 08:23:53 +00:00
zephyrus
33e1fbbd66 - Instancing System (Thanks to Sirius White who did most of the code, with some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao.
- Fixed a bug on areamobuseskill and changed it to make it as Aegis.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20 17:56:01 +00:00
Inkfish
e447a8a92a * Changed Asura Strike/Jump Kick to target skill to get rid of the "target delay". (bugreport:2174)
- skill tree will be re-sent on status change to handle using these two skills during combo.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13900 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20 08:22:52 +00:00
ultramage
7063f7330d Improving the r13888 crashfix to cover similar crash scenarios discovered:
Reordered code in status_change_end(SC_DANCING) so that an ensemble's skill unit group is deleted only after removing both performers' status changes.
Modified the call to skill_delunitgroup() IN status_change_end(SC_DANCING) so that it always processes the group's true owner and not others (bugreport:3253).
Replaced calls to skill_stop_dancing() with status_change_end(SC_DANCING), since it now provides identical functionality.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-15 14:00:27 +00:00
Inkfish
ea6005e4bf Oops, I messed up the condition on my last commit
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13845 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-05 08:40:26 +00:00
Inkfish
dc7f470790 * Fixed turning off a skill needed to meet the requirements. (bugreport:3175)
* Skills used through items not having aftercast delay or cast time now don't overwrite the former canact_tick. (topic:220921)
* Multiple autoscripts now can trigger at once.
* Applied a temp fix for autoscripts crashing server.(bugreport:3154)
* Implemented SC_JEXPBOOST (thanks to GMJobbie for the diff). (bugreport:3177)
* Implemented SC_IGNOREDEF. (topic:217330)
* SC_DEFRATIOATK won't affect boss monsters. (topic:217330)
* Fixed skip_teleport_lv1_menu made lv2 skip menu as well. (bugreport:3183)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-05 00:22:12 +00:00
Inkfish
e7faa7e498 * Some clean ups on autocast and itemskill code. (see topic:220921 for some info)
- Autocasted Teleport now skips the menu.
- Fixed nullpo info when defensive autocasts are triggered. (follow up to r13815)
- Fixed Warp portal used in item script never worked.
- Item skills now bypass skill delay check.
- Implemented SM_SELFPROVOKE. 
- Updated item db using 'itemskill' for some items.
* Basic skills will never be reset. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-03 15:30:11 +00:00
Inkfish
b14a11ff5e * skill_check_condition clean up (bugreport:2770, bugreport:2957, bugreport:3010)
- Weapon, SP, HP and state are checked at the beginning of cast.
- Required items and ammos are checked at the end of cast.
- SP and status change required are removed at the end of cast without checking again.
- Required items are removed only if the skill is successfully used.
- Autocasts won't check for requirements but will remove them if you have them(except for SP/HP).

Hope won't cause any problems...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13815 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-27 14:11:08 +00:00
Inkfish
45addf32f8 NPC_STOP now stops both sides and will be canceled if either side teleports or dies.(bugreport:3099)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13803 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-22 15:36:41 +00:00
Inkfish
5815851acf * The delay icon doesn't appear during casting now. (bugreport:3101)
* Status icon of ASPD potions doesn't overriding each other now.(bugreport:3095)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-22 13:24:16 +00:00
Inkfish
f3572b9e6d * Now fiberlocking a fiberlocked target doesn't renew the timer but instead increases its fireweakness [Inkfish]
- This makes doublecasting firebolts on a double fiberlocked target having double damage from both 2 bolts possible = =(bugreport:3061)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-20 12:42:06 +00:00
Inkfish
2b1109483f * Miracle should only be dispelled on map change.
* The "party invite" and "view equip" state messages are ought to be sent on every map change instead of login.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13793 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-19 10:06:05 +00:00
ultramage
34def63ece Cleaning/fixing the previous commits a bit
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13775 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15 11:41:40 +00:00
skotlex
418f0d9200 - Fixed a bunch of invalid memory access bugs as reported by Valgrind.
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is        passed. (bugreport:3078)
- Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state.
- Corrected a few compiler warnings
- Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly.



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15 10:27:05 +00:00
Inkfish
acdd90f4aa * Removed DEF reduction display when casting GrandCross.
- This might not be official and led to repeated calculation.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13758 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-12 11:30:48 +00:00
Inkfish
0595535167 * Fixed splash damage from Baphomet Card might miss. [Inkfish]
* Check if group unit is expired before processing it. (bugreport:3054) [Inkfish]
* Fixed Grand Corss outdated behavior (bugreport:1590) [Inkfish]
- use new damage formula
- DEF is reduced to 2/3 during cast time
- block shields switching within attack duration
- monsters don't damage themselves any more
- intervals between hits are 300ms

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13736 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-07 12:15:14 +00:00
Inkfish
f02ea5bfd1 * Block equipments switching for some skills (bugreport:2900)
- cannot change equipments during Arrow Vulcan's cast time
- cannot change equipments within Desperado's attack duration

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13724 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-03 10:20:13 +00:00
skotlex
a047b057df - Avoid setting the canwalk delay after being hit if the target is already unable to move.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-28 16:48:46 +00:00
Sara
71e1662e67 Fixed skill delay paw print icons showing for far too long.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13624 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-25 06:23:14 +00:00
Sara
9189eb2c15 Some fixes to my previous commit.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-24 09:10:30 +00:00
akrus
f706281b0e sorry for so many commits, have no time to test
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13617 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-24 08:34:24 +00:00
akrus
2f424ee87c Lol :x
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-24 08:32:12 +00:00
Sara
b3860fdc01 * Added support for new status change packet, uses new setting display_status_timers in client.conf.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-24 01:56:16 +00:00
zephyrus
ed5eee1dcb - Implemented new item and bonuses for Kreiger Von Midgard rewards.
* Execute script on skill (bonusautoscript3)
* Add effect on skill (bAddEffOnSkill)
* Execute skill on skill (bAutoSpellOnSkill)
- Fixed some boxes Rental time according to item descriptions.
- Implemented SC_ITEMSCRIPT, a status that gives you temporally the effect of an item. Check items 14597 to 14605 if you want to get the idea.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13596 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-18 02:50:39 +00:00
zephyrus
e9153a3c17 - Fixed item Nemesis.
- Fixed Tarot Card being used on Emperium.
- First Part of BattleGround Implementation (please wait).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-26 21:27:12 +00:00
zephyrus
d4c7aad803 - Implemented new Pet Bonus System. Enjoy!! :D
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 20:06:13 +00:00
FlavioJS
e3d5e89496 * Changed val4 of SC_BLADESTOP from a block_list pointer to an id. (64bit portability issue and potential dangling pointer crash)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-22 09:37:47 +00:00
ultramage
95d25086a6 Mobs with nonzero spawn time can now be cached as well, saving some more cpu/memory (bugreport:1197).
Fixed dynamic mobs being unloaded without stopping their respawn timer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13 10:38:54 +00:00
FlavioJS
cb8ef12df8 * Changes to the script engine:
- script ends when run_func can't find the buildin command. (script engine error)
- run_script_main doesn't change RERUNLINE to RUN automatically, the buildin command that set it is responsible for that now. The buildin command can use this to detect a rerun.
- created functions to alloc/free a script_state.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-30 03:27:46 +00:00
FlavioJS
72542d65cc * Hunted down the simpler 64bit pointer truncations.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13380 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22 15:44:17 +00:00
zephyrus
c830a56da3 - Item Rental System.
Script Usage:
- rentitem <itemid>,<seconds>;
- rentitem <itemname>,<seconds>;

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-16 16:14:30 +00:00
L0ne_W0lf
850cf0d038 * Rev. 13251 Removed 'casttime' adjustment from offensive ressurection. Follow up to r13225.
* Kaahi will now override override higher existing levels previously casted. (bugreport:2296)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-01 11:21:49 +00:00
L0ne_W0lf
80ddaaca35 Corrected Offensive Res using Turn Undead cast time. (bugreport:1704)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13225 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-21 13:03:29 +00:00
zephyrus
2513d01bee - Full implementation of mercenary skills.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13203 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-10 14:30:25 +00:00
L0ne_W0lf
331e0a0a15 Enabled WoE SE to be run independently of WoE. Let's see how long it is before something blows up, or Ultramage pulls out his hair while cursing my existence.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-09 17:33:10 +00:00
zephyrus
6a1de57730 - A proper mercenary lifetime calculation.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13165 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-31 22:56:05 +00:00
zephyrus
908c3d2e86 * More mercenary updates.
- Implemented Mercenary Die, Damage, Run Away when master dies.
- Log mercenary damage and gives exp to Master.
- Some little bugs.
* Fixed Bubble Gums effect works on mvp_sd not sd (according to Doddler).

NOTE: Now you can summon a mercenary, make it attack (not skills), follow you even on map change.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13158 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-31 18:37:00 +00:00
zephyrus
5df63da5e7 - Implemented Mercenary Scrolls (item_db)
- There are some little problems, like remaining time going to 0, but you can summon it, make it walk, follow you.
- Feel free to test it.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24 22:45:32 +00:00
zephyrus
c5cc2257d3 - Moving all content of Homunculus code to a proper file Homunculus.c/h
- Update of all project files.

NOTE: All functions on homunculus.c should be renamed i think, to remove all the merc_*.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13122 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24 15:00:26 +00:00
zephyrus
d650043597 - Implemented unit_calc_pos (copy from pet_calc_pos) to implement it on Mercenary/Homunculus and don't use x,y-1 always.
- Implemented Mercenary walk to master (same packet as Homunculus).
- Starting work on Stats but i will need lot of help.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24 13:33:36 +00:00