summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/banker.txt
diff options
context:
space:
mode:
authorThe Kandiman <kandiman@kandiman.(none)>2011-09-10 20:15:17 -0400
committerThe Kandiman <kandiman@kandiman.(none)>2011-09-11 16:48:18 -0400
commit1cb0e75cbd356485ebe35bb3f5af10e1454e57a5 (patch)
tree594bbf4a1bb428ef527f6ce6ec79e4eb3e478607 /world/map/npc/functions/banker.txt
parenta9868851cfe19c503cc72b0289889c564b41dd20 (diff)
downloadserverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.gz
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.bz2
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.tar.xz
serverdata-1cb0e75cbd356485ebe35bb3f5af10e1454e57a5.zip
Tab conversion and formatting project.
npc/functions and npc/items complete.
Diffstat (limited to 'world/map/npc/functions/banker.txt')
-rw-r--r--world/map/npc/functions/banker.txt335
1 files changed, 178 insertions, 157 deletions
diff --git a/world/map/npc/functions/banker.txt b/world/map/npc/functions/banker.txt
index 3c060071..4b9e7050 100644
--- a/world/map/npc/functions/banker.txt
+++ b/world/map/npc/functions/banker.txt
@@ -1,228 +1,249 @@
//
-function script Banker {
+function|script|Banker|{
- if (BankAccount > 0) callsub S_MoveAccount;
+ if (BankAccount > 0) callsub S_MoveAccount;
L_Start:
- 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,
- "Open my storage", L_Storage,
- "Change Bank Options", L_Change,
- "Nevermind", L_Nev;
-
- close;
+ 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,
+ "Open my storage", L_Storage,
+ "Change Bank Options", L_Change,
+ "Nevermind", L_Nev;
+ close;
// need to close window before opening storage.
L_Storage:
- if (#BankOptions & OPT_STORAGE_CLOSE) close2;
- openstorage;
- if (#BankOptions & OPT_STORAGE_CLOSE) end;
- goto L_Start;
+ if (#BankOptions & OPT_STORAGE_CLOSE) close2;
+ openstorage;
+ if (#BankOptions & OPT_STORAGE_CLOSE) end;
+ goto L_Start;
L_Dep:
- mes "[" + @npcname$ + "]";
- mes "\"How much would you like to deposit?\"";
- next;
- menu
- "Other", L_Dep_Input,
- "5,000 GP", L_Dep_5k,
- "10,000 GP", L_Dep_10k,
- "25,000 GP", L_Dep_25k,
- "50,000 GP", L_Dep_50k,
- "100,000 GP", L_Dep_100k,
- "250,000 GP", L_Dep_250k,
- "500,000 GP", L_Dep_500k,
- "1,000,000 GP", L_Dep_1kk,
- "All of my money", L_Dep_All,
- "I've changed my mind", L_Start,
- "Quit", -;
- return;
+ mes "[" + @npcname$ + "]";
+ mes "\"How much would you like to deposit?\"";
+ next;
+ menu
+ "Other", L_Dep_Input,
+ "5,000 GP", L_Dep_5k,
+ "10,000 GP", L_Dep_10k,
+ "25,000 GP", L_Dep_25k,
+ "50,000 GP", L_Dep_50k,
+ "100,000 GP", L_Dep_100k,
+ "250,000 GP", L_Dep_250k,
+ "500,000 GP", L_Dep_500k,
+ "1,000,000 GP", L_Dep_1kk,
+ "All of my money", L_Dep_All,
+ "I've changed my mind", L_Start,
+ "Quit", -;
+ return;
L_Dep_Input:
- input @Amount;
- if (@Amount >= 0) goto L_Dep_Continue;
- mes "[" + @npcname$ + "]";
- mes "\"I need a positive amount. What would you like to do?\"";
- menu
- "Go back", L_Start,
- "Try again", L_Dep_Input,
- "Deposit all", L_Dep_All,
- "Nevermind", -;
- goto L_Nev;
+ input @Amount;
+ if (@Amount >= 0)
+ goto L_Dep_Continue;
+ mes "[" + @npcname$ + "]";
+ mes "\"I need a positive amount. What would you like to do?\"";
+ menu
+ "Go back", L_Start,
+ "Try again", L_Dep_Input,
+ "Deposit all", L_Dep_All,
+ "Nevermind", -;
+ goto L_Nev;
L_Dep_5k:
- if (zeny<5000) goto L_NoMoney;
- set @Amount, 5000;
- goto L_Dep_Continue;
+ if (zeny<5000)
+ goto L_NoMoney;
+ set @Amount, 5000;
+ goto L_Dep_Continue;
L_Dep_10k:
- if (zeny<10000) goto L_NoMoney;
- set @Amount, 10000;
- goto L_Dep_Continue;
+ if (zeny<10000)
+ goto L_NoMoney;
+ set @Amount, 10000;
+ goto L_Dep_Continue;
L_Dep_25k:
- if (zeny<25000) goto L_NoMoney;
- set @Amount, 25000;
- goto L_Dep_Continue;
+ if (zeny<25000)
+ goto L_NoMoney;
+ set @Amount, 25000;
+ goto L_Dep_Continue;
L_Dep_50k:
- if (zeny<50000) goto L_NoMoney;
- set @Amount, 50000;
- goto L_Dep_Continue;
+ if (zeny<50000)
+ goto L_NoMoney;
+ set @Amount, 50000;
+ goto L_Dep_Continue;
L_Dep_100k:
- if (zeny<100000) goto L_NoMoney;
- set @Amount, 100000;
- goto L_Dep_Continue;
+ if (zeny<100000)
+ goto L_NoMoney;
+ set @Amount, 100000;
+ goto L_Dep_Continue;
L_Dep_250k:
- if (zeny<250000) goto L_NoMoney;
- set @Amount, 250000;
- goto L_Dep_Continue;
+ if (zeny<250000)
+ goto L_NoMoney;
+ set @Amount, 250000;
+ goto L_Dep_Continue;
L_Dep_500k:
- if (zeny<500000) goto L_NoMoney;
- set @Amount, 500000;
- goto L_Dep_Continue;
+ if (zeny<500000)
+ goto L_NoMoney;
+ set @Amount, 500000;
+ goto L_Dep_Continue;
L_Dep_1kk:
- if (zeny<1000000) goto L_NoMoney;
- set @Amount, 1000000;
- goto L_Dep_Continue;
+ if (zeny<1000000)
+ goto L_NoMoney;
+ set @Amount, 1000000;
+ goto L_Dep_Continue;
L_Dep_All:
- if (zeny<1) goto L_NoMoney;
- set @Amount, zeny;
+ if (zeny<1)
+ goto L_NoMoney;
+ set @Amount, zeny;
L_Dep_Continue:
- if (zeny < @Amount) goto L_NoMoney;
- set zeny, zeny - @Amount;
- set #BankAccount, #BankAccount + @Amount;
- goto L_Balance;
+ if (zeny < @Amount)
+ goto L_NoMoney;
+ set zeny, zeny - @Amount;
+ set #BankAccount, #BankAccount + @Amount;
+ goto L_Balance;
L_With:
- mes "[" + @npcname$ + "]";
- mes "\"How much would you like to withdraw?\"";
- menu
- "Other", L_With_Input,
- "5,000 GP", L_With_5k,
- "10,000 GP", L_With_10k,
- "25,000 GP", L_With_25k,
- "50,000 GP", L_With_50k,
- "100,000 GP", L_With_100k,
- "250,000 GP", L_With_250k,
- "500,000 GP", L_With_500k,
- "1,000,000 GP", L_With_1kk,
- "All of my money", L_With_All,
- "I've changed my mind", L_Start,
- "Quit", -;
- return;
+ mes "[" + @npcname$ + "]";
+ mes "\"How much would you like to withdraw?\"";
+ menu
+ "Other", L_With_Input,
+ "5,000 GP", L_With_5k,
+ "10,000 GP", L_With_10k,
+ "25,000 GP", L_With_25k,
+ "50,000 GP", L_With_50k,
+ "100,000 GP", L_With_100k,
+ "250,000 GP", L_With_250k,
+ "500,000 GP", L_With_500k,
+ "1,000,000 GP", L_With_1kk,
+ "All of my money", L_With_All,
+ "I've changed my mind", L_Start,
+ "Quit", -;
+ return;
L_With_Input:
- input @Amount;
- if (@Amount >= 0) goto L_With_Continue;
- mes "[" + @npcname$ + "]";
- mes "\"I need a positive amount. What would you like to do?\"";
- menu
- "Go back", L_Start,
- "Try again", L_With_Input,
- "Withdraw all", L_With_All,
- "Nevermind", -;
- goto L_Nev;
+ input @Amount;
+ if (@Amount >= 0)
+ goto L_With_Continue;
+ mes "[" + @npcname$ + "]";
+ mes "\"I need a positive amount. What would you like to do?\"";
+ menu
+ "Go back", L_Start,
+ "Try again", L_With_Input,
+ "Withdraw all", L_With_All,
+ "Nevermind", -;
+ goto L_Nev;
L_With_5k:
- if (#BankAccount < 5000) goto L_NoMoney;
- set @Amount, 5000;
- goto L_With_Continue;
+ if (#BankAccount < 5000)
+ goto L_NoMoney;
+ set @Amount, 5000;
+ goto L_With_Continue;
L_With_10k:
- if (#BankAccount < 10000) goto L_NoMoney;
- set @Amount, 10000;
- goto L_With_Continue;
+ if (#BankAccount < 10000)
+ goto L_NoMoney;
+ set @Amount, 10000;
+ goto L_With_Continue;
L_With_25k:
- if (#BankAccount < 25000) goto L_NoMoney;
- set @Amount, 25000;
- goto L_With_Continue;
+ if (#BankAccount < 25000)
+ goto L_NoMoney;
+ set @Amount, 25000;
+ goto L_With_Continue;
L_With_50k:
- if (#BankAccount < 50000) goto L_NoMoney;
- set @Amount, 50000;
- goto L_With_Continue;
+ if (#BankAccount < 50000)
+ goto L_NoMoney;
+ set @Amount, 50000;
+ goto L_With_Continue;
L_With_100k:
- if (#BankAccount < 100000) goto L_NoMoney;
- set @Amount, 100000;
- goto L_With_Continue;
+ if (#BankAccount < 100000)
+ goto L_NoMoney;
+ set @Amount, 100000;
+ goto L_With_Continue;
L_With_250k:
- if (#BankAccount < 250000) goto L_NoMoney;
- set @Amount, 250000;
- goto L_With_Continue;
+ if (#BankAccount < 250000)
+ goto L_NoMoney;
+ set @Amount, 250000;
+ goto L_With_Continue;
L_With_500k:
- if (#BankAccount < 500000) goto L_NoMoney;
- set @Amount, 500000;
- goto L_With_Continue;
+ if (#BankAccount < 500000)
+ goto L_NoMoney;
+ set @Amount, 500000;
+ goto L_With_Continue;
L_With_1kk:
- if (#BankAccount < 1000000) goto L_NoMoney;
- set @Amount, 1000000;
- goto L_With_Continue;
+ if (#BankAccount < 1000000)
+ goto L_NoMoney;
+ set @Amount, 1000000;
+ goto L_With_Continue;
L_With_All:
- if (#BankAccount < 0) goto L_NoMoney;
- set @Amount, #BankAccount;
+ if (#BankAccount < 0)
+ goto L_NoMoney;
+ set @Amount, #BankAccount;
L_With_Continue:
- if (#BankAccount < @Amount) goto L_NoMoney;
- set zeny, zeny + @Amount;
- set #BankAccount, #BankAccount - @Amount;
- goto L_Balance;
+ if (#BankAccount < @Amount)
+ goto L_NoMoney;
+ set zeny, zeny + @Amount;
+ set #BankAccount, #BankAccount - @Amount;
+ goto L_Balance;
L_Balance:
- mes "[" + @npcname$ + "]";
- mes "\"Your current bank balance is:";
- mes #BankAccount + " GP\"";
- if (#BankOptions & OPT_BANK_CLOSE) close;
- goto L_Start;
+ mes "[" + @npcname$ + "]";
+ mes "\"Your current bank balance is:";
+ mes #BankAccount + " GP\"";
+ if (#BankOptions & OPT_BANK_CLOSE) close;
+ goto L_Start;
L_Nev:
- mes "[" + @npcname$ + "]";
- mes "\"Goodbye then.\"";
- return;
+ mes "[" + @npcname$ + "]";
+ mes "\"Goodbye then.\"";
+ return;
L_NoMoney:
- mes "[" + @npcname$ + "]";
- mes "\"Oh dear, it seems that you don't have enough money.\"";
- goto L_Start;
+ mes "[" + @npcname$ + "]";
+ mes "\"Oh dear, it seems that you don't have enough money.\"";
+ goto L_Start;
S_MoveAccount:
- set #BankAccount, #BankAccount + BankAccount;
- set BankAccount, 0;
- return;
+ set #BankAccount, #BankAccount + BankAccount;
+ set BankAccount, 0;
+ return;
L_Change:
- setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance";
- if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage";
- if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank";
- menu
- @menuitems$[0], L_Start,
- @menuitems$[1], L_Change_Storage,
- @menuitems$[2], L_Change_Bank;
+ setarray @menuitems$, "Keep the current settings", "Close NPC dialog after selecting storage option", "Close NPC dialog after checking your balance";
+ if (#BankOptions & OPT_STORAGE_CLOSE) set @menuitems$[1], "Return to main menu after leaving storage";
+ if (#BankOptions & OPT_BANK_CLOSE) set @menuitems$[2], "Return to main menu after leaving bank";
+ menu
+ @menuitems$[0], L_Start,
+ @menuitems$[1], L_Change_Storage,
+ @menuitems$[2], L_Change_Bank;
L_Change_Storage:
- set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE);
- goto L_Start;
+ set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE);
+ goto L_Start;
L_Change_Bank:
- set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE);
- goto L_Start;
+ set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE);
+ goto L_Start;
}