summaryrefslogtreecommitdiff
path: root/world/map/npc/001-2/jhedia.txt
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2015-01-07 21:25:14 -0600
committerWushin <pasekei@gmail.com>2015-01-07 21:25:14 -0600
commitb734af239e8ff1e7ea746ea327fb84c62be09b7e (patch)
treecbc5f399ccf8dd226056887a70b9a313f88bee6e /world/map/npc/001-2/jhedia.txt
parent2c09797ebd2c03b2cbe9a458f8ea8d1fbd04ccff (diff)
parent61c88ec162713b980f30e6e5111c1cfbd9f23d3a (diff)
downloadserverdata-b734af239e8ff1e7ea746ea327fb84c62be09b7e.tar.gz
serverdata-b734af239e8ff1e7ea746ea327fb84c62be09b7e.tar.bz2
serverdata-b734af239e8ff1e7ea746ea327fb84c62be09b7e.tar.xz
serverdata-b734af239e8ff1e7ea746ea327fb84c62be09b7e.zip
Merge pull request #223 from wushin/moving-tutorial
Move Tutorial to Hurnscald
Diffstat (limited to 'world/map/npc/001-2/jhedia.txt')
-rw-r--r--world/map/npc/001-2/jhedia.txt62
1 files changed, 62 insertions, 0 deletions
diff --git a/world/map/npc/001-2/jhedia.txt b/world/map/npc/001-2/jhedia.txt
new file mode 100644
index 00000000..fdee36c9
--- /dev/null
+++ b/world/map/npc/001-2/jhedia.txt
@@ -0,0 +1,62 @@
+// Ingot maker takes iron ore, gives ingots for future crafting purposes.
+
+001-2.gat,23,50,0|script|Jhedia|160
+{
+ set @Cost_Per_Ingot, 1000;
+ set @Iron_Ore_Per, 5;
+ set @Coal_Per, 10;
+
+ mes "[Jhedia]";
+ mes "\"I forge Iron Ore into ingots. Ingots are more useful for skilled smiths, like armorers, because the ore is refined and made into useful units which can be worked with. To make ingots, I need " + @Iron_Ore_Per + " Iron Ore and " + @Cost_Per_Ingot + " gp per ingot. I also need " + @Coal_Per + " Coal for my forge.\"";
+ next;
+ mes "[Jhedia]";
+ mes "\"How many ingots would you like?\"";
+ input @ingot_count;
+
+ if (@ingot_count == 0)
+ goto L_Jhedia_Bye;
+ set @Zeny_cost, @ingot_count * @Cost_Per_Ingot;
+ if (countitem("IronOre") < @Iron_Ore_Per * @ingot_count)
+ goto L_Jhedia_NotEnough_Ore;
+ if (countitem("Coal") < @Coal_Per * @ingot_count)
+ goto L_Jhedia_NotEnough_Coal;
+ if (Zeny < @Zeny_cost)
+ goto L_Jhedia_NotEnough_Zeny;
+ getinventorylist;
+ if (@inventorylist_count == 100
+ && countitem("IronIngot") == 0
+ && countitem("IronOre") > @ingot_count * @Iron_Ore_Per
+ | countitem("Coal") > @ingot_count * @Coal_Per)
+ goto L_Jhedia_NotEnoughSlots;
+ set Zeny, Zeny - @Zeny_cost;
+ delitem "IronOre", @ingot_count * @Iron_Ore_Per;
+ delitem "Coal", @ingot_count * @Coal_Per;
+ getitem "IronIngot", @ingot_count;
+ close;
+
+L_Jhedia_Bye:
+ mes "[Jhedia]";
+ mes "\"Goodbye then.\"";
+ close;
+
+L_Jhedia_NotEnough_Ore:
+ mes "[Jhedia]";
+ mes "\"You do not seem to have enough Iron Ore.\"";
+ close;
+
+L_Jhedia_NotEnough_Coal:
+ mes "[Jhedia]";
+ mes "\"You do not seem to have enough Coal.\"";
+ close;
+
+L_Jhedia_NotEnough_Zeny:
+ mes "[Jhedia]";
+ mes "\"You do not seem to have enough gold pieces.\"";
+ close;
+
+L_Jhedia_NotEnoughSlots:
+ mes "[Jhedia]";
+ mes "\"You do not seem to have enough room to carry this many ingots.\"";
+ close;
+
+}