diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-02 11:39:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-02 11:39:34 -0300 |
commit | 9b9deaa4d3f3926405e9c478e3db1acd644ba3d4 (patch) | |
tree | 5c2be27eded0b500c73e21a7e852388e1f8ce5c6 | |
parent | 213f5f085a2b558b0f242e93cb8fd897bc831a58 (diff) | |
download | serverdata-9b9deaa4d3f3926405e9c478e3db1acd644ba3d4.tar.gz serverdata-9b9deaa4d3f3926405e9c478e3db1acd644ba3d4.tar.bz2 serverdata-9b9deaa4d3f3926405e9c478e3db1acd644ba3d4.tar.xz serverdata-9b9deaa4d3f3926405e9c478e3db1acd644ba3d4.zip |
Rewrite banking scripts.
-rw-r--r-- | npc/003-3/malindou.txt | 134 | ||||
-rw-r--r-- | npc/005-5/cynric.txt | 135 | ||||
-rw-r--r-- | npc/009-1/barzil.txt | 143 | ||||
-rw-r--r-- | npc/012-1/richard.txt | 142 | ||||
-rw-r--r-- | npc/functions/bank.txt | 86 |
5 files changed, 89 insertions, 551 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index 06090a7e7..845399f91 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -4,139 +4,7 @@ // Jesusalva 003-3,36,34,0 script Malindou NPC_LLOYD,{ - -// Evol scripts. -// Authors: -// gumi -// Reid -// Description: -// banker NPC. - - - function explain_guild { - speech S_LAST_NEXT, - l("The guild is in charge of the commerce regularization throughout Tulimshar and its surroundings."), - l("With the help of the town hall 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; - } - - function first_visit { - speech S_LAST_NEXT, - l("Welcome!"), - l("My name is Malindou, I am a representative of the Merchant Guild on Tulimshar."); - - select(l("My name is @@...", strcharinfo(0))); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("\"@@\", I like this name!", strcharinfo(0)), - l("Oh, wait a second..."); - narrator S_LAST_NEXT, - l("@@ is searching something in his book.", .name$); - speech S_LAST_NEXT, - l("I see."), - lg("You are new around here, right?"); - - if (select(l("How do you know?"), l("Yes I am.")) == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, it is simple. I have on this book the names of every citizen of Tulimshar and its surroundings."), - l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0)); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I knew it!"); - } - - speech S_LAST_NEXT, - l("Let me explain to you what the Merchant Guild is for."); - - explain_guild; - next; - - .@price = 15000; - speech S_LAST_NEXT, - l("The fee is of @@ GP. So, do you want to register?", .@price); - - switch (select(l("Yes."), - l("I don't have the time now."))) - { - case 1: - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not seem to have enough money, come back later!"); - } - else - { - Zeny = Zeny - .@price; - setq ArtisQuests_Lloyd, 1; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect!"), - l("I wrote your name on the book, you are now free to use the storage and bank services."); - } - break; - case 2: - break; - } - - return; - } - - - if (getq(ArtisQuests_Lloyd) == 0) - { - first_visit; - - closedialog; - goodbye; - close; - } - - speech S_LAST_NEXT, - l("Welcome to the Merchant Guild of Tulimshar."), - l("What do you want today?"); - - 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: - MerchantGuild_Bank; - break; - case 3: - mes ""; - explain_guild; - break; - } - if (@menu != 4) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, - l("Something else?"); - } - } while (@menu != 4); - - closedialog; - goodbye; + Banker(.name$, "Tulimshar", 15000); close; OnInit: diff --git a/npc/005-5/cynric.txt b/npc/005-5/cynric.txt index 4e0608baa..af05aad2d 100644 --- a/npc/005-5/cynric.txt +++ b/npc/005-5/cynric.txt @@ -4,140 +4,7 @@ // Jesusalva 005-5,30,37,0 script Cynric NPC_LLOYD,{ - -// Evol scripts. -// Authors: -// gumi -// Reid -// Description: -// Banker NPC. - - - function explain_guild { - speech S_LAST_NEXT, - l("The guild is in charge of the commerce regularization throughout Candor and its surroundings."), - l("With the help of the town hall 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; - } - - function first_visit { - speech S_LAST_NEXT, - l("Welcome!"), - l("My name is Cynric, I am a representative of the Merchant Guild on Candor."); - - select( - l("My name is @@...", strcharinfo(0)) - ); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("\"@@\", I like this name!", strcharinfo(0)), - l("Oh, wait a second..."); - narrator S_LAST_NEXT, - l("@@ is searching something in his book.", .name$); - speech S_LAST_NEXT, - l("I see."), - lg("You are new around here, right?"); - - if (select(l("How do you know?"), l("Yes I am.")) == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, it is simple. I have on this book the names of every citizen of Candor and its surroundings."), - l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0)); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I knew it!"); - } - - speech S_LAST_NEXT, - l("Let me explain to you what the Merchant Guild is for."); - - explain_guild; - next; - - .@price = 7700; - speech S_LAST_NEXT, - l("The fee is of @@ GP. So, do you want to register?", .@price); - - switch (select(l("Yes."), - l("I don't have the time now."))) - { - case 1: - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not seem to have enough money, come back later!"); - } - else - { - Zeny = Zeny - .@price; - setq ArtisQuests_Lloyd, 1; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect!"), - l("I wrote your name on the book, you are now free to use the storage and bank services."); - } - break; - case 2: - break; - } - - return; - } - - if (getq(ArtisQuests_Lloyd) == 0) - { - first_visit; - - closedialog; - goodbye; - close; - } - - speech S_LAST_NEXT, - l("Welcome to the Merchant Guild of Tulimshar."), - l("What do you want today?"); - - 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: - MerchantGuild_Bank; - break; - case 3: - mes ""; - explain_guild; - break; - } - if (@menu != 4) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, - l("Something else?"); - } - } while (@menu != 4); - - closedialog; - goodbye; + Banker(.name$, "Candor", 7700); close; OnInit: diff --git a/npc/009-1/barzil.txt b/npc/009-1/barzil.txt index 082121e97..c1019714e 100644 --- a/npc/009-1/barzil.txt +++ b/npc/009-1/barzil.txt @@ -5,152 +5,11 @@ // PS. move to indoors 009-1,44,48,0 script Barzil NPC_LLOYD,{ - -// Evol scripts. -// Authors: -// gumi -// Reid -// Description: -// banker NPC. - - - function explain_guild { - speech S_LAST_NEXT, - l("The guild is in charge of the commerce regularization throughout Halinarzo and its surroundings."), - l("With the help of the town hall 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; - } - - function first_visit { - speech S_LAST_NEXT, - l("Welcome!"), - l("My name is Barzil, I am a representative of the Merchant Guild on Halinarzo."); - - select(l("My name is @@...", strcharinfo(0))); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("\"@@\", I like this name!", strcharinfo(0)), - l("Oh, wait a second..."); - narrator S_LAST_NEXT, - l("@@ is searching something in his book.", .name$); - speech S_LAST_NEXT, - l("I see."), - lg("You are new around here, right?"); - - if (select(l("How do you know?"), l("Yes I am.")) == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, it is simple. I have on this book the names of every citizen of Halinarzo and its surroundings."), - l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0)); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I knew it!"); - } - - speech S_LAST_NEXT, - l("Let me explain to you what the Merchant Guild is for."); - - explain_guild; - next; - - .@price = 12000; - speech S_LAST_NEXT, - l("The fee is of @@ GP. So, do you want to register?", .@price); - - switch (select(l("Yes."), - l("I don't have the time now."))) - { - case 1: - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not seem to have enough money, come back later!"); - } - else - { - Zeny = Zeny - .@price; - setq ArtisQuests_Lloyd, 1; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect!"), - l("I wrote your name on the book, you are now free to use the storage and bank services."); - } - break; - case 2: - break; - } - - return; - } - - - if (getq(ArtisQuests_Lloyd) == 0) - { - first_visit; - - closedialog; - goodbye; - close; - } - - speech S_LAST_NEXT, - l("Welcome to the Merchant Guild of Halinarzo."), - l("What do you want today?"); - - 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: - MerchantGuild_Bank; - break; - case 3: - mes ""; - explain_guild; - break; - } - if (@menu != 4) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, - l("Something else?"); - } - } while (@menu != 4); - - closedialog; - goodbye; + Banker(.name$, "Halinarzo", 13000); close; OnInit: .sex = G_MALE; .distance = 4; end; - -OnPCLoginEvent: - checkclientversion; - if (#MerchantBank) - { - BankVault += max(0, #MerchantBank); - #MerchantBank = 0; - } - end; } diff --git a/npc/012-1/richard.txt b/npc/012-1/richard.txt index c71febd13..4ed5b4eb6 100644 --- a/npc/012-1/richard.txt +++ b/npc/012-1/richard.txt @@ -4,151 +4,11 @@ // Jesusalva 012-1,65,64,0 script Richard NPC_LLOYD,{ - -// Evol scripts. -// Authors: -// gumi -// Reid -// Description: -// banker NPC. - - - function explain_guild { - speech S_LAST_NEXT, - l("The guild is in charge of the commerce regularization throughout Hurnscald and its surroundings."), - l("With the help of the town hall 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; - } - - function first_visit { - speech S_LAST_NEXT, - l("Welcome!"), - l("My name is @@, I am a representative of the Merchant Guild on Hurnscald.", .name$); - - select(l("My name is @@...", strcharinfo(0))); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("\"@@\", I like this name!", strcharinfo(0)), - l("Oh, wait a second..."); - narrator S_LAST_NEXT, - l("@@ is searching something in his book.", .name$); - speech S_LAST_NEXT, - l("I see."), - lg("You are new around here, right?"); - - if (select(l("How do you know?"), l("Yes I am.")) == 1) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Oh, it is simple. I have on this book the names of every citizen of Hurnscald and its surroundings."), - l("And I have no mention of a so called \"@@\" on it!", strcharinfo(0)); - } - else - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I knew it!"); - } - - speech S_LAST_NEXT, - l("Let me explain to you what the Merchant Guild is for."); - - explain_guild; - next; - - .@price = 12000; - speech S_LAST_NEXT, - l("The fee is of @@ GP. So, do you want to register?", .@price); - - switch (select(l("Yes."), - l("I don't have the time now."))) - { - case 1: - if (Zeny < .@price) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("You do not seem to have enough money, come back later!"); - } - else - { - Zeny = Zeny - .@price; - setq ArtisQuests_Lloyd, 1; - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Perfect!"), - l("I wrote your name on the book, you are now free to use the storage and bank services."); - } - break; - case 2: - break; - } - - return; - } - - - if (getq(ArtisQuests_Lloyd) == 0) { - first_visit; - - closedialog; - goodbye; - close; - } - - speech S_LAST_NEXT, - l("Welcome to the Merchant Guild of Hurnscald."), - l("What do you want today?"); - - 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: - MerchantGuild_Bank; - break; - case 3: - mes ""; - explain_guild; - break; - } - if (@menu != 4) - { - speech S_FIRST_BLANK_LINE | S_LAST_NEXT | S_NO_NPC_NAME, - l("Something else?"); - } - } while (@menu != 4); - - closedialog; - goodbye; + Banker(.name$, "Halinarzo", 15000); close; OnInit: .sex = G_MALE; .distance = 4; end; - -OnPCLoginEvent: - checkclientversion; - if (#MerchantBank) - { - BankVault += max(0, #MerchantBank); - #MerchantBank = 0; - } - end; } 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; + + } +} |