From ec9be0a2967b38955d26e337b05bc3a042ac4544 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 2 Nov 2008 22:45:17 +0000 Subject: Branch data for eAthena --- npc/functions/banker.txt | 160 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 npc/functions/banker.txt (limited to 'npc/functions/banker.txt') diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt new file mode 100644 index 00000000..00a85bab --- /dev/null +++ b/npc/functions/banker.txt @@ -0,0 +1,160 @@ +// + +function script Banker { + mes "[" + @npcName$ + "]"; + mes "\"Welcome to the bank!"; + mes "How can I help you?\""; + next; + menu "Deposit",L_Dep,"Withdraw",L_With,"Check my balance",L_Balance,"Nevermind",L_Nev; + +L_Dep: + mes "[" + @npcName$ + "]"; + mes "\"How much would you like to deposit?\""; + next; + menu + "1,000 GP", D_1, + "5,000 GP", D_5, + "10,000 GP", D_10, + "25,000 GP", D_25, + "50,000 GP", D_50, + "100,000 GP", D_100, + "250,000 GP", D_250, + "500,000 GP", D_500, + "1,000,000 GP", D_1000, + "All of my money", D_All, + "I've changed my mind", L_Nev; + +D_1: + if (zeny<1000) goto L_NoMoney; + set @Amount, 1000; + goto L_Deposit; +D_5: + if (zeny<5000) goto L_NoMoney; + set @Amount, 5000; + goto L_Deposit; +D_10: + if (zeny<10000) goto L_NoMoney; + set @Amount, 10000; + goto L_Deposit; +D_25: + if (zeny<25000) goto L_NoMoney; + set @Amount, 25000; + goto L_Deposit; +D_50: + if (zeny<50000) goto L_NoMoney; + set @Amount, 50000; + goto L_Deposit; +D_100: + if (zeny<100000) goto L_NoMoney; + set @Amount, 100000; + goto L_Deposit; +D_250: + if (zeny<250000) goto L_NoMoney; + set @Amount, 250000; + goto L_Deposit; +D_500: + if (zeny<500000) goto L_NoMoney; + set @Amount, 500000; + goto L_Deposit; +D_1000: + if (zeny<1000000) goto L_NoMoney; + set @Amount, 1000000; + goto L_Deposit; +D_All: + if (zeny<1) goto L_NoMoney; + set @Amount, zeny; + goto L_Deposit; + +L_Deposit: + set zeny, zeny - @Amount; + set BankAccount, BankAccount + @Amount; + goto L_Balance; + +L_With: + mes "[" + @npcName$ + "]"; + mes "\"How much would you like to withdraw?\""; + next; + menu + "1,000 GP", W_1, + "5,000 GP", W_5, + "10,000 GP", W_10, + "25,000 GP", W_25, + "50,000 GP", W_50, + "100,000 GP", W_100, + "250,000 GP", W_250, + "500,000 GP", W_500, + "1,000,000 GP", W_1000, + "All of my money", W_All, + "I've changed my mind", L_Nev; + +W_1: + if (BankAccount < 1000) goto L_NoMoney; + set @Amount, 1000; + goto L_Withdraw; + +W_5: + if (BankAccount < 5000) goto L_NoMoney; + set @Amount, 5000; + goto L_Withdraw; + +W_10: + if (BankAccount < 10000) goto L_NoMoney; + set @Amount, 10000; + goto L_Withdraw; + +W_25: + if (BankAccount < 25000) goto L_NoMoney; + set @Amount, 25000; + goto L_Withdraw; + +W_50: + if (BankAccount < 50000) goto L_NoMoney; + set @Amount, 50000; + goto L_Withdraw; + +W_100: + if (BankAccount < 100000) goto L_NoMoney; + set @Amount, 100000; + goto L_Withdraw; + +W_250: + if (BankAccount < 250000) goto L_NoMoney; + set @Amount, 250000; + goto L_Withdraw; + +W_500: + if (BankAccount < 500000) goto L_NoMoney; + set @Amount, 500000; + goto L_Withdraw; + +W_1000: + if (BankAccount < 1000000) goto L_NoMoney; + set @Amount, 1000000; + goto L_Withdraw; + +W_All: + if (BankAccount < 1) goto L_NoMoney; + set @Amount, BankAccount; + goto L_Withdraw; + +L_Withdraw: + set zeny, zeny + @Amount; + set BankAccount, BankAccount - @Amount; + goto L_Balance; + +L_Balance: + mes "[" + @npcName$ + "]"; + mes "\"Your current bank balance is:"; + mes BankAccount + " GP\""; + return; + +L_Nev: + mes "[" + @npcName$ + "]"; + mes "\"Goodbye then.\""; + return; + +L_NoMoney: + mes "[" + @npcName$ + "]"; + mes "\"Oh dear, it seems that you don't have enough money.\""; + return; +} -- cgit v1.2.3-60-g2f50