Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 31d08d3a14ee579bb9fb75ccdc517874e6ee0c78 Mon Sep 17 00:00:00 2001
- From: toni <toni@toni-EP45-UD3L.(none)>
- Date: Fri, 22 Apr 2011 12:13:12 -0300
- Subject: [PATCH] Storage options for the banker function
- ---
- db/const.txt | 5 ++++
- npc/functions/banker.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 53 insertions(+), 1 deletions(-)
- diff --git a/db/const.txt b/db/const.txt
- index 29b9e72..d67ae93 100644
- --- a/db/const.txt
- +++ b/db/const.txt
- @@ -369,3 +369,8 @@ E10_ISLAND_MENU_OFFER_LIFESTONE 15
- E10_COLLECT_EGGS_ID 1246
- E10_TOKEN_ID 666
- E10_MIDREWARD_ID 1247 // Valentine's Glasses (as described)
- +
- +// Storage Options
- +OPT_STORAGE_CLOSE, 1;
- +OPT_BANK_CLOSE, 2;
- +OPT_ALL_CLOSE, 3;
- diff --git a/npc/functions/banker.txt b/npc/functions/banker.txt
- index 00f033c..16a8c24 100644
- --- a/npc/functions/banker.txt
- +++ b/npc/functions/banker.txt
- @@ -1,6 +1,6 @@
- -//
- function script Banker {
- +
- if (BankAccount > 0) callsub S_MoveAccount;
- L_Start:
- @@ -13,13 +13,16 @@ L_Start:
- "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;
- L_Dep:
- @@ -187,6 +190,7 @@ L_Balance:
- mes "[" + @npcname$ + "]";
- mes "\"Your current bank balance is:";
- mes #BankAccount + " GP\"";
- + if (#BankOptions & OPT_BANK_CLOSE) close;
- goto L_Start;
- L_Nev:
- @@ -203,4 +207,47 @@ S_MoveAccount:
- set #BankAccount, #BankAccount + BankAccount;
- set BankAccount, 0;
- return;
- +
- +L_Change:
- + if (#BankOptions ^ OPT_ALL_CLOSE == 0) goto L_Offer_Default_Options;
- + if (#BankOptions == 0) goto L_Change_Options;
- +
- + if (#BankOptions & OPT_STORAGE_CLOSE)
- + menu
- + "Return to main menu after leaving storage", L_Change_Storage,
- + "Close NPC dialog after using bank", L_Change_Bank,
- + "Keep the current settings", L_Start;
- +
- + if (#BankOptions & OPT_BANK_CLOSE)
- + menu
- + "Close NPC dialog after selecting storage option", L_Change_Storage,
- + "Return to main menu after leaving bank", L_Change_Bank,
- + "Keep the current settings", -;
- + goto L_Start;
- +
- +L_Offer_Default_Options:
- + menu
- + "Return to main menu after leaving storage", L_Change_Storage,
- + "Return to main menu after leaving bank", L_Change_Bank,
- + "Return bank and storage options to default.", -,
- + "Keep the current settings", L_Start;
- + set #BankOptions, 0;
- + goto L_Start;
- +
- +L_Change_Options:
- + menu
- + "Close NPC dialog after selecting storage option", L_Change_Storage,
- + "Close NPC dialog after using bank", L_Change_Bank,
- + "Change bank and storage options as defined above", -,
- + "Keep the current settings", L_Start;
- + set #BankOptions, (#BankOptions | OPT_ALL_CLOSE);
- + goto L_Start;
- +
- +L_Change_Storage:
- + set #BankOptions, (#BankOptions ^ OPT_STORAGE_CLOSE);
- + goto L_Start;
- +
- +L_Change_Bank:
- + set #BankOptions, (#BankOptions ^ OPT_BANK_CLOSE);
- + goto L_Start;
- }
- --
- 1.7.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement