From 9b9deaa4d3f3926405e9c478e3db1acd644ba3d4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 2 Jun 2018 11:39:34 -0300 Subject: Rewrite banking scripts. --- npc/functions/bank.txt | 86 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) (limited to 'npc/functions/bank.txt') diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt index ca5bd1d02..86db74b6d 100644 --- a/npc/functions/bank.txt +++ b/npc/functions/bank.txt @@ -1,9 +1,11 @@ +// TMW2 Script +// Modified by Jesusalva // Evol scripts. // Authors: // gumi // Reid -function script MerchantGuild_Bank { +function script Banking { do { if (BankVault > 0) @@ -132,3 +134,85 @@ function script MerchantGuild_Bank { } } 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: + .@price = getarg(2, 10000); + if (getq(ArtisQuests_Lloyd) == 0) { + mesn getarg(0); + mesq l("Register fee is @@."); + next; + select + rif(Zeny >= .@price, l("Register")), + l("Information"), + l("Not at the moment"); + mes ""; + switch (@menu) { + case 1: + Zeny=Zeny-.@price; + setq ArtisQuests_Lloyd, 1; + 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 { + do + { + select + l("I would like to store some items."), + l("I would like to perform money transactions."), + l("What is this guild for?"), + l("Bye."); + + switch (@menu) { + case 1: + openstorage; + closedialog; + close; + break; + case 2: + Banking; + break; + case 3: + mes ""; + goto L_Info; + break; + } + 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; + + } +} -- cgit v1.2.3-70-g09d2