summaryrefslogtreecommitdiff
path: root/npc/012-1/mahad.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/012-1/mahad.txt')
-rw-r--r--npc/012-1/mahad.txt59
1 files changed, 59 insertions, 0 deletions
diff --git a/npc/012-1/mahad.txt b/npc/012-1/mahad.txt
new file mode 100644
index 000000000..de1b02728
--- /dev/null
+++ b/npc/012-1/mahad.txt
@@ -0,0 +1,59 @@
+// TMW-2 Script
+// Author:
+// Saulc
+// Jesusalva
+// Description:
+// Mahad is the Hurnscald Well Master
+// ...Well, he takes the water from the pond, but you shouldn't mind this.
+// It's still safe to drink, 100% warranted!
+
+012-1,117,54,0 script Mahad NPC_PLAYER,{
+ mesn;
+ mes l("I can fill your bottle with water for only @@ gp the bottle.", .COST_PER_BOTTLE);
+ mes l("After all, I am the Well Master!");
+ input .@count;
+
+ if (.@count == 0)
+ close;
+ .@Cost = .@count * .COST_PER_BOTTLE;
+ .@empty = countitem("EmptyBottle");
+
+ if (.@empty < .@count)
+ goto L_NotEnoughBottles;
+ if (Zeny < .@Cost)
+ goto L_NotEnoughMoney;
+ getinventorylist;
+ inventoryplace BottleOfWoodlandWater, .@count;
+
+ Zeny=Zeny-.@Cost;
+ delitem EmptyBottle, .@count;
+ getitem BottleOfWoodlandWater, .@count;
+ close;
+
+L_NotEnoughBottles:
+ mes "";
+ mesn;
+ mes l("You don't have that many empty bottles!");
+ close;
+
+L_NotEnoughMoney:
+ mes "";
+ mesn;
+ mes l("You don't have enough gold! You need @@ gp.", .@Cost);
+ close;
+
+OnInit:
+ .COST_PER_BOTTLE = 60;
+ .sex = G_MALE;
+ .distance = 7;
+
+ .@npcId = getnpcid(0, .name$);
+ // Check items.xml for info about this
+ setunitdata(.@npcId, UDT_HEADTOP, InfantryHelmet);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
+ end;
+}