summaryrefslogtreecommitdiff
path: root/world/map/npc/002-2/hetchel.txt
blob: 8aecea945b3b0021106742c903a2751b8ac7bc32 (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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
//  Hetchel the Silk Weaver
//  bh28
//  2013-03, GPLv2.
//
//  Hetchel is referred to by Lora Tay.
//  She weaves and sells standard double elbow square silk sheets.
//  She could also sell, dyed sheets, Silk robes from Lora Tay.
//  (6000 with cocoons, 40000 (?) with no cocoons).
//
//  @wg_state: variable indicating winter gloves status.
//  Lora Tay proposes silk Robe if (@wg_state>= 11).
//  @SHEET_COCOONS_NR:* Number of cocoons required per sheet.
//  Might ne calculated from @ROBE_COCOONS_NR/@ROBE_SHEETS_NR
//  Actually: 150∕6 = 25
//  @SHEET_ZENY      :* Money to pay per sheet: A sixth of 10000-2*500-6000
//  @SheetCount Number of sheets to buy (variable).
//
//  @silkpants_state: variable indicating silkpant quest status.

002-2,76,92,0|script|Hetchel|376
{
    set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT);
    set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
    set @SHEET_COCOONS_NR, 25;
    set @SHEET_ZENY, 500;
    set @spants_minlvl, 45;
    setarray @spants_req_hmn$, "Silk Cocoons", "Pieces of Cotton Cloth", "Silk Headbands";
    setarray @spants_req$, "SilkCocoon", "CottonCloth", "SilkHeadband";
    setarray @spants_req_amt, 154, 14, 2;
    set @spants_reward, 45000;
    set @spants_job_reward, 10000;
    set @SheetCount, 0;

    if (@wg_state < 11)
        goto L_WG_quest_not_done;
    if ( BaseLevel > @spants_minlvl && @spants_state < 1 ) goto L_Spants_Cry;
    if ( @spants_state == 1 ) goto L_Spants_Cry_2;
    if ( @spants_state == 2 ) goto L_Spants_Start;
    if ( @spants_state > 2 && @spants_state < 8 ) goto L_Spants_Steal;
    if ( @spants_state == 8 ) goto L_Spants_Make;

    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_main_menu;

L_WG_quest_not_done:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles.";
    mes "My best client is Lora Tay, at Dimond's.";
    mes "What can I do for you?\"";
    menu
        "Sorry to bother, I'm new to this country, just visting.", L_Close,
        "What are you selling?", L_main_menu;

L_Spants_Cry:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_Spants_Cry_Cont_1;

L_Spants_Cry_2:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_main_menu,
        "Hey you have been crying so badly, can I help you somehow?", L_Spants_Reply_Cry,
        "Give Hetchel something to dry her tears", L_Spants_Wipe_Tears;

L_Spants_Start:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_main_menu,
        "So you are looking for new goals in your life?", L_Spants_No_Cry;

L_Spants_Steal:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_main_menu,
        "About the Pants...", L_Spants_Steal_Cont;

L_Spants_Make:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello I am Hetchel, I weave fine textiles, what can I do for you?\"";
    menu
        "Sorry to bother, I'm just visiting.", L_Close,
        "I am looking for silk sheets, Lora Tay told me that I could find some in this market. Can you help?", L_main_menu,
        "Hey what about the Pants you were planning to make?", L_Spants_Make_Cont;

L_Spants_Cry_Cont_1:
    mes "You notice how the tiny woman blushes, she suddenly bursts into tears.";
    next;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Hello\"";
    mes "Hetchel hides her face in her hands";
    mes "";
    mes "";
    menu
        "\"Hey, what is the problem?\"", L_Spants_Reply_Cry,
        "Give Hetchel something to dry her tears", L_Spants_Wipe_Tears,
        "\"Oh really? Just sell me some Silk Sheets if you have them\"", L_main_menu;

L_Spants_Wipe_Tears:
    mes "Choose the item you want to give her.";
    next;
    cleararray @items$, "", getarraysize(@items$);
    cleararray @item_names$, "", getarraysize(@item_names$);
    setarray @items$, "RedCottonCloth", "GreenCottonCloth", "DarkBlueCottonCloth", "YellowCottonCloth", "LightBlueCottonCloth", "PinkCottonCloth", "BlackCottonCloth", "OrangeCottonCloth", "PurpleCottonCloth", "DarkGreenCottonCloth", "HitchhikersTowel", "WhiteHitchhikersTowel", "RedHitchhikersTowel", "GreenHitchhikersTowel", "BlueHitchhikersTowel", "YellowHitchhikersTowel", "PurpleHitchhikersTowel", "OrangeHitchhikersTowel", "PinkHitchhikersTowel", "TealHitchhikersTowel", "LimeHitchhikersTowel", "SnakeSkin", "LeatherPatch", "SnakeTongue", "MountainSnakeTongue", "GrassSnakeTongue", "CaveSnakeTongue", "BatWing", "RottenRags", "BrokenDoll", "RedDottedWrap", "BlueDottedWrap", "PurpleStripedWrap", "RedGoldenStripedWrap", "GreenRedStripedWrap", "YellowWrap", "WhiteWrap", "BlueWrap", "PurpleWrap", "GreenWrap", "Doll", "BookPage";
    setarray @item_names$, "Red Cotton Cloth", "Green Cotton Cloth", "Dark Blue Cotton Cloth", "Yellow Cotton Cloth", "Light Blue Cotton Cloth", "Pink Cotton Cloth", "Black Cotton Cloth", "Orange Cotton Cloth", "Purple Cotton Cloth", "Dark Green Cotton Cloth", "Hitchhiker's Towel", "White Hitchhiker's Towel", "Red Hitchhiker's Towel", "Green Hitchhiker's Towel", "Blue Hitchhiker's Towel", "Yellow Hitchhiker's Towel", "Purple Hitchhiker's Towel", "Orange Hitchhiker's Towel", "Pink Hitchhiker's Towel", "Teal Hitchhiker's Towel", "Lime Hitchhiker's Towel", "Snake Skin", "Leather Patch", "Snake Tongue", "Mountain Snake Tongue", "Grass Snake Tongue", "Cave Snake Tongue", "Bat Wing", "Rotten Rags", "Broken Doll", "Red Dotted Wrap", "Blue Dotted Wrap", "Purple Striped Wrap", "Red Golden Striped Wrap", "Green Red Striped Wrap", "Yellow Wrap", "White Wrap", "Blue Wrap", "Purple Wrap", "Green Wrap", "Doll", "Book Page";
    callfunc "DynamicItemMenu$";
    set @spants_wipe_thingy$, @item$;
    if (@spants_wipe_thingy$ == "") goto L_Close;
    if (countitem(@spants_wipe_thingy$) < 1) goto L_Spants_No_Item;
    if (@spants_wipe_thingy$ == "RedCottonCloth") goto L_Spants_Wipe_Tears_Cont;
    if (@spants_wipe_thingy$ == "RedHitchhikersTowel") goto L_Spants_Wipe_Tears_Towel;
    mes "Hetchel looks at you, then looks at the" + @spants_wipe_thingy$ + ".";
    mes "She hangs her head and weeps more";
    mes "Red is the only color I have ever loved, bring me something red to dry my tears";
    goto L_Close;

L_Spants_Wipe_Tears_Towel:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"No, I recognize this towel, it is one of those warping towels, are you trying to mess with me?\"";
    goto L_Close;

L_Spants_No_Item:
    mes "Oh you do not have it.";
    goto L_Close;

L_Spants_Wipe_Tears_Cont:
    mes "Hetchel dries her tears with the Red Piece of Cloth you gave her.";
    mes "This seems to have consoled her.";
    delitem "RedCottonCloth", 1;
    set @spants_state, 2;
    callsub S_Update_Spants;
    goto L_Spants_No_Cry;

L_Spants_No_Cry:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Oh thank you my dear friend.";
    mes "Yes, to some extent.";
    next;
    mes "I am just so sad because I realized that this is going to be the thing I will be doing for the rest of my life\"";
    menu
        "\"You are still young, Hetchel, You can still accomplish things\"", L_Spants_Cry_Cont_2,
        "\"Yes, you are probably correct.\"", L_Close;

L_Spants_Cry_Cont_2:
    mes "[Hetchel the weaver]";
    mes "";
    mes "Hetchel thinks for a while";
    mes "";
    mes "\"Oh my friend, I have been dreaming of making a garment of my own.";
    mes "It always bothered me to see all those wizards and witches here being naked under their cloaks\"";
    mes "\"They must be so embarrassed - they are true heroes to give up their dignity to be able to fight the perils of this world\"";
    mes "Hetchel sobs";
    menu
        "\"So you want to make pants for mages?\"", L_Spants_Cry_Cont_3,
        "\"This sounds ridiculous. Good Bye.\"", L_Close;

L_Spants_Cry_Cont_3:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Ok, so I figured I could make some trousers like Lora Tay makes but from the much finer Material the Silk Worms are making for us\"";
    mes "\"But I really need the base plans for the trousers, otherwise I do not know how to attempt this.";
    mes "Can you get me those plans from her?\"";
    menu
        "\"No, sorry I am too busy for that\"", L_Close,
        "\"Of course!\"", L_Spants_Cry_Cont_4;

L_Spants_Cry_Cont_4:
    set @spants_state, 3;
    callsub S_Update_Spants;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Oh wait! I am not sure if it is such a good idea to ask her about that, I think she would not give the plans to you anyway.";
    mes "Maybe you can find a way to get those plans on a different way?";
    mes "I think there are some people in Hurnscald who have their means of getting you every possible item there is\"";
    next;
    mes "[Hetchel the weaver]";
    mes "";
    mes "Please please please - I need those plans";
    goto L_Close;

L_Spants_Reply_Cry:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"...\"";
    set @spants_state, 1;
    callsub S_Update_Spants;
    goto L_Close;


L_Spants_Steal_Cont:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Have you gotten hold of the plans?\"";
    menu
        "Yes I have them somewhere here", L_Spants_Steal_Cont2,
        "No, not yet", L_Close;

L_Spants_Steal_Cont2:
    if @spants_state < 7 goto L_Spants_No_Item;
    set @spants_state, 8;
    callsub S_Update_Spants;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Oh this is miraculous\"";
    mes "";
    mes "Hetchel sheds some tears of joy";
    next;
    mes "You hand her the crumpled plans Crastur the Ugly gave you.";
    next;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"I need to figure out how to do this now... \"";
    next;
    mes "Hetchel adjusts her glasses and reads carefully";
    next;
    mes "She seems to be very busy, maybe you should come back later.";
    goto L_Close;

L_Spants_Make_Cont:
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Yes, I already made a prototype but it cost me a lot of time and effort.";
    mes "I can give it to you if you are willing to pay for my expenses though.\"";
    menu
        "What do you want for those silken pants?", L_Spants_Make_Cont_2,
        "No, I am not particularly interested.", L_Close;

L_Spants_Make_Cont_2:
    if(getarraysize(@spants_req_amt) < 3 || getarraysize(@spants_req$) < 3 || getarraysize(@spants_req_hmn$) < 3)
        goto L_Spants_Error;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"I need you to bring me " + @spants_req_amt[0] +" "+ @spants_req_hmn$[0] + ", " + @spants_req_amt[1] +" "+ @spants_req_hmn$[1] + " and " + @spants_req_amt[2] +" "+ @spants_req_hmn$[2];
    next;
    mes "You will not have to pay for my time, I am so proud to have accomplished this on my own!\"";
    menu
        "\"I have those items with me\"", L_Spants_Pay,
        "\"I am still looking for them\"", L_Close,
        "\"What do you need again?\"", L_Spants_Make_Cont_2;

L_Spants_Pay:
    if (countitem(@spants_req$[0]) < @spants_req_amt[0] || countitem(@spants_req$[1]) < @spants_req_amt[1] || countitem(@spants_req$[2]) < @spants_req_amt[2])
        goto L_Spants_No_Item;
    getinventorylist;
    if (@inventorylist_count == 100) goto L_TooMany;
    mes "Hetchel takes your items.";
    delitem @spants_req$[0], @spants_req_amt[0];
    delitem @spants_req$[1], @spants_req_amt[1];
    delitem @spants_req$[2], @spants_req_amt[2];
    getitem "SilkPants", 1;
    set @spants_state, 9;
    callsub S_Update_Spants;
    next;
    mes "[Hetchel the weaver]";
    mes "";
    mes "\"Here are your pants my dear.";
    mes "Keep them safe I do not know if I will ever try this again.\"";
    getexp @spants_reward, @spants_job_reward;
    goto L_Close;

L_Spants_Error:
    mes "Something went wrong in the script, please inform a developer about that";
    close;

L_main_menu:
    mes "[Hetchel]";
    mes "\"I have some silk sheets: double-elbow squares.\"";
    menu
        "I'm not interested at the moment, maybe later; thanks anyway.", L_Close,
        "Can I buy some?", L_Next;
//        "Do you have a silk robe I could buy?", L_robe,
//        "Goodbye.", L_Close;

L_Next:
    mes "[Hetchel]";
    mes "";
    mes "\"Sure but you need to provide raw materials.";
    mes "I'll need " + @SHEET_COCOONS_NR +" silk cocoons per sheet,";
    mes "and also " + @SHEET_ZENY +" GP per sheet for my work.\"";
    next;
    if (countitem("SilkCocoon") == 0)
        goto L_sheet_no_cocoon;
    goto L_sheet_menu;

L_sheet_menu:
    menu
        "I have what you asked for.", L_Next1,
        "Sorry I didn't pay attention enough, what do you need?", L_how_many_cocoons,
        "Oops! Sorry, I'll come back soon with them.", L_Close;

L_Next1:
    mes "[Hetchel]";
    mes "";
    mes "\"How many would you like?\"";
    input @SheetCount;
    if (@SheetCount == 0)
        goto L_zero_sheet;
    if (countitem("SilkCocoon") < @SheetCount * @SHEET_COCOONS_NR)
        goto L_sheet_missing_cocoons;
    if (Zeny < @SheetCount * @SHEET_ZENY)
        goto L_sheet_missing_Zeny;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("SilkSheet") < 1 && countitem("SilkCocoon") > @SheetCount * @SHEET_COCOONS_NR)
        goto L_TooMany;
    set Zeny, Zeny - @SheetCount * @SHEET_ZENY;
    delitem "SilkCocoon", @SheetCount * @SHEET_COCOONS_NR;
    getitem "SilkSheet", @SheetCount;
    mes "[Hetchel]";
    mes "";
    mes "\"Thank you, I hope the sheets will fit your needs.";
    mes "Please greet Lora for me when you see her.\"";
    emotion EMOTE_HAPPY;
    goto L_Close;

L_sheet_missing_cocoons:
    mes "[Hetchel]";
    mes "";
    mes "\"I'm sorry, but I need " + @SheetCount * @SHEET_COCOONS_NR + ", not " + countitem("SilkCocoon") + ".\"";
    goto L_Close;

L_sheet_missing_Zeny:
    mes "[Hetchel]";
    mes "";
    mes "\"No, no no. The way this works is that you give me the GP first and I give you the sheets afterwards.";
    mes "You're " + (@SheetCount * @SHEET_ZENY - Zeny) + " GP short, so come back when you can afford the sheets you asked for!\"";
    goto L_Close;

L_how_many_cocoons:
    mes "[Hetchel]";
    mes "";
    mes "\"I need an average of " + @SHEET_COCOONS_NR + " cocoons per sheet";
    mes "and also " + @SHEET_ZENY + " GP per sheet for my work.\"";
    next;
    goto L_sheet_menu;

L_sheet_no_cocoon:
    mes "[Hetchel]";
    mes "";
    mes "\"You don't have any cocoon? I'm sorry I can't do anything for you.\"";
    menu
        "I'll seek for them.", L_Close,
        "Where can I get cocoons?", L_Next2;

L_Next2:
    mes "[Hetchel]";
    mes "\"Silk cocoons come from Silkworms. Silkworms live in the woodland area around Hurnscald.";
    mes "Silkworms like especially woods and dark areas. You can go there by ferry.\"";
    goto L_Close;

//L_robe:
//    mes "[Hetchel]";
//    mes "\"I am not a seamstress but I have a few silk robes from Lora Tay left.";
//    mes "It is not your size as Lora made them for me, but Tondar was kind enough";
//    mes "to cast a spell on it, so that it will fit to you as soon as you wear it.";
//    mes "However his prices are not that low.\"";
//    next;
//    goto L_main_menu;

L_zero_sheet:
    mes "[Hetchel]";
    mes "";
    mes "\"It's the best way to get quickly served!\"";
    goto L_Close;

L_TooMany:
    mes "[Hetchel]";
    mes "";
    mes "\"Your bag hasn't room enough. Store some things and come back.\"";
    goto L_Close;

S_Update_Spants:
    set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
    return;

L_Close:
    set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
    set @wg_state, 0;
    set @spants_state, 0;
    set @spants_minlvl, 0;
    set @spants_reward, 0;
    set @spants_job_reward, 0;
    set @spants_wipe_thingy, "";
    set @SHEET_COCOONS_NR, 0;
    set @SHEET_ZENY, 0;
    set @SheetCount, 0;
    set @wg_state, 0;
    cleararray @items$, "", getarraysize(@items$);
    cleararray @item_names$, "", getarraysize(@item_names$);
    close;
}

002-2,73,95,0|script|HetchelDebug|376
{
set @wg_state, ((QUEST_WG_state & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @spants_state, ((QUEST_WG_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);

mes "Lora Tay Quest State: "+ @wg_state;
mes "Silk Pants Quest State: "+ @spants_state;

menu
    "Set Lora Tay Quest State", L_Lora_Tay,
    "Set Silk Pants Quest State", L_Spants,
    "Close", L_Close;

L_Lora_Tay:
    mes "Set Lora Tay Visited State (0 - reset , 11 - enough for SilkPants Quest)";
    input @wg_state;
    goto L_Close;

L_Spants:
    mes "Set SilkPants Quest State (0 - reset)";
    input @spants_state;
    goto L_Close;

L_Close:
    set QUEST_WG_state, (QUEST_WG_state & ~(BYTE_0_MASK) | (@wg_state << BYTE_0_SHIFT));
    set @wg_state, 0;
    set QUEST_WG_state, (QUEST_WG_state & ~(NIBBLE_2_MASK) | (@spants_state << NIBBLE_2_SHIFT));
    set @spants_state, 0;
    close;

OnInit:
    if (!debug)
        disablenpc "HetchelDebug";
    end;
}