summaryrefslogtreecommitdiff
path: root/npc/012-3
diff options
context:
space:
mode:
Diffstat (limited to 'npc/012-3')
-rw-r--r--npc/012-3/alan.txt144
1 files changed, 144 insertions, 0 deletions
diff --git a/npc/012-3/alan.txt b/npc/012-3/alan.txt
new file mode 100644
index 000000000..23fb07f59
--- /dev/null
+++ b/npc/012-3/alan.txt
@@ -0,0 +1,144 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Alan is Hurnscald's bowmaster. He may craft the Forest Bow, and sell ammo.
+
+012-3,99,23,0 script Alan NPC_RAIJIN,{
+ .@q=getq(HurscaldQuest_ForestBow);
+ switch (.@q) {
+ case 1:
+ npctalk3 l("The Forest Bow is my specialty. I wish I could keep crafting them forever...");
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break;
+ }
+
+ mesn;
+ mesq l("Only the finest bows and arrows, in the land where wood is abundant!");
+ next;
+ menu
+ l("Ok, thanks."), L_Close,
+ l("I want to trade."), L_Shop,
+ rif(.@q == 0, l("Do you accept special requests? Could you make me a really good bow?"), L_ForestBow,
+ rif(.@q == 2, l("I have the sturdy wood and the string."), L_Craft;
+
+L_Shop:
+ openshop;
+ closedialog;
+ close;
+
+L_ForestBow:
+ mesn;
+ mesq l("Well, I know how to do @@, a sturdy bow, but I am not making those anymore, sorry.", getitemlink(ForestBow));
+ next;
+ menu
+ l("Oh, too bad."), L_Close,
+ l("What? Why not?"), L_Next;
+
+L_Next:
+ mesn;
+ mesq l("You see, I cannot use any raw material on @@. It must be sturdier than the usual, and I don't have the materials for it.");
+ next;
+ mesn;
+ mesq l("The wood, Jack the Lumberjack used to deliver me, but he isn't delivering anymore. And the string was imported from Halinarzo.");
+ next;
+ mesn;
+ mesq l("Perhaps, you could convince Jack to give me the wood, and seek for a fisherman on Halinarzo to give you the string? I won't charge anything.");
+ next;
+ menu
+ l("Not really, sorry."), L_Close,
+ l("Right'o, I'll arrange the material!"), L_Start;
+
+L_Start:
+ setq HurscaldQuest_ForestBow, 1, 0;
+ goto L_Close;
+
+L_State_3:
+ mesn;
+ mes "\"How is the hunt going? Did you bring me any wood?\"";
+ if (countitem("RawLog") < 1)
+ goto L_Close;
+ next;
+ menu
+ "Here, take a look!", L_State_3_try,
+ "Yes, but I need it for something else.", L_Close;
+
+L_State_3_try:
+ if (countitem("RawLog") < 1)
+ goto L_No_Log;
+ delitem "RawLog", 1;
+ mesn;
+ mes "\"Hmmm... looks ok, but is it strong enough?\"";
+ mes "Alan bends the log over his knee.";
+ next;
+ @Temp1 = rand(20);
+ if (@Temp1 == 0) goto L_State_3_success;
+ mes "The log breaks with a loud crack.";
+ getexp @BROKENLOG_EXP, 0;
+ next;
+ mesn;
+ mes "\"Sorry, this log was too weak for one of my forest bows. Now it is junk. Give me another.\"";
+ if (countitem("RawLog") < 1)
+ goto L_Close;
+ next;
+ menu
+ "Sure, here you go.", L_State_3_try,
+ "Hey! Stop breaking my stuff!", L_Close;
+
+L_State_3_success:
+ mes "Alan tries as hard as he can but the log won't bend.";
+ next;
+ mesn;
+ mes "\"Aaah! Yes! That is a really fine piece of wood you brought me. It will make an excellent bow!\"";
+ close;
+
+L_Craft:
+ inventoryplace ForestBow, 1;
+ getitem ForestBow, 1;
+ setq HurscaldQuest_ForestBow, 5;
+ mesn;
+ mes "\"Here you go - have fun with it.\"";
+ goto L_Close;
+
+
+L_Close:
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, Boots);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, CottonShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, JeanChaps);
+ setunitdata(.@npcId, UDT_WEAPON, WoodenBow);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
+ tradertype(NST_MARKET);
+
+ sellitem ShortBow, 9000, 1;
+ sellitem WoodenBow, 4000, 2;
+
+ sellitem TrainingArrow, -1, 2000;
+ sellitem Arrow, -1, 1000;
+ sellitem IronArrow, -1, 500;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+OnClock2357:
+OnClock1151:
+ restoreshopitem ShortBow, 9000, 1;
+ restoreshopitem WoodenBow, 4000, 2;
+OnClock0611:
+OnClock1800:
+ restoreshopitem TrainingArrow, -1, 2000;
+ restoreshopitem Arrow, -1, 1000;
+ restoreshopitem IronArrow, -1, 500;
+
+}