summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-11 04:02:48 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-11 04:02:48 +0000
commit646a036e453c9b4693ca0202b66e7d07dd6e26d5 (patch)
treedde95ae552d744fe5840502ebf02bfeaa2b26d89 /doc/script_commands.txt
parent9288b397b39c214b268f17769f2203657928b815 (diff)
downloadhercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.gz
hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.bz2
hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.tar.xz
hercules-646a036e453c9b4693ca0202b66e7d07dd6e26d5.zip
* Updated script_commands.txt
* Made scripts terminate with an error: (fixes bugreport:2429) - when getitem/getitem2 tries to delete more items than the player has - when trying to set Zeny to a negative number. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13368 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 886a2b6b3..aaed3637c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4,7 +4,7 @@
//= A reference manual for the eAthena scripting language.
//= Commands are sorted depending on their functionality.
//===== Version ===========================================
-//= 3.23.20080909
+//= 3.34.20081111
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@@ -124,6 +124,8 @@
//= Adjusted the 'getequipname' description to match src [ultramage]
//= 3.23.20080909
//= Added WoE SE related commands. [L0ne_W0lf]
+//= 3.34.20081111
+//= Changed the error behaviour of delitem/delitem2/Zeny. [FlavioJS]
//=========================================================
This document is a reference manual for all the scripting commands and functions
@@ -631,6 +633,7 @@ not certain whether this will work for all of them. Whenever there is a command
or a function to set something, it's usually preferable to use that instead. The
notable exception is Zeny, which you can and often will address directly -
setting it will make the character own this number of zeny.
+If you try to set Zeny to a negative number, the script will be terminated with an error.
Strings
-------
@@ -3872,7 +3875,7 @@ If the map name is given as "this", the map the invoking character is on will be
*delitem <item id>,<amount>{,<account ID>};
*delitem "<item name>",<amount>{,<account ID>};
-This command will take a specified amount of items from the invoking character.
+This command will take a specified amount of items from the invoking/target character.
As all the item commands, this one uses the ID of the item found inside
'db/item_db.txt'. The items are destroyed - there is no way an NPC can simply
own items and have an inventory of them, other as by destroying and recreating
@@ -3881,10 +3884,9 @@ them when needed.
delitem 502,10 // The person will lose 10 apples
delitem 617,1 // The person will lose 1 Old Violet Box
-It is always a good idea to to check if the player actually has the item before
-you take it from them, Otherwise, you could try to delete items which the
-players don't actually have, which won't fail and won't give an error message,
-but might open up ways to exploit your script.
+It is always a good idea to check if the player actually has the items before you delete them.
+If you try to delete more items that the player has, the player will lose the ones he/she has
+and the script will be terminated with an error.
Like 'getitem' this command will also accept an 'english name' field from the
database. If the name is not found, nothing will be deleted.
@@ -3894,7 +3896,7 @@ database. If the name is not found, nothing will be deleted.
*delitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
*delitem2 "<Item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
-This command will take a specified amount of items from the invoking character.
+This command will take a specified amount of items from the invoking/target character.
Check 'getitem2' to understand its expanded parameters.
---------------------------------------