summaryrefslogtreecommitdiff
path: root/npc/019-1/well.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/019-1/well.txt')
-rw-r--r--npc/019-1/well.txt45
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;
}