922 Commits

Author SHA1 Message Date
ai4rei
f964fb6ec2 * Random script engine clean-ups that have accumulated over time.
- Resolved unnecessary script_getnum re-evaluation in a loop in script command 'npcshopdelitem' (since r7120).
- Script commands 'menu', 'select' and 'prompt' now warn, when there are more menu options, than the client can handle correctly (TODO from r10316).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14597 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-17 12:40:38 +00:00
ai4rei
ddca23e35d * Corrected type of second argument of script command 'setbattleflag' from string to number (bugreport:4640, topic:261833, since r5407, related r14577).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14593 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-15 23:50:42 +00:00
ai4rei
e7fec551b1 * Removed disabled backup of script command 'isequipped' (since r1605).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 18:06:14 +00:00
ai4rei
edfc3293e5 * Made script engine's DEBUG_DISASM block use script_op2name, rather than hardcoding operator names as per TODO from r13083 (related r9569, follow up to r10667).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 16:09:18 +00:00
ai4rei
6a0558d0c2 * Fixed impossible condition in soundeffect script command (since athena-dev-2.1.1-mod1046, related r5841).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 13:48:14 +00:00
ai4rei
adc89d50f4 * Updates to the playBGM functionality (since r14335).
- Removed impossible condition in playBGM script command (from soundeffect).
- Removed unused code (retrieving of a bl) in playBGMall (from soundeffectall).
- Made playBGMall default to 'entire server' when both map name and coordinates are omitted instead of printing an error.
- Updated documentation for playBGM and playBGMall to match actual behavior.
- Removed unused parameter 'bl' in clif_playBGM.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14582 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 13:10:08 +00:00
ai4rei
6aabf7c260 * Fixed script command setd always assuming value parameter to be a string, which causes hexadecimal and octal numbers not being handled properly (topic:261833, followup to r14577 and r14578).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 01:38:41 +00:00
brianluau
8c9202976a - Fixed argument declaration of 'setd' (topic:261833, related r14573).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14578 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12 00:12:10 +00:00
ai4rei
6a684a566b * Added support for checking argument data type of built-in script functions (bugreport:1701, topic:261833, related r14573).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14577 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 21:52:27 +00:00
ai4rei
806daea231 * Replaced buildin_getpartyname_sub, buildin_getguildname_sub and buildin_getguildmaster_sub, which create only unnecessary overhead, with equivalent inlined code.
- Fixed a memory leak in getguildmasterid, when the guild leader was not online (bugreport:2743).
- Command getguildmasterid no longer requires the guild leader to be online.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14575 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11 01:23:38 +00:00
ai4rei
e560ba458b * Revised argument declaration of all script commands according to the actual functions' argument usage.
- Fixed many script commands with fixed amount of optional parameters to no longer accept any amount of arguments (faulty declaration).
- Corrected use of dummy parameter for guildopenstorage in scripts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-10 22:29:12 +00:00
ai4rei
e26ea94a2f * Reverted r14563, due to multiple issues which render the source malfunctioning or uncompilable. To be redone later (bugreport:4627).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07 19:45:24 +00:00
Paradox924X
ca53ef6f4a Changed almost all instances of sprintf() to snprintf().
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07 18:38:03 +00:00
ai4rei
c8cae9e659 * Removed clif_weather_sub and clif_misceffect2 in favor of clif_specialeffect_single and clif_specialeffect (all of them are ZC_NOTIFY_EFFECT2).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14541 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02 12:08:44 +00:00
ai4rei
72c5290837 * Fixed script command getusers causing 'player not attached' errors when asking for character count in entire server (bugreport:4591, since r14495).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-30 06:49:51 +00:00
ai4rei
b870941ee0 * Insignificant code tweaks: removal of excess function declarations and self assignments.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14520 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-29 11:28:13 +00:00
ai4rei
93e376eac5 * Added emotion_type enumeration for clif_emotion constants.
- Made clif_parse_Emotion use clif_emotion, rather than having it's code inlined.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28 22:43:10 +00:00
ai4rei
5d1bbf6c2a * Added clr_type enumeration for vanish effect constants.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14517 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28 21:41:38 +00:00
ai4rei
a5326bd2b6 * Fixed a crash uncovered with r14501, caused by outdated local variables when a script is about to suspend or terminate (bugreport:4577).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14511 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28 02:02:30 +00:00
ai4rei
db5357a6e0 * Fixed script commands attachrid and detachrid not updating the attached character's information about currently running script, causing errors with dialog-based scripts or preventing characters from walking (bugreport:4571).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-25 15:44:44 +00:00
ai4rei
f4cf08b311 * Fixed script command getusers causing map server to crash when called with type 0 without attached character (bugreport:4565).
- Lack of character is now reported like other script commands do. Additionally invalid types are reported as well.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14495 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-23 15:11:22 +00:00
ai4rei
1b9c1fc3d1 * Added script command pushpc, which is required by newer scripts.
- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14492 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-23 09:26:00 +00:00
ai4rei
c0d9aa1c02 * Made script command getmapxy print a warning, if an invalid type is supplied (related r69, r8459).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14470 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-20 00:44:46 +00:00
Paradox924X
53e81e1369 Applied patch by xazax to clean up various bits of code across mapserver code. (bugreport:4512)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14438 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02 04:24:46 +00:00
Gepard
123a803ccb * Removed unused 'indoors' mapflag (follow-up to r3729).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14434 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-21 00:38:57 +00:00
Paradox924X
ef4055a3b7 Applied Ai4rei's patch to prevent an invalid rid from being attached to the execution of a script. (bugreport:4470)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14424 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-11 04:01:42 +00:00
L0ne_W0lf
aa9990ec16 * instance_npcname will now error if the NPC being looked up is not found, care of ramsey.
* delitem/2 will now send the close button when failing to find all neccecary items to delete.
- Still do to, items should not be deleted as-found, and should be deleted once counted
and in the event of delitem failure, nothing should be consumed. This is a design flaw
in eathena, and should be fixed as soon as possible.
* Implemented the Endless Tower instance.
* Updated announces and dialogs in KVM.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14395 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-26 22:47:28 +00:00
L0ne_W0lf
c7531e095a * Follow up to r14383, changed use of clif_font_area to clif_font, seems Skotlex forgot them.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19 17:24:27 +00:00
Skotlex
e19451d423 - Implemented usage of packets 0x7fa and 0x7f7, 0x7f8, 0x7f9. These are used for proper deletion of items as well as movement/spawn packets for Renewal clients.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19 15:46:55 +00:00
L0ne_W0lf
6085d04bc5 * Follow up to r14357. Moved where sd is checked for existance in specialeffect2.
* Fixed Bubble Gum again. (200 = +100%, 300 = +200%, etc.)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-29 02:12:26 +00:00
L0ne_W0lf
829ff8eca9 * Updated specialeffect2 to accept player names. (follow up to r14353)
* Bascilica now allows boss-flagged monsters to knock you back as per official.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14357 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-28 16:54:21 +00:00
L0ne_W0lf
e7e55d4e06 * Added support for NPC names in the 'specialeffect' script command, go go copy/paste!
* Updated several NPCs to use the updated specialeffect command, updated more NPCs to use the updated emotion command.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-22 22:09:11 +00:00
Gepard
68f73aad02 Added support for NPC/PC names in 'emotion' script command. (topic:249193)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-18 01:32:01 +00:00
Yommy
fccc67c6be * Added support for packet 0x7fe which changes the bgm temporarily for a single player.
* Added 2 script commands, playBGM and playBGMall, documented use in doc/script_commands.txt

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14335 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-09 19:57:53 +00:00
Paradox924X
6a72859405 Fixed a few typos from r14322.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14323 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-01 03:20:25 +00:00
Paradox924X
00a2a3283e Added support for using 'town', 'autotrade', 'allowks', 'monster_noteleport', 'pvp_nocalcrank' and 'battleground' mapflags in scripts (bugreport:4226).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14322 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-01 03:08:13 +00:00
L0ne_W0lf
7af6738f52 Added a pc_isdead check to warpparty. Only warp and mapwarp (moveto, warpallpcinthemap, and warpwaitingpc aegis script equivilents) should revive players when placing them on new maps.
Updated F_CashPartyCall to use warpparty. Renamed original function to F_CashPartyCall2 and commented out.
Fixed an error in the monster race npcs calling a nonexistant OnEnable.
Renamed 'Tabb' in the 13.1 Draco egg daily quest to 'Taab'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14313 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-05-29 17:37:57 +00:00
Paradox924X
336865596c Rewrote/optimized script command warpparty.
Added support for an optional extra parameter "from_mapname" to restrict effect of warpparty to only those on a specific map.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14311 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-05-29 07:53:42 +00:00
brianluau
2dbc188909 - Fixed the Juice Maker's "As many as I can" option. (bugreport:4155)
- Removed a duplicate 'next' in Kiel Hyre Quest. (bugreport:4222)
- Fixed 'checkequipedcard' not counter-checking for signed items. (bugreport:4231)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14294 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-05-10 00:53:22 +00:00
brianluau
f5c3f4fe86 - Fixed a typo in guildrelay.txt (bugreport:4213)
- Forced acc.lastlogin to use MySQL DATETIME format. (bugreport:4193)
- Fixed the range of getiteminfo and setiteminfo. (bugreport:4190)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-30 00:22:22 +00:00
Inkfish
0ac0fa1705 Fixed FailedRemoveCards still removing Armor Enchant (followed up to r14282)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14283 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-16 10:59:28 +00:00
Inkfish
b3a056acf2 Fixed SuccessRemoveCards removing Armor Enchant. (bugreport:4014)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-12 10:24:32 +00:00
brianluau
ede4a79e1e - Updated 'getinventorylist' to also return expire_time in the array @inventorylist_expire[]. (topic:243292)
- Updated SQL item/mob databases to latest.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-31 00:12:31 +00:00
Inkfish
27801bb67f 2010/02/06
* Added official packet to display received expirience. (info provided by papkil)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-06 05:08:37 +00:00
Inkfish
69bd8dced5 * Autobonus code cleanups.
- removed the 'script_parsed' flag to fix the issues with combo items.
- introduced a global cache for autobonus scripts so that we don't have to parse scripts everytime invoking status_calc_bl.
- fixed such script commands as 'getrefine()' not working inside autobonus scripts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-02 10:30:10 +00:00
Paradox924X
10c788b2da Fixed strnpcinfo(1) returning blank strings when NPC names did not have a hidden portion of the display name. (bugreport:3758)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14170 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-26 00:22:28 +00:00
ultramage
ada5a13abe Fixed instances not initializing after reloadscript (bugreport:3522).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-24 17:15:23 +00:00
skotlex
c92ff591f1 - Applied the renewal client support patch from Diablo (eA forum topic 222623)
- Added support for strcharinfo(3) to retrieve the player's map
- Added script command "searchitem" for name item searches.
- Moved PACKETVER to src/common/mmo.h as it's needed by the char-server now
- Changed the status valX from int to long so that it won't break for pointer-storage in other architectures.
- Moved the change party leader code to party.c
- A few bugfixes or packet field completions based on my past experience messing around with my server.



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-19 18:19:09 +00:00
Inkfish
3acf4d6c67 * Fixed possible memory leaks caused by invalid parameters of autobonus
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14130 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-07 15:39:10 +00:00
Inkfish
1d4c819268 Added a flag to indicate if the script of an autobonus was parsed for the sake of resource saving.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14129 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-07 15:29:24 +00:00