From 9dd64f8fee1321452a55aa39ea163f4b67683471 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 11 May 2022 22:43:44 -0300 Subject: Disable your bank account (temporarily) while you're in the past. --- npc/003-3/malindou.txt | 4 +++- npc/032-1/episode.txt | 19 ++++++++++++------- npc/items/lofteleporter.txt | 3 +++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index 8edc01769..540f1df55 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -820,7 +820,9 @@ OnInterIfInitOnce: OnPCLoginEvent: // Vault override if (#MerchantBank) { - BankVault += max(0, #MerchantBank); + if (#MerchantBank < 0) + consolebug("Negative bank data for %s!", strcharinfo(0)); + BankVault += #MerchantBank; #MerchantBank = 0; } diff --git a/npc/032-1/episode.txt b/npc/032-1/episode.txt index 0655d5e0a..f028c453c 100644 --- a/npc/032-1/episode.txt +++ b/npc/032-1/episode.txt @@ -73,6 +73,9 @@ OnFin: sleep2(1500); warp "017-3", 72, 69; // Nothing else needs to be done, quest was closed earlier + // So we just fix your bank account + BankVault += #MerchantBank; + #MerchantBank = 0; end; OnInit: @@ -542,6 +545,8 @@ OnInit: } 032-1,114,194,0 script Imec#EP NPC_LOF_TRAVMERC,{ + #MerchantBank+=#MerchantBank; + #MerchantBank=0; .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); .@x = getq3(LoFQuest_EPISODE); .@met_banu = (.@x & 1); @@ -567,14 +572,14 @@ OnInit: next; menuint l("I'm sure the Doctor has a trick... No loans, thanks."), 0, - rif(BankVault > 1250, l("1,000 GP")), 1000, - rif(BankVault > 3125, l("2,500 GP")), 2500, - rif(BankVault > 6250, l("5,000 GP")), 5000, - rif(BankVault > 12500, l("10,000 GP")), 10000, - rif(BankVault > 62500, l("50,000 GP")), 50000, - rif(BankVault > 312500, l("250,000 GP")), 250000; + rif(#MerchantBank > 1250, l("1,000 GP")), 1000, + rif(#MerchantBank > 3125, l("2,500 GP")), 2500, + rif(#MerchantBank > 6250, l("5,000 GP")), 5000, + rif(#MerchantBank > 12500, l("10,000 GP")), 10000, + rif(#MerchantBank > 62500, l("50,000 GP")), 50000, + rif(#MerchantBank > 312500, l("250,000 GP")), 250000; mes ""; - BankVault -= @menuret * 125 / 100; + #MerchantBank -= @menuret * 125 / 100; Zeny += @menuret; mesn; mesq l("...As you wish."); diff --git a/npc/items/lofteleporter.txt b/npc/items/lofteleporter.txt index eb1f9addd..1e2f8e889 100644 --- a/npc/items/lofteleporter.txt +++ b/npc/items/lofteleporter.txt @@ -108,6 +108,9 @@ OnUse: break; case 8: //atcommand("@block "+strcharinfo(0)); + // Reset your bank savings (temporary) + #MerchantBank=BankVault; + BankVault=0; setq2 LoFQuest_EPISODE, 0; setq3 LoFQuest_EPISODE, 0; warp "032-1", 23, 25; -- cgit v1.2.3-60-g2f50