diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-30 22:02:57 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-30 22:02:57 -0300 |
commit | 4daef039d705f7e7a9a58561e429ef9f255ea90a (patch) | |
tree | 0e98f2a833c64805f5d8604bf94856b2c9ec1942 | |
parent | f484928f7163034f94bf71c1bfb3d1abcdc27ee5 (diff) | |
download | serverdata-4daef039d705f7e7a9a58561e429ef9f255ea90a.tar.gz serverdata-4daef039d705f7e7a9a58561e429ef9f255ea90a.tar.bz2 serverdata-4daef039d705f7e7a9a58561e429ef9f255ea90a.tar.xz serverdata-4daef039d705f7e7a9a58561e429ef9f255ea90a.zip |
Rewrite bank
-rw-r--r-- | npc/functions/bank.txt | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt index ebaee6070..c56048d2b 100644 --- a/npc/functions/bank.txt +++ b/npc/functions/bank.txt @@ -125,38 +125,54 @@ function script Banking { } while (true); } - -// name, city, price (defaults to 10k) -function script Banker { - mesn getarg(0); - mesq l("Welcome! My name is @@, I am a representative of the Merchant Guild on @@.", getarg(0), getarg(1)); - next; - -L_Menu: +function script BKReg { .@price = getarg(2, 10000); .@price=min(2000, .@price-#BankP); - if (getq(General_Banker) == 0) { + @menu=3; + do + { mesn getarg(0); mesq l("Register fee is @@.", .@price); next; select rif(Zeny >= .@price, l("Register")), - l("Information"), - l("Not at the moment"); + l("Not at the moment"), + l("Information"); mes ""; - switch (@menu) { - case 1: + if (@menu == 1) { Zeny=Zeny-.@price; setq General_Banker, 1; #BankP=#BankP+rand(100,400); mesn getarg(0); mesq l("Registered! You can now use any banking service, of any town!"); - break; - case 2: - goto L_Info; - case 3: - close; + } else if (@menu == 3) { + BKInfo(); } + } while (@menu == 3); + return; +} + +function script BKInfo { + speech S_LAST_NEXT, + l("We organize some auction and we help local merchants to launch their businesses."), + l("We also feature some services like a storage and a bank for members."), + l("Registration is open to everybody, but newcomers need to pay a fee for all of the paperwork."); + + narrator S_FIRST_BLANK_LINE, + l("The bank and item storage is shared between all characters within a same account."), + l("With it, you can safely move items and funds between your characters."), + l("To move between characters that are on different accounts, you have to use the Trade function."); + return; +} + +// name, city, price (defaults to 10k) +function script Banker { + mesn getarg(0); + mesq l("Welcome! My name is @@, I am a representative of the Merchant Guild on @@.", getarg(0), getarg(1)); + next; + + if (getq(General_Banker) == 0) { + BKReg(); } else { do { @@ -177,32 +193,17 @@ L_Menu: break; case 3: mes ""; - goto L_Info; + BKInfo(); break; } - if (@menu != 4) - { + if (@menu != 4) { speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, l("Something else?"); } } while (@menu != 4); - - closedialog; - goodbye; - close; } - goto L_Menu; - -L_Info: - speech S_LAST_NEXT, - l("We organize some auction and we help local merchants to launch their businesses."), - l("We also feature some services like a storage and a bank for members."), - l("Registration is open to everybody, but newcomers need to pay a fee for all of the paperwork."); - - narrator S_FIRST_BLANK_LINE, - l("The bank and item storage is shared between all characters within a same account."), - l("With it, you can safely move items and funds between your characters."), - l("To move between characters that are on different accounts, you have to use the Trade function."); - goto L_Menu; + closedialog; + goodbye; + close; } |