summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-10 13:56:28 -0200
committerjesusalva <cpntb1@ymail.com>2018-02-10 13:56:28 -0200
commit18bde47f7b73f30f4aaa7f2430de531b6cea8d91 (patch)
treeab8de65eea80b74f074c0e12e740880c776dd562
parent4152c408d762c01cf5c27ef89289c21041140c10 (diff)
downloadserverdata-18bde47f7b73f30f4aaa7f2430de531b6cea8d91.tar.gz
serverdata-18bde47f7b73f30f4aaa7f2430de531b6cea8d91.tar.bz2
serverdata-18bde47f7b73f30f4aaa7f2430de531b6cea8d91.tar.xz
serverdata-18bde47f7b73f30f4aaa7f2430de531b6cea8d91.zip
Mahoud/Well testing
-rw-r--r--npc/003-1/mahoud.txt46
-rw-r--r--npc/003-1/well.txt36
2 files changed, 45 insertions, 37 deletions
diff --git a/npc/003-1/mahoud.txt b/npc/003-1/mahoud.txt
index ae169bbe5..a1705b5eb 100644
--- a/npc/003-1/mahoud.txt
+++ b/npc/003-1/mahoud.txt
@@ -1,13 +1,55 @@
// Author:
// Saulc
+// Jesusalva
-003-1,46,79,0 script Mahoud NPC_MONA,{
+003-1,46,79,0 script Mahoud NPC_PLAYER,{
+ .@COST_PER_BOTTLE = 50;
-hello;
+ 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;
+ if (@inventorylist_count == 100
+ && countitem("BottleOfSweaWater") == 0
+ && .@empty > .@count)
+ goto L_NotEnoughSlots;
+
+ set Zeny, Zeny - .@Cost;
+ delitem "EmptyBottle", .@count;
+ getitem "BottleOfSweaWater", .@count; // TODO FIXME: "Swea" water? Also, this is not sea water...
+ close;
+
+L_NotEnoughBottles:
+ mes l("You don't have that many empty bottles!");
+ close;
+
+L_NotEnoughMoney:
+ mes l("You don't have enough gp! You need @@ gp.", .@Cost);
+ close;
+
+L_NotEnoughSlots:
+ mes l("You don't have room for these bottles!");
+ close;
OnInit:
.sex = G_MALE;
.distance = 3;
+
+ .@npcId = getnpcid(0, "Mahoud");
+ setunitdata(.@npcId, UDT_HEADTOP, 1304);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
end;
}
diff --git a/npc/003-1/well.txt b/npc/003-1/well.txt
index 272deda1a..926a14dac 100644
--- a/npc/003-1/well.txt
+++ b/npc/003-1/well.txt
@@ -3,42 +3,8 @@
// Jesusalva
003-1,45,80,0 script Well NPC_NO_SPRITE,{
- .@COST_PER_BOTTLE = 50;
- mes l("This well have a mechanism to fill water bottles. It costs @@ gp per bottle.", .@COST_PER_BOTTLE);
- mes l("You need the bottle, too. Too bad, not even water is free in this world!");
- 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;
- if (@inventorylist_count == 100
- && countitem("BottleOfSweaWater") == 0
- && .@empty > .@count)
- goto L_NotEnoughSlots;
-
- set Zeny, Zeny - .@Cost;
- delitem "EmptyBottle", .@count;
- getitem "BottleOfSweaWater", .@count; // TODO FIXME: "Swea" water? Also, this is not sea water...
- close;
-
-L_NotEnoughBottles:
- mes l("You don't have that many empty bottles!");
- close;
-
-L_NotEnoughMoney:
- mes l("You don't have enough gp! You need @@ gp.", .@Cost);
- close;
-
-L_NotEnoughSlots:
- mes l("You don't have room for these bottles!");
+ mes l("This well is too deep and you don't have a bucket.");
close;
OnInit: