diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-09-20 07:20:19 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-09-20 07:20:19 +0000 |
commit | b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8 (patch) | |
tree | ef1d9f4f3e3b04bda60bd68fc25178f785ed8284 | |
parent | 0d5c334c08846eedabacdabb4d4de04c90ec6b76 (diff) | |
download | hercules-b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8.tar.gz hercules-b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8.tar.bz2 hercules-b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8.tar.xz hercules-b793bb7e9eb87a9dddfb1f78c3ae0d795bdb14f8.zip |
- Updated strnpcinfo documentation, following r14929.
- Fixed some script typos. (bugreport:5047, bugreport:5049, bugreport:5056)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14960 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | doc/script_commands.txt | 30 | ||||
-rw-r--r-- | npc/jobs/2-2/sage.txt | 3 | ||||
-rw-r--r-- | npc/quests/first_class/tu_archer.txt | 2 | ||||
-rw-r--r-- | npc/quests/quests_hugel.txt | 18 |
4 files changed, 33 insertions, 20 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 9328cfa56..1afff5377 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -577,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 @@ -614,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 @@ -1304,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 <label>; @@ -2167,6 +2174,7 @@ Whatever it returns is determined by type. 1 - The visible part of the NPC's display name 2 - The hidden part of the NPC's display name 3 - The NPC's unique name (::name) + 4 - The name of the map the NPC is in. --------------------------------------- @@ -2195,11 +2203,14 @@ This will make @arraysize == 6. But if you try this: This command retrieves the value of the element of given array at given index. This is equivalent to using: - array[index] + <array name>[<index>] The reason for this is, that this short form is internally converted into a call to getelementofarray, when the script is loaded. +Also useful when passing arrays to functions. +getelementofarray(getarg(0),<index>) will work, but getarg(0)[<index>] will not. + --------------------------------------- *readparam(<parameter number>) @@ -3690,7 +3701,7 @@ is executing this script, unless it's some kind of "chosen" script. Example: -warpchar "prontera",150,100,20000001; +warpchar "prontera",150,100,150001; --------------------------------------- @@ -6128,13 +6139,14 @@ the NPC with the said name. *rand(<number>{,<number>}); -This function returns a number, randomly positioned between 0 and the number you -specify (if you only specify one) and the two numbers you specify if you give it -two. +This function returns a number ... +(if you specify one) ... randomly positioned between 0 and the number you specify -1. +(if you specify two) ... randomly positioned between the two numbers you specify. -rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9 +rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9 +rand(0,9) would result in 0,1,2,3,4,5,6,7,8 or 9 -rand(2,10) would result in 2,3,4,5,6,7,8,9 or 10 +rand(2,5) would result in 2,3,4 or 5 --------------------------------------- diff --git a/npc/jobs/2-2/sage.txt b/npc/jobs/2-2/sage.txt index 6320e60d9..e1c601fe9 100644 --- a/npc/jobs/2-2/sage.txt +++ b/npc/jobs/2-2/sage.txt @@ -2680,7 +2680,8 @@ OnInit: OnEnable: enablenpc "Arena#2"; - disablenpc "Arena#1::OnReset"; + donpcevent "Arena#1::OnReset"; + disablenpc "Arena#1"; set .MyMobs,24; monster "job_sage",111,102,"Numerical Value",1063,1,"Arena#2::OnMyMobDead"; monster "job_sage",111,102,"Physics",1063,1,"Arena#2::OnMyMobDead"; diff --git a/npc/quests/first_class/tu_archer.txt b/npc/quests/first_class/tu_archer.txt index e443f99c1..bb1a9f8c6 100644 --- a/npc/quests/first_class/tu_archer.txt +++ b/npc/quests/first_class/tu_archer.txt @@ -1904,7 +1904,7 @@ prt_castle,76,165,6 script Minister#tu 55,{ //=================================================Range NPC==================================================== prt_castle,94,150,4 script #sound_tu 139,10,10,{ OnTouch_: - if(tu_archer02 != 6) { + if(tu_archer02 == 6) { mes "[Minister]"; mes "Contact the"; mes "Prontera Church."; diff --git a/npc/quests/quests_hugel.txt b/npc/quests/quests_hugel.txt index 617623db2..13be33cc3 100644 --- a/npc/quests/quests_hugel.txt +++ b/npc/quests/quests_hugel.txt @@ -3806,7 +3806,7 @@ hu_fild06,168,359,3 script Moks Mushrooms#Mush1 111,{ if(hg_tre > 9 && hg_tre < 15) { - mes "- You found mushrooms that is as big as your palm. -"; + mes "- You found mushrooms that are as big as your palm. -"; next; switch( select( "Gather them.","Pass." ) ) { @@ -3843,7 +3843,7 @@ hu_fild06,168,359,3 script Moks Mushrooms#Mush1 111,{ else if(hg_tre == 15) mes "Collected Moks Mushroom Solution: 5ea "; initnpctimer; - disablenpc "Moks Mushroom#Mush1"; + disablenpc "Moks Mushrooms#Mush1"; close; break; case 2: @@ -3860,7 +3860,7 @@ hu_fild06,168,359,3 script Moks Mushrooms#Mush1 111,{ } OnTimer20000: - enablenpc "Moks Mushroom#Mush1"; + enablenpc "Moks Mushrooms#Mush1"; stopnpctimer; end; @@ -3870,7 +3870,7 @@ hu_fild06,194,341,3 script Moks Mushrooms#Mush2 111,{ if(hg_tre > 9 && hg_tre < 15) { - mes "- You found mushrooms that is as big as your palm. -"; + mes "- You found mushrooms that are as big as your palm. -"; next; switch( select( "Gather them.","Pass." ) ) { @@ -3907,7 +3907,7 @@ hu_fild06,194,341,3 script Moks Mushrooms#Mush2 111,{ else if(hg_tre == 15) mes "Collected Moks Mushroom Solution: 5ea "; initnpctimer; - disablenpc "Moks Mushroom#Mush2"; + disablenpc "Moks Mushrooms#Mush2"; close; break; case 2: @@ -3924,7 +3924,7 @@ hu_fild06,194,341,3 script Moks Mushrooms#Mush2 111,{ } OnTimer20000: - enablenpc "Moks Mushroom#Mush2"; + enablenpc "Moks Mushrooms#Mush2"; stopnpctimer; end; @@ -3934,7 +3934,7 @@ hu_fild06,198,339,3 script Moks Mushrooms#Mush3 111,{ if(hg_tre > 9 && hg_tre < 15) { - mes "- You found mushrooms that is as big as your palm. -"; + mes "- You found mushrooms that are as big as your palm. -"; next; switch( select( "Gather them.","Pass." ) ) { @@ -3971,7 +3971,7 @@ hu_fild06,198,339,3 script Moks Mushrooms#Mush3 111,{ else if(hg_tre == 15) mes "Collected Moks Mushroom Solution: 5ea "; initnpctimer; - disablenpc "Moks Mushroom#Mush3"; + disablenpc "Moks Mushrooms#Mush3"; close; break; case 2: @@ -3988,7 +3988,7 @@ hu_fild06,198,339,3 script Moks Mushrooms#Mush3 111,{ } OnTimer20000: - enablenpc "Moks Mushroom#Mush3"; + enablenpc "Moks Mushrooms#Mush3"; stopnpctimer; end; |