From 8741a4adb24f830d1fc5dc69255662a0e285c135 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 28 Mar 2019 10:27:00 -0300 Subject: Nivalis Well, with Terranite Water (jk, it is plain old woodland water too) --- npc/019-1/well.txt | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) (limited to 'npc') diff --git a/npc/019-1/well.txt b/npc/019-1/well.txt index f1d0b40de..f77e64bde 100644 --- a/npc/019-1/well.txt +++ b/npc/019-1/well.txt @@ -33,12 +33,6 @@ l("Leave."), -; close; -// Fill a water bottle -L_Bottle: - mes ""; - mesc l("Temporaly out of order."), 1; - close; - // Jump to Terranite Cave (requires 55 vitality minimum) L_Reckless: closedialog; @@ -128,8 +122,47 @@ L_Quest: } while (@menu != 1); close; +// Fill a water bottle +L_Bottle: + mes ""; + mesc l("Cost: @@ gp per bottle.", .price); + input .@count; + + if (!.@count) + close; + + .@gp = .@count * .price; + + if (Zeny < .@gp) { + mesc l("Not enough money."); + close; + } + + if (countitem(EmptyBottle) < .@count) { + mesc l("Not enough bottles."); + close; + } + + inventoryplace IcedBottle, .@count, BottleOfWoodlandWater, .@count; + + // Calculate how many iced bottles you'll get + .@iced=0; + for (.@i=0; .@i < .@count; .@i++) { + if (rand(1,1000) < 11) + .@iced++; + } + + // Apply the results and have a happy day! + Zeny-=.@gp; + if (.@iced) + getitem IcedBottle, .@iced; + getitem BottleOfWoodlandWater, .@count-.@iced; + close; + OnInit: .sex = G_OTHER; .distance = 3; + + .price=60; end; } -- cgit v1.2.3-60-g2f50