summaryrefslogtreecommitdiff
path: root/npc/012-1/jack.txt
blob: 89af3e614bb4227a2988a8f5544cfb73a040c5e6 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// TMW-2 Script
// Originals: TMW Org.
//
// Author:
//    Jesusalva
// Description:
//    Jack is Hurnscald Lumberjack

012-1,69,93,0	script	Jack	NPC_LUMBERJACK,{
    .@q1=getq(HurscaldQuest_ForestBow);
    //.@q2=getq(HurscaldQuest_WoodShield);

    mesn "Jack, the Lumberjack";
    mesq l("Hello there! I'm Jack, the Lumberjack, and enemy of all trees. If you need some firewood, just let me know.");
    select
        l("Nothing at the moment, thanks."),
        rif(.@q1 == 1, l("I need a sturdy wood piece for a Forest Bow."));

    switch (@menu) {
        case 1:
            close;
            break;
        case 2:
            goto L_ForestBow;
            break;
    }

    close;

L_ForestBow:
    .@k=getq2(HurscaldQuest_ForestBow);

    switch (.@k) {
    case 0:
        mesn;
        mesq l("Ah, don't bother me with that. That wood must be special, it must bend and cannot break. Too difficult to find!");
        next;
        mesn;
        mesq l("I also do not keep any stock of them. If you really want it, you can bring me some Raw Logs. I'll show you which one is the good one. Deal?");
        next;
        mesn strcharinfo(0);
        mesq l("I'm railroaded here, I cannot say no. I'll bring you some @@. Break them until one of them fit.", getitemlink(RawLog));
        setq2 HurscaldQuest_ForestBow, 1;
        close;
        break;
    case 99:
        mesn;
        mesq l("Good luck...");
        break;
    default:
        goto L_Loop;
    }
    goto L_Close;

L_Loop:
    .@k=getq2(HurscaldQuest_ForestBow);
    mesn;
    mesq l("Bring me your wood, and I'll show you which one is sturdy, yet flexible enough to make a good Forest Bow.");
    mes "";
    select
        l("Don't break my stuff."),
        rif(countitem(RawLog) > 0, l("Try this one."));

    if (@menu == 1)
        close;

    mes col("Jack bends the log over his knee.", 9);
    delitem RawLog, 1;
    .@success=rand(6,26)-.@k; // You will never need more than 20 logs nor less than 5 logs

    if (.@success == 1) {
        mes col("The wood bends a little, but doesn't breaks.", 9);
        getexp 0, 100;
        setq2 HurscaldQuest_ForestBow, 99;
        next;
        mesn;
        mesq lg("That's the right wood, my son. Here, I'll wrap it so you don't accidentaly lose it. Good luck with your quest!");
        close;
    } else {
        mes col("However, the log breaks with a loud crack.", 9);
        setq2 HurscaldQuest_ForestBow, .@k+1;
        next;
        mesn;
        mesq lg("Sorry, son. I know how hard this is. But this is teaching you a valuable lesson, your eye will be more sharp for quality wood from now on.");
        next;
    }        

    goto L_Loop;

/* Copy-paste from TMW Org.
   I'll uncomment and rewrite when time comes.

L_Shield_state_0:
    mesn "Jack, the Lumberjack";
    mes "\"I have an idea. What would you say about a new shield?\"";
    next;
    menu
        "No thanks.", L_Close,
        "Yes, please!", L_Yes;

L_Yes:
    mesn "Jack, the Lumberjack";
    mes "\"All I need is " + @RAWLOGS_AMOUNT + " raw logs. This needn't be high quality wood; pretty much any log you can find should work. Oh, and I'll also need " + @SHIELD_COST + " GP for other materials.\"";
    next;
    @Q_Woodenshield = 2;
    goto L_Close;

L_Shield_state_2:
    mesn "Jack, the Lumberjack";
    mes "\"Do you have the " + @RAWLOGS_AMOUNT + " raw logs and " + @SHIELD_COST + " GP for the shield?\"";
    menu
        "Here it is.", L_Next10,
        "I'll come back later.", L_Close;

L_Next10:
    if (countitem("RawLog") < @RAWLOGS_AMOUNT)
        goto L_Not_enough_logs;
    if (Zeny < @SHIELD_COST)
        goto L_Not_enough_money;
    getinventorylist;
    if (@inventorylist_count == 100)
        goto L_TooMany;
    delitem "RawLog", @RAWLOGS_AMOUNT;
    Zeny = Zeny - @SHIELD_COST;
    getexp @QUEST_SHIELD_EXP, 0;
    getitem "WoodenShield", 1;
    @Q_Woodenshield = 3;
    mesn "Jack, the Lumberjack";
    mes "\"Have a seat.\"";
    mes "Jack saws the logs into pieces and then sands them until they are smooth to the touch.";
    mes "Applying some strong-smelling liquid, he tans them to a darker hue.";
    next;
    mesn "Jack, the Lumberjack";
    mes "Grabbing one of two leftover pieces, he begins to carve it into a round shape, then repeats this with the second piece – shield handles from what you can tell.";
    next;
    mesn "Jack, the Lumberjack";
    mes "Meanwhile, the sun has dried the other pieces. Jack places them next to each other, adds a frame, and nails everything together.";
    mes "The resulting shield looks usable already, but Jack applies another liquid to it and leaves it to dry for a few moments.";
    next;
    mesn "Jack, the Lumberjack";
    mes "Finally, he hands the shield to you.";
    mes "\"Enjoy your new shield!\"";
    mes "[" + @QUEST_SHIELD_EXP + " experience points]";
    next;
    goto L_Close;

L_Not_enough_logs:
    mesn "Jack, the Lumberjack";
    mes "\"You don't have enough wood for me to craft this shield; I need a total of " + @RAWLOGS_AMOUNT + " raw logs.\"";
    goto L_Close;

L_Not_enough_money:
    mesn "Jack, the Lumberjack";
    mes "\"I'm afraid that you don't have enough gold. I need " + @SHIELD_COST + " GP to finish your shield.\"";
    goto L_Close;

L_TooMany:
    mesn "Jack, the Lumberjack";
    mes "\"You don't have enough room to carry the shield. Come back when you do.\"";
    goto L_Close;

L_Shield_state_3:
    mesn "Jack, the Lumberjack";
    mes "\"I hope that my shield will serve you well!\"";
    next;
    if (@inspector != 1)
        goto L_Made_Shield;
    menu
        "Me too.", L_Made_Shield,
        "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;

L_NohMask_Ask:
    menu
        "I'll keep that in mind.", L_Close,
        "I heard you aren't delivering any more living wood. Why not?", L_Next,
        "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;

L_NohMask_Answer:
    mesn "Jack, the Lumberjack";
    mes "\"Sorry, no.\"";
    goto L_Close;

L_Made_Shield:
    mesn "Jack, the Lumberjack";
    mes "\"Speaking of that shield...\"";
    mes "\"It has put me behind on all these new Nivalis orders, now that the ship is running there.\"";
    next;
    mes "\"Care to help out? I'll pay you for your time.\"";
    goto L_Daily;

L_Daily:
    @dq_level = 30;
    @dq_cost = 25;
    @dq_count = 30;
    @dq_name$ = "RawLog";
    @dq_friendly_name$ = "raw logs";
    @dq_money = 4000;
    @dq_exp = 4000;

    callfunc "DailyQuest";

    next;

    mesn "Jack, the Lumberjack";
    mes "\"Check back with me tomorrow, and I'll let you know if I need any help with that shipment.\"";

    goto L_Close;
*/

L_Close:
    close;

}