summaryrefslogtreecommitdiff
path: root/npc/012-3
diff options
context:
space:
mode:
Diffstat (limited to 'npc/012-3')
-rw-r--r--npc/012-3/_import.txt1
-rw-r--r--npc/012-3/alan.txt63
2 files changed, 11 insertions, 53 deletions
diff --git a/npc/012-3/_import.txt b/npc/012-3/_import.txt
index d27bc10f1..1f94b49b5 100644
--- a/npc/012-3/_import.txt
+++ b/npc/012-3/_import.txt
@@ -1,3 +1,4 @@
// Map 012-3: Archery Shop
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/012-3/_warps.txt",
+"npc/012-3/alan.txt",
diff --git a/npc/012-3/alan.txt b/npc/012-3/alan.txt
index 23fb07f59..6493c6c61 100644
--- a/npc/012-3/alan.txt
+++ b/npc/012-3/alan.txt
@@ -4,8 +4,10 @@
// Description:
// Alan is Hurnscald's bowmaster. He may craft the Forest Bow, and sell ammo.
-012-3,99,23,0 script Alan NPC_RAIJIN,{
+012-3,99,23,0 script Alan NPC_BOWMASTER,{
.@q=getq(HurscaldQuest_ForestBow);
+ .@q2=getq2(HurscaldQuest_ForestBow);
+ .@q3=getq3(HurscaldQuest_ForestBow);
switch (.@q) {
case 1:
npctalk3 l("The Forest Bow is my specialty. I wish I could keep crafting them forever...");
@@ -23,7 +25,7 @@
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;
+ rif(.@q == 1 && .@q2 == .@q3 && .@q2 == 99, l("I have the sturdy wood and the string."), L_Craft;
L_Shop:
openshop;
@@ -53,48 +55,11 @@ L_Next:
l("Right'o, I'll arrange the material!"), L_Start;
L_Start:
- setq HurscaldQuest_ForestBow, 1, 0;
+ // q2 → Wood Part
+ // q3 → String Part
+ setq HurscaldQuest_ForestBow, 1, 0, 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;
@@ -110,14 +75,8 @@ L_Close:
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);
-
+ .sex = G_MALE;
+ .distance = 5;
tradertype(NST_MARKET);
sellitem ShortBow, 9000, 1;
@@ -126,11 +85,9 @@ OnInit:
sellitem TrainingArrow, -1, 2000;
sellitem Arrow, -1, 1000;
sellitem IronArrow, -1, 500;
-
- .sex = G_MALE;
- .distance = 5;
end;
+
OnClock2357:
OnClock1151:
restoreshopitem ShortBow, 9000, 1;