summaryrefslogtreecommitdiff
path: root/npc/012-3/alan.txt
blob: 3b01ee7d8c063c8189403511c1afb23eb18c0db4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// TMW-2 Script
// Author:
//    Jesusalva
// Description:
//    Alan is Hurnscald's bowmaster. He may craft the Forest Bow, and sell ammo.

012-3,44,40,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...");
        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 == 1 && .@q2 == .@q3 && .@q2 == 99, 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 @@, 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. 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:
    // q2 → Wood Part
    // q3 → String Part
    setq HurscaldQuest_ForestBow, 1, 0, 0;
    goto L_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:
    .sex = G_MALE;
    .distance = 5;
	tradertype(NST_MARKET);

    sellitem ShortBow, 9000, 1;
    sellitem WoodenBow, 4000, 2;

    sellitem TrainingArrow, -1, 2000;
    sellitem Arrow, -1, 1000;
    sellitem IronArrow, -1, 500;
    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;

}