diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-28 10:27:00 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-03-28 10:27:00 -0300 |
commit | 8741a4adb24f830d1fc5dc69255662a0e285c135 (patch) | |
tree | a0cb2ed1bcc4546536df0b33d2da1ac5668e1521 /npc | |
parent | 7af8b7bdc66011758690e7452a2d04f968af8515 (diff) | |
download | serverdata-8741a4adb24f830d1fc5dc69255662a0e285c135.tar.gz serverdata-8741a4adb24f830d1fc5dc69255662a0e285c135.tar.bz2 serverdata-8741a4adb24f830d1fc5dc69255662a0e285c135.tar.xz serverdata-8741a4adb24f830d1fc5dc69255662a0e285c135.zip |
Nivalis Well, with Terranite Water (jk, it is plain old woodland water too)
Diffstat (limited to 'npc')
-rw-r--r-- | npc/019-1/well.txt | 45 |
1 files changed, 39 insertions, 6 deletions
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; } |