From 033373a5a75599f8607107cb28b97cc6a653b0b5 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 7 Oct 2011 21:35:12 +0000 Subject: * Merged changes from trunk [14895:14966/trunk]. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14967 54d463be-8e91-2dee-dedb-b68131a5f0ec --- doc/script_commands.txt | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 42ccbcbbe..1afff5377 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -181,6 +181,8 @@ //= Documented special map names recognized by 'warpguild'. [Ai4rei] //= 3.45.20110709 //= Added 'getmercinfo' command. [Ai4rei] +//= 3.46.20110810 +//= Added information on OnTouchNPC and 'unitwarp' special case [Skotlex] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -423,7 +425,8 @@ spanning triggerX cells in every direction across X and triggerY in every direction across Y. Walking into that area will trigger the NPC. If no 'OnTouch:' special label is present in the NPC code, the execution will start from the beginning of the script, otherwise, it will start from the 'OnTouch:' -label. +label. Monsters can also trigger the NPC, though the label 'OnTouchNPC:' is +used in this case. The code part is the script code that will execute whenever the NPC is triggered. It may contain commands and function calls, descriptions of which @@ -574,7 +577,9 @@ Variables --------- The meat of every programming language is variables - places where you store -data. +data. + +In the eAthena scripting language, variable names are not case sensitive. Variables are divided into and uniquely identified by the combination of: prefix - determines the scope and extent (or lifetime) of the variable @@ -611,7 +616,9 @@ nothing - A permanent variable attached to the character, the default variable "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling - 'getvariableofnpc'. + 'getvariableofnpc'. Function objects can also have .variables which + are accessible from inside the function, however 'getvariableofnpc' + does NOT work on function objects. ".@" - A scope variable. They are unique to the instance and scope. Each instance has it's own scope that ends when the script ends. Calling a function with @@ -1301,6 +1308,9 @@ Example(s): //This will set the .var variable of TargetNPC to 1. set getvariableofnpc(.var,"TargetNPC"),1; +Note: even though function objects can have .variables, +getvariableofnpc will not work on them. + --------------------------------------- *goto