summaryrefslogtreecommitdiff
path: root/world/map/npc/001-2/casino.txt
diff options
context:
space:
mode:
authorcoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-04 22:17:43 -0300
committercoffee <coffee@coffee-EP45-UD3L.(none)>2011-09-04 22:17:43 -0300
commitf8af8ad0be73b3e0044803a09eb1e6e7f063b466 (patch)
treef6ab272b3ea359d994fc2de969cdf1b3f12b3647 /world/map/npc/001-2/casino.txt
parent9f208b6d7a1c2e15fcd32725aee2eac0c7178cd9 (diff)
downloadserverdata-f8af8ad0be73b3e0044803a09eb1e6e7f063b466.tar.gz
serverdata-f8af8ad0be73b3e0044803a09eb1e6e7f063b466.tar.bz2
serverdata-f8af8ad0be73b3e0044803a09eb1e6e7f063b466.tar.xz
serverdata-f8af8ad0be73b3e0044803a09eb1e6e7f063b466.zip
Clear Temporary variables after you close npc window. Npcs from maps 001-2, 002-1 and 003-1.
Diffstat (limited to 'world/map/npc/001-2/casino.txt')
-rw-r--r--world/map/npc/001-2/casino.txt30
1 files changed, 21 insertions, 9 deletions
diff --git a/world/map/npc/001-2/casino.txt b/world/map/npc/001-2/casino.txt
index 9dcbf5c5..1ee4770a 100644
--- a/world/map/npc/001-2/casino.txt
+++ b/world/map/npc/001-2/casino.txt
@@ -22,7 +22,7 @@
}
001-2.gat,32,67,0|script|MoneyChanger|124,{
- mes "[" + @npcname$ + "]";
+ mes "[Money Changer]";
mes "\"I used to exchange Casino Coins for cash, but the Wizard's Council shut me down. Now the casino only runs off Casino Coins currently in circulation.\"";
next;
mes "\"I heard that many a gambler wandered onto the Beach to the South West and through to the Snake Desert to the South East. If you want to find coins already in circulation, you might find some on the monsters there.\"";
@@ -38,7 +38,7 @@
"Yes", L_Begin,
"No", -;
mes "\"As you wish.\"";
- close;
+ goto L_Close;
L_Begin:
if(countitem("CasinoCoins") < 15) goto L_NoCoin;
@@ -73,17 +73,17 @@ L_End:
mes "I had " + @croupier + ".";
mes "You get 45 casino coins.\"";
getitem "CasinoCoins", 45;
- close;
+ goto L_Close;
L_NoCoin:
mes "\"You need at least 15 coins.\"";
- close;
+ goto L_Close;
L_Lost:
mes "\"I'm sorry but you lost.";
mes "You got " + @player + " with your cards.";
mes "I had " + @croupier + ".\"";
- close;
+ goto L_Close;
L_Ace:
set @player, @player + 11;
@@ -96,6 +96,11 @@ L_Ace:
menu
"Yes", L_Another,
"No", L_End;
+
+L_Close:
+ set @croupier, 0;
+ set @player, 0;
+ set @tempace, 0;
close;
}
@@ -111,7 +116,7 @@ L_Ace:
"100 coins", L_b100,
"Maybe I'll play later", -;
mes "Come again.";
- close;
+ goto L_Close;
L_b1:
set @bet, 1;
@@ -146,7 +151,7 @@ L_Check:
if(@color == 1) goto L_Lost;
mes "You won!";
getitem "CasinoCoins", @bet * 2;
- close;
+ goto L_Close;
L_Number:
menu
@@ -165,13 +170,20 @@ L_Number:
if (@number != @roulette) goto L_Lost;
mes "\"You won!\"";
getitem "CasinoCoins", @bet * 10;
- close;
+ goto L_Close;
L_NoCoin:
mes "\"You don't have enough coins.\"";
- close;
+ goto L_Close;
L_Lost:
mes "\"I'm sorry, you lost.\"";
+ goto L_Close;
+
+L_Close:
+ set @number, 0;
+ set @roulette, 0;
+ set @color, 0;
+ set @bet, 50;
close;
}