summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-31 09:22:25 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-31 09:22:25 +0000
commitb81e57a9a349e06fba2ad56757ea3d08b01db586 (patch)
tree2d6aa14044c6719b8b204bbb4e8069e8b94417e2 /doc
parent794453043edb43f3d5d756c9793e704003df85cc (diff)
downloadhercules-b81e57a9a349e06fba2ad56757ea3d08b01db586.tar.gz
hercules-b81e57a9a349e06fba2ad56757ea3d08b01db586.tar.bz2
hercules-b81e57a9a349e06fba2ad56757ea3d08b01db586.tar.xz
hercules-b81e57a9a349e06fba2ad56757ea3d08b01db586.zip
- Updated getitem and guardian entries in script_commands.txt.
- Fixed getitem trying to get <character ID> from the wrong argument. - Now getitem can be run on scripts without a player attached if <character ID> is specified. - Now the two last arguments of guardian are optional and independant of each other ("<event label>" and <guardian index>). This way the previous implementation and script_commands definition are still valid code. - Now buildin function names and argument definitions are checked for validity before adding the function to the script engine. Argument definitions follow the pattern: (v|s|i|l)*\?*\*? v - value (string or int) s - string i - int l - label ? - one optional parameter * - unknown number of optional parameters git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9599 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt33
1 files changed, 17 insertions, 16 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index bb3438ef1..d7483b1c0 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -9,7 +9,7 @@
//= Maeki Rika - A section on general concepts and lots of
//= other updates and additions.
//===== Version ===========================================
-//= 2.8a
+//= 2.9
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@@ -37,6 +37,7 @@
//= 2.8 - Deleted a copy of the nude command. Added axtoi command (needing a clearer
//= explanation of atoi.Gave a better explanation of OnLabels and modified
//= monster explanation due that L_Label isn't working with monster.
+//= 2.9.20061230 - Updated getitem and guardian [FlavioJS]
//===== Compatible With ===================================
//= LOL, can be used by anyone hopefully
//===== Description =======================================
@@ -1663,16 +1664,16 @@ Example 6: Using complex conditions.
*getitem <item id>,<amount>{,<character ID>};
*getitem "<item name>",<amount>{,<character ID>};
-This command will give a specific amount of specified items to the invoking
-character. If an optional character ID is specified, and that character is
-currently online, items will be created in their inventory instead. If they are
-not online, nothing will happen.
+This command will give a specific amount of specified items to the target
+character. If the character is not online, nothing will happen.
+If <character ID> is not specified, items will be created in the invoking
+character inventory instead.
-In the first and most commonly used version of this command, tems are referred
-to by their database ID number found inside 'db/item_db.txt'.
+In the first and most commonly used version of this command, items are
+referred to by their database ID number found inside 'db/item_db.txt'.
- getitem 502,10 // The person will recieve 10 apples
- getitem 617,1 // The person will recieve 1 Old Violet Box
+ getitem 502,10 // The person will receive 10 apples
+ getitem 617,1 // The person will receive 1 Old Violet Box
Giving an item ID of -1 will give a specified number of random items from the
list of those that fall out of Old Blue Box. Unlike in all other cases, these
@@ -1687,19 +1688,19 @@ Giving an item ID of -4 will produce the effects of Gift Box.
Giving an item ID of -5 will produce the effects of Worn Out Scroll, which, in
current SVN, drops only Jellopies anyway.
-Calling this command with a negative item ID to create a random item will create
-an entry in the log file for those if such logging is enabled.
+This transaction is logged if the log script generated transactions option is
+enabled.
-You may also create an item by it's name in the 'english name' field in the item
-database:
+You may also create an item by it's name in the 'english name' field in the
+item database:
getitem "RED_POTION",10;
Which will do what you'd expect. If it can't find that name in the database,
apples will be created anyway. It is often a VERY GOOD IDEA to use it like this.
-This used in pretty much all NPC scripts that have to do with items and quite a
-few item scripts. For more examples check just about any official script.
+This is used in pretty much all NPC scripts that have to do with items and
+quite a few item scripts. For more examples check just about any official script.
---------------------------------------
@@ -4306,7 +4307,7 @@ per 'db/mob_db.txt'. Type is the kind of information returned. Valid types are:
---------------------------------------
-*guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"};
+*guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"}{,<guardian index>};
This command is roughly equivalent to 'monster', but is meant to be used with
castle guardian monsters and will only work with them. It will set the guardian