From a7c1a55bb6f3c3236ba02722e948a52c645a4918 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Sun, 15 May 2011 05:30:25 +0000 Subject: * Merged changes from trunk [14784:14819/trunk]. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14821 54d463be-8e91-2dee-dedb-b68131a5f0ec --- doc/script_commands.txt | 124 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 40 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index f9d5c0059..a8f3fb63c 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.39.20110322 +//= 3.42.20110508 //========================================================= //= 1.0 - First release, filled will as much info as I could //= remember or figure out, most likely there are errors, @@ -168,6 +168,12 @@ //= Documented optional parameter 'npc name' of 'waitingroom2bg' command. //= 3.40.20110404 //= Updated description of 'waitingroom' command to include required zeny/lvl. [Kisuka] +//= 3.41.20110427 +//= Updated description of 'itemheal' primarily to remove overhead and lies +//= about client effects. [Ai4rei] +//= 3.42.20110508 +//= Updated description of all instance commands to reflect actual behavior. +//= [Ai4rei] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -3727,15 +3733,10 @@ character and produces no other output whatsoever. *itemheal ,; -This command works on the invoking character like 'heal', however, it is not -normally used in NPC scripts and will not work as expected there, but is used -all over in item scripts. - -Unlike 'heal', which just alters hp/sp and doesn't do anything else at all, this -command also shows healing animations for potions and other stuff, checks -whether the potion was made by a famous alchemist and alters the amount healed, -etc, etc. Since which kind of effect is shown depends on what item was used, -using it in an NPC script will not have a desired effect. +This command heals given absolute amounts of HP and/or SP on the invoking +character. Unlike heal, this command is intended for use in item scripts. It +applies potion-related bonuses, such as alchemist ranking, cards and status +changes. When used inside an NPC script, certain bonuses are omitted. There is also a nice example on using this with the 'rand' function, to give you a random amount of healing. @@ -5544,7 +5545,7 @@ currently ignored by the client and appears always green. 5,1.- End of time-related commands // -*announce "",{,{,{,{,{,}}}}}}; +*announce "",{,{,{,{,{,}}}}}; This command will broadcast a message to all or most players, similar to @kami/@kamib GM commands. @@ -6768,18 +6769,17 @@ This will open a book item at the specified page ======================== --------------------------------------- -*instance_create("",,) +*instance_create("",); -Create an instance using the name "" for the Party of . -Instance ID currently will only be ID_ENDLESS (5) or ID_CATACOMBS (6) -Most Instance_* commands are used in conjunction with this command and depend +Create an instance using the name "" for the Party of . +Most instance_* commands are used in conjunction with this command and depend on the ID this command returns. Example: // Store the Party ID of the invoking character. set .@party_id, getcharid(1); // Attempt to create an instance using that party ID. - set .@id, instance_create("Endless Tower", .@party_id, ID_ENDLESS); + set .@id, instance_create("Endless Tower", .@party_id); if (.@id == -1) { // Party ID is in use by another instance. ... } @@ -6788,67 +6788,111 @@ Example: } --------------------------------------- -*instance_destroy() +*instance_destroy {}; + +Destroys instance with the ID . If no ID is specified, the instance, +the script is attached to, is used. If the script is not attached to an instance, +the instance of the currently attached player's party is used. If no player is +currently attached, the command fails and causes the script to halt. + +--------------------------------------- + +*instance_attachmap("",{,}); + +Attaches the map "" to the instance specified with . The +optional parameter specifies, whether a map requires emulation for instancing (1) +or not (0 = default). -Destroys instance with the ID . +Returns the resulting map name on success or an empty string on failure. --------------------------------------- -*instance_attachmap(,"") -*instance_detachmap(,"") +*instance_detachmap ""{,}; -Attach or detach the map "" to the instance with the . +Detach the map "" to the instance with the . If no ID is +specified, the instance, the script is attached to, is used. If the script is not +attached to an instance, the instance of the currently attached player's party is +used. If no player is currently attached, the command fails and causes the script +to halt. --------------------------------------- -*instance_init(); +*instance_init ; -Initiate the instance of . +Initializes the instance given by . This copies all NPCs from the +source maps to the instanced maps. --------------------------------------- -*instance_announce ,"",{,}; +*instance_announce ,"",{,{,{,{,{,}}}}}; -Works like announce, but has the parameter, where 0 = active instance? +Works like announce, but has the parameter. If instance id is 0, the +instance, the script is attached to, is used. If the script is not attached to an +instance, the instance of the currently attached player's party is used. If no +player is currently attached, the command fails and causes the script to halt. --------------------------------------- -*instance_attach(); +*instance_attach ; -Attaches a script to the provided ? +Attaches the current script to the instance given by . --------------------------------------- -*instance_npcname("",) +*instance_npcname(""{,}); -Retrieve the unique name given to a copy of an NPC for an instance, the given -"" that belongs to instance . Can be used with such commands -as enablenpc and disablenpc, donpcevent, etc. +Retrieves the unique name given to a copy of an NPC given by "" in an +instance specified . If no ID is specified, the instance, the script +is attached to, is used. If the script is not attached to an instance, the +instance of the currently attached player's party is used. If no player is +currently attached, the command fails and causes the script to halt. --------------------------------------- -*has_instance("") +*has_instance(""{,}); + +Checks whether or not the given map belongs to specified instance. If no ID is +specified, the instance, the script is attached to, is used. If the script is not +attached to an instance, the instance of the currently attached player's party +is used. If no player is currently attached, the command fails and causes the +script to halt. -Check if the player has been queued for the instance. +Returns the name of the instanced map on success, otherwise an empty string. --------------------------------------- -*instance_id() +*instance_id({}); -Apparently returns the ID the player is currently attached too. +Retrieves the instance id, depending on . If type is not given, it defaults +to 0. + +Type: + 0 - Instance ID the script is attached to. + 1 - Instance ID of the currently attached player's party. --------------------------------------- -*instance_warpall "",,; +*instance_warpall "",,{,}; -Warp all players in the instance to and given coordinates. +Warps all players in the instance to at given +coordinates. If no ID is specified, the instance, the script is attached to, +is used. If the script is not attached to an instance, the instance of the +currently attached player's party is used. If no player is currently attached, +the command fails and causes the script to halt. --------------------------------------- -*instance_set_timeout ,,; +*instance_set_timeout ,{,}; + +Sets the timeout values for an instance given by . If no ID is +specified, the instance, the script is attached to, is used. If the script is +not attached to an instance, the instance of the currently attached player's +party is used. If no player is currently attached, the command fails and causes +the script to halt. -Lifetime of for , while is how long until the -instance times out while inactive. +Parameter specifies the total amount of time the instance will +exist. Parameter specifies how long players have, when they are +outside of the instance, until it is destroyed. --------------------------------------- -- cgit v1.2.3-70-g09d2