summaryrefslogtreecommitdiff
path: root/world/map/npc/026-1/headless_man.txt
blob: 96c8cd49c248a3c660cdc726202397ee088618e9 (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
// author: TheKandiman, input from Jenalya and Pjotr Orial
// simple quest for headless man in gy inn
// state 0: first contact
// state 1: quest accepted
// state 2: items delivered, return for reward and followup story
// state 3: quest completed

026-1,34,30,0|script|Thurstan|318
{
    set @Graveyard_Inn_MASK, NIBBLE_6_MASK;
    set @Graveyard_Inn_SHIFT, NIBBLE_6_SHIFT;

    set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);

    set @Wisp_Powder, 50;
    set @Polt_Powder, 50;
    set @Spec_Powder, 50;
    set @Iron_Pot, 50;
    set @Conc_Pot, 30;
    set @Red_Dye, 50;
    set @Yellow_Dye, 50;
    set @LB_Dye, 50;

    set @Glue_Exp, 50000;

    if (@state >= 3) goto L_Final;
    if (@state == 2) goto L_Quest_finished;
    if (@state == 1) goto L_Quest_progress;

    mes "You see a man, propped up against the foot of the tree.";
    mes "In his hand, he is holding what you assume to be his own head.";
    next;
    mes "You jump back a bit, startled, as the head starts talking to you!";
    mes "It's a little strange watching him talk, but it's better than looking at what's left of his neck.";
    next;
    if (BaseLevel < 85)
        goto L_greet;
    mes "[Headless Man]";
    mes "\"Hello. My name is Thurstan. Could I ask your assistance with something? I seem to be in a spot of difficulty.\"";
    menu
        "I'll listen, just keep that thing from dripping on me.", L_Quest_ask,
        "Ack, a bloody talking head!  Gross, no way!", L_Close;

L_greet:
    mes "[Headless Man]";
    mes "\"Greetings!  Do you have any duck tape?\"";
    goto L_Close;

L_Quest_ask:
    mes "[Thurstan]";
    mes "\"A little while ago there was a patron visiting the inn...I can't remember his name now. He noticed this predicament I am in and offered to help me. He told me that he was an alchemist and that he had a recipe for an adhesive that would keep my head where it's supposed to be. Unfortunately, he wasn't able to stay long enough to gather all the ingredients for the spell, so he gave me the recipe instead. However, it's rather hard to gather things when I have to carry it around all day.\"";
    next;
    mes "[Thurstan]";
    mes "\"I have a list of items and how many of each are needed. Would you mind gathering them for me?\"";
    menu
        "Lay it on me, Mr. Noggin!", L_Quest_start,
        "Sorry, I'm kinda busy with, you know, living.", L_Quest_no;

L_Quest_start:
    mes "[Thurstan]";
    mes "\"Great! I will need the following things.\"";
    mes "\"" + @Wisp_Powder + " [@@"+WispPowder+"|@@],\"";
    mes "\"" + @Polt_Powder + " [@@"+PoltergeistPowder+"|@@],\"";
    mes "\"" + @Spec_Powder + " [@@"+SpectrePowder+"|@@],\"";
    mes "\"" + @Iron_Pot + " [@@"+IronPotion+"|@@],\"";
    mes "\"" + @Conc_Pot + " [@@"+ConcentrationPotion+"|@@],\"";
    mes "\"" + @Red_Dye + " vials of [@@"+RedDye+"|@@],\"";
    mes "\"" + @Yellow_Dye + " vials of [@@"+YellowDye+"|@@],\"";
    mes "\"and...\"";
    mes "\"" + @LB_Dye + " vials of [@@"+LightBlueDye+"|@@],\"";
    next;
    mes "[Thurstan]";
    mes "\"My friend also said that I should use a metal bowl instead of a wooden one. I don't have one and I think a cauldron from the kitchen would be too big. Perhaps we could use an [@@"+InfantryHelmet+"|@@] to serve that task.\"";
    next;
    mes "[Thurstan]";
    mes "\"He also said that a [@@"+PinkieHat+"|@@] is a perfect whisk for stirring this recipe since the glue does not stick to it.\"";
    next;
    mes "[Thurstan]";
    mes "\"I know it probably doesn't seem like that much to you, but it is a really big deal for me. I will try to find something to compensate you for your efforts.\"";
    set @state, 1;
    callsub S_Update_Mask;
    goto L_Close;

L_Quest_no:
    mes "[Thurstan]";
    mes "\"Very well. Just don't come looking to me when your own head falls off!\"";
    goto L_Close;

L_Quest_progress:
    mes "[Thurstan]";
    mes "Have you managed to find those items yet?\"";
    menu
        "Yes, here you go!", L_Quest_check,
        "What was I supposed to get again?", L_Quest_items,
        "No, I'm still working on it.", L_Close;

L_Quest_check:
    if (countitem("WispPowder") < @Wisp_Powder
        || countitem("PoltergeistPowder") < @Polt_Powder
        || countitem("SpectrePowder") < @Spec_Powder
        || countitem("IronPotion") < @Iron_Pot
        || countitem("ConcentrationPotion") < @Conc_Pot
        || countitem("RedDye") < @Red_Dye
        || countitem("YellowDye") < @Yellow_Dye
        || countitem("LightBlueDye") < @LB_Dye
        || countitem("PinkieHat") < 1
        || countitem("InfantryHelmet") < 1)
            goto L_Quest_notenough;

    delitem "WispPowder", @Wisp_Powder;
    delitem "PoltergeistPowder", @Polt_Powder;
    delitem "SpectrePowder", @Spec_Powder;
    delitem "IronPotion", @Iron_Pot;
    delitem "ConcentrationPotion", @Conc_Pot;
    delitem "RedDye", @Red_Dye;
    delitem "YellowDye", @Yellow_Dye;
    delitem "LightBlueDye", @LB_Dye;
    delitem "PinkieHat", 1;
    delitem "InfantryHelmet", 1;
    getexp @Glue_Exp, 0;
    mes "[Thurstan]";
    mes "\"Excellent, excellent!\"";
    mes "";
    mes "Thurstan takes your ingredients and seperates them into little piles according to some complex formula he is reading, seemingly from the tops of his shoes.";
    next;
    mes "[Thurstan]";
    mes "\"Now if I could prevail upon you to mix the ingredients according to the instructions I have here, I would be greatly indebted.\"";
    next;
    mes "You mix the powders together in the Infantry bowl, adding potions and dyes as instructed. Gradually, the concoction starts to get tacky and takes on a hue similar to Thurstan's skin.";
    mes "You can see him starting to get excited beside you...";
    next;
    mes "[Thurstan]";
    mes "\"Oh this is perfect!  I'll be back in action in no time!\"";
    next;
    mes "Thurstan covers the base of his neck with a thick coat of the glue using his free hand. He then lifts his head in both hands, places it on the layer of adhesive, and makes some minor adjustments to the position. He mutters an incantation that you can't make out and the wound across his neck seems to fade away.";
    misceffect sfx_magic_transmute;
    next;
    mes "Thurstan is practically jumping for joy now.";
    mes "";
    mes "[Thurstan]";
    mes "\"Thank you so much!  That is such a weight on my shoulders!  Now that I have some mobility back, let me see what I can do to repay you. Would you mind coming back in a few minutes?\"";
    set @state, 2;
    callsub S_Update_Mask;
    goto L_Close;

L_Quest_notenough:
    mes "Thurstan quickly looks through the items you've brought.";
    mes "[Thurstan]";
    mes "\"It seems you are missing a few things. Please come back once you have everything on the list.\"";
    goto L_Close;

L_Quest_items:
    mes "[Thurstan]";
    mes "\"" + @Wisp_Powder + " [@@"+WispPowder+"|@@],\"";
    mes "\"" + @Polt_Powder + " [@@"+PoltergeistPowder+"|@@],\"";
    mes "\"" + @Spec_Powder + " [@@"+SpectrePowder+"|@@],\"";
    mes "\"" + @Iron_Pot + " [@@"+IronPotion+"|@@],\"";
    mes "\"" + @Conc_Pot + " [@@"+ConcentrationPotion+"|@@],\"";
    mes "\"" + @Red_Dye + " vials of [@@"+RedDye+"|@@],\"";
    mes "\"" + @Yellow_Dye + " vials of [@@"+YellowDye+"|@@],\"";
    mes "\"" + @LB_Dye + " vials of [@@"+LightBlueDye+"|@@],\"";
    mes "\"We'll also need 1 [@@"+InfantryHelmet+"|@@] to use as a bowl for mixing everything together and 1 [@@"+PinkieHat+"|@@] as whisk for stirring since the glue does not stick to it.\"";
    goto L_Close;

L_Quest_finished:
    mes "[Thurstan]";
    mes "\"Thank you for all your help.\"";
    next;
    mes "[Thurstan]";
    mes "\"It worked well and the bond seemed to be holding for a while. Then I started feeling a strange tingling in my neck. I suppose that was the adhesive starting to dissolve. I was leaned over my trunk digging around for something appropriate to give you..Aaaand once again my head left it's proper place.\"";
    next;
    getinventorylist;
    if (@inventorylist_count == 100)
        goto L_Full_Inv;
    mes "[Thurstan]";
    mes "\"Please take this for your efforts. I got it in payment of some work I did protecting the pinkie population from a terrible scourge some time ago.\"";
    getitem "PinkieHelmet", 1;
    set @state, 3;
    callsub S_Update_Mask;
    goto L_Close;

L_Full_Inv:
    mes "[Thurstan]";
    mes "\"I'd like to give you something for your efforts, but you're carrying too much stuff.\"";
    goto L_Close;

L_Final:
    mes "[Thurstan]";
    mes "\"I guess I will need to find another way to re-attach my cranium. If you come across any good alchemists who might be able to help, please let me know.\"";
    goto L_Close;

L_Close:

    set @Graveyard_Inn_MASK, 0;
    set @Graveyard_Inn_SHIFT, 0;
    set @state, 0;
    set @Wisp_Powder, 0;
    set @Polt_Powder, 0;
    set @Spec_Powder, 0;
    set @Iron_Pot, 0;
    set @Conc_Pot, 0;
    set @Red_Dye, 0;
    set @Yellow_Dye, 0;
    set @LB_Dye, 0;
    set @Glue_Exp, 0;
    close;

S_Update_Mask:
    set QUEST_Graveyard_Inn,
        (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK))
            | (@state << @Graveyard_Inn_SHIFT);
    return;

}