diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-07 22:42:22 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-07 22:42:22 -0700 |
commit | b073a508fb4c61ed3cb4f4cc62fc3d892480a6b8 (patch) | |
tree | 6c7cdd72301a8514f9efad827a7cea4eb07a1651 /npc | |
parent | 29ba73d418f5b8a800fd1f7aae3457fe67cd1f22 (diff) | |
download | serverdata-b073a508fb4c61ed3cb4f4cc62fc3d892480a6b8.tar.gz serverdata-b073a508fb4c61ed3cb4f4cc62fc3d892480a6b8.tar.bz2 serverdata-b073a508fb4c61ed3cb4f4cc62fc3d892480a6b8.tar.xz serverdata-b073a508fb4c61ed3cb4f4cc62fc3d892480a6b8.zip |
Move bank storage to be account level
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/banker.txt | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt index 79a57738..4967263a 100644 --- a/npc/functions/banker.txt +++ b/npc/functions/banker.txt @@ -1,6 +1,7 @@ // function script Banker { + if (BankAccount > 0) callsub S_MoveAccount; mes "[" + @npcName$ + "]"; mes "\"Welcome to the bank!"; mes "How can I help you?\""; @@ -71,7 +72,7 @@ D_All: L_Deposit: if (zeny < @Amount) goto L_NoMoney; set zeny, zeny - @Amount; - set BankAccount, BankAccount + @Amount; + set #BankAccount, #BankAccount + @Amount; goto L_Balance; L_With: @@ -92,64 +93,64 @@ L_With: "I've changed my mind", L_Nev; W_1: - if (BankAccount < 1000) goto L_NoMoney; + if (#BankAccount < 1000) goto L_NoMoney; set @Amount, 1000; goto L_Withdraw; W_5: - if (BankAccount < 5000) goto L_NoMoney; + if (#BankAccount < 5000) goto L_NoMoney; set @Amount, 5000; goto L_Withdraw; W_10: - if (BankAccount < 10000) goto L_NoMoney; + if (#BankAccount < 10000) goto L_NoMoney; set @Amount, 10000; goto L_Withdraw; W_25: - if (BankAccount < 25000) goto L_NoMoney; + if (#BankAccount < 25000) goto L_NoMoney; set @Amount, 25000; goto L_Withdraw; W_50: - if (BankAccount < 50000) goto L_NoMoney; + if (#BankAccount < 50000) goto L_NoMoney; set @Amount, 50000; goto L_Withdraw; W_100: - if (BankAccount < 100000) goto L_NoMoney; + if (#BankAccount < 100000) goto L_NoMoney; set @Amount, 100000; goto L_Withdraw; W_250: - if (BankAccount < 250000) goto L_NoMoney; + if (#BankAccount < 250000) goto L_NoMoney; set @Amount, 250000; goto L_Withdraw; W_500: - if (BankAccount < 500000) goto L_NoMoney; + if (#BankAccount < 500000) goto L_NoMoney; set @Amount, 500000; goto L_Withdraw; W_1000: - if (BankAccount < 1000000) goto L_NoMoney; + if (#BankAccount < 1000000) goto L_NoMoney; set @Amount, 1000000; goto L_Withdraw; W_All: - if (BankAccount < 1) goto L_NoMoney; - set @Amount, BankAccount; + if (#BankAccount < 1) goto L_NoMoney; + set @Amount, #BankAccount; goto L_Withdraw; L_Withdraw: set zeny, zeny + @Amount; - set BankAccount, BankAccount - @Amount; + set #BankAccount, #BankAccount - @Amount; goto L_Balance; L_Balance: mes "[" + @npcName$ + "]"; mes "\"Your current bank balance is:"; - mes BankAccount + " GP\""; + mes #BankAccount + " GP\""; return; L_Nev: @@ -161,4 +162,9 @@ L_NoMoney: mes "[" + @npcName$ + "]"; mes "\"Oh dear, it seems that you don't have enough money.\""; return; + +S_MoveAccount: + set #BankAccount, #BankAccount + BankAccount; + set BankAccount, 0; + return; } |