diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-21 16:04:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-21 16:04:32 +0300 |
commit | 66a7953e6f6b4d7951c306e1d305ab3b904f557a (patch) | |
tree | d96f9df4db7a506277b5659aa6165e0efa7b1700 /npc/functions | |
parent | efb1c01272dc109188f1a4559db05a73405a7d38 (diff) | |
download | serverdata-66a7953e6f6b4d7951c306e1d305ab3b904f557a.tar.gz serverdata-66a7953e6f6b4d7951c306e1d305ab3b904f557a.tar.bz2 serverdata-66a7953e6f6b4d7951c306e1d305ab3b904f557a.tar.xz serverdata-66a7953e6f6b4d7951c306e1d305ab3b904f557a.zip |
Replace temp variables into scope temp variables.
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/asleep.txt | 12 | ||||
-rw-r--r-- | npc/functions/goodbye.txt | 30 | ||||
-rw-r--r-- | npc/functions/inventoryplace.txt | 14 | ||||
-rw-r--r-- | npc/functions/sailordialogue.txt | 8 |
4 files changed, 32 insertions, 32 deletions
diff --git a/npc/functions/asleep.txt b/npc/functions/asleep.txt index cab79b93..42a99796 100644 --- a/npc/functions/asleep.txt +++ b/npc/functions/asleep.txt @@ -5,15 +5,15 @@ // Description: // Tell a random sleeping sound. // Variables: -// @rand = Random number between the number of "sleeping" choice. +// .@rand = Random number between the number of "sleeping" choice. function script Asleep { - set @rand, rand(3); - if (@rand == 0) npctalk3 l("Zzzzzzzzz..."); - if (@rand == 1) npctalk3 l("Rrrr... Pchhhh..."); - if (@rand == 2) npctalk3 l("Ggrmm... Grmmmm..."); - if (@rand == 3) npctalk3 l("Hm..."); + set .@rand, rand(3); + if (.@rand == 0) npctalk3 l("Zzzzzzzzz..."); + if (.@rand == 1) npctalk3 l("Rrrr... Pchhhh..."); + if (.@rand == 2) npctalk3 l("Ggrmm... Grmmmm..."); + if (.@rand == 3) npctalk3 l("Hm..."); close; } diff --git a/npc/functions/goodbye.txt b/npc/functions/goodbye.txt index 470825c7..016822e7 100644 --- a/npc/functions/goodbye.txt +++ b/npc/functions/goodbye.txt @@ -4,25 +4,25 @@ // Description: // Tell a random goodbye sentence. // Variables: -// @rand = Random number between the number of "goodbye" choice. +// .@rand = Random number between the number of "goodbye" choice. function script GoodBye { closedialog; - set @rand, rand(13); - if (@rand == 0) npctalk3 l("See you!"); - if (@rand == 1) npctalk3 l("See you later!"); - if (@rand == 2) npctalk3 l("See you soon!"); - if (@rand == 3) npctalk3 l("Bye!"); - if (@rand == 4) npctalk3 l("Farewell."); - if (@rand == 5) npctalk3 l("Bye then!"); - if (@rand == 6) npctalk3 l("Goodbye."); - if (@rand == 7) npctalk3 l("Bye for now."); - if (@rand == 8) npctalk3 l("Talk to you soon!"); - if (@rand == 9) npctalk3 l("Talk to you later!"); - if (@rand == 10) npctalk3 l("Have a good day!"); - if (@rand == 11) npctalk3 l("Cheers!"); - if (@rand == 12) npctalk3 l("Take care!"); + set .@rand, rand(13); + if (.@rand == 0) npctalk3 l("See you!"); + if (.@rand == 1) npctalk3 l("See you later!"); + if (.@rand == 2) npctalk3 l("See you soon!"); + if (.@rand == 3) npctalk3 l("Bye!"); + if (.@rand == 4) npctalk3 l("Farewell."); + if (.@rand == 5) npctalk3 l("Bye then!"); + if (.@rand == 6) npctalk3 l("Goodbye."); + if (.@rand == 7) npctalk3 l("Bye for now."); + if (.@rand == 8) npctalk3 l("Talk to you soon!"); + if (.@rand == 9) npctalk3 l("Talk to you later!"); + if (.@rand == 10) npctalk3 l("Have a good day!"); + if (.@rand == 11) npctalk3 l("Cheers!"); + if (.@rand == 12) npctalk3 l("Take care!"); close; } diff --git a/npc/functions/inventoryplace.txt b/npc/functions/inventoryplace.txt index c2f95c5c..02c013de 100644 --- a/npc/functions/inventoryplace.txt +++ b/npc/functions/inventoryplace.txt @@ -7,18 +7,18 @@ // getarg(0) item ID, // getarg(1) number of items, // Variables: -// @iteminfo = Item information type. (See doc for list of item's types) -// @countitem = Count item's number. +// .@iteminfo = Item information type. (See doc for list of item's types) +// .@countitem = Count item's number. function script InventoryPlace { getinventorylist; - set @iteminfo, getiteminfo(getarg(0), 2); - set @countitem, countitemcolor(getarg(0)); + set .@iteminfo, getiteminfo(getarg(0), 2); + set .@countitem, countitemcolor(getarg(0)); if (checkweight(getarg(0), getarg(1)) == 0) goto L_Warn; - if ((@iteminfo < 4) && (@countitem == 0) && (@inventorylist_count < 100)) return; - if ((@iteminfo < 4) && (@countitem > 0)) return; - if (@inventorylist_count + getarg(1) <= 100) return; + if ((.@iteminfo < 4) && (.@countitem == 0) && (.@inventorylist_count < 100)) return; + if ((.@iteminfo < 4) && (.@countitem > 0)) return; + if (.@inventorylist_count + getarg(1) <= 100) return; L_Warn: mes ""; diff --git a/npc/functions/sailordialogue.txt b/npc/functions/sailordialogue.txt index dca52323..7d51d995 100644 --- a/npc/functions/sailordialogue.txt +++ b/npc/functions/sailordialogue.txt @@ -8,10 +8,10 @@ function script SailorFood { mesn; - set @q, rand(0, 400) / 100; - if (@q == 0) goto L_RandomA; - if (@q == 1) goto L_RandomB; - if (@q > 1) goto L_RandomC; + set .@q, rand(0, 400) / 100; + if (.@q == 0) goto L_RandomA; + if (.@q == 1) goto L_RandomB; + if (.@q > 1) goto L_RandomC; L_RandomA: mesq l("Hey."); |