From 71d2ac82d51bde8f7a26f2b4587efc6fd4af41d4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 5 Mar 2019 17:40:16 -0300 Subject: Implement Housing Letters --- npc/functions/bank.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'npc/functions/bank.txt') diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt index a8c341dee..77738e9ed 100644 --- a/npc/functions/bank.txt +++ b/npc/functions/bank.txt @@ -21,6 +21,7 @@ function script Banking { select rif(Zeny > 0, l("Deposit.")), rif(BankVault > 0, l("Withdraw.")), + l("Buy a Housing Letter"), l("I'm done."); switch (@menu) @@ -118,6 +119,32 @@ function script Banking { } break; + case 3: + .@gp=REAL_ESTATE_CREDITS+Zeny; + mesc l("You currently have @@ mobiliary credits + GP at your disposal.", format_number(.@gp)); + mesc l("@@ - @@ - @@", getitemlink(HousingLetterI), getitemlink(HousingLetterII), getitemlink(HousingLetterIII)); + next; + select + l("Nothing"), + rif(.@gp >= 11000, l("Housing Letter I for 11,000 GP")), + rif(.@gp >= 101000, l("Housing Letter II for 101,000 GP")), + rif(.@gp >= 1001000, l("Housing Letter III for 1,001,000 GP")); + mes ""; + switch (@menu) { + case 2: + realestate_payment(11000); + getitem HousingLetterI, 1; + break; + case 3: + realestate_payment(101000); + getitem HousingLetterII, 1; + break; + case 4: + realestate_payment(1001000); + getitem HousingLetterIII, 1; + break; + } + break; default: return; } } while (true); -- cgit v1.2.3-60-g2f50