summaryrefslogtreecommitdiff
path: root/npc/027-2_Caretakers_House/headless_man.txt
blob: 21e49f7263f6064efecc1f39451d63499b4bbc31 (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
// 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

027-2.gat,22,76,0	script	Thurstan	318,{

	if (Sex == 0) set @madamsir$, "Madam";
	if (Sex == 1) set @madamsir$, "Sir";

	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, 10; // TODO: set proper values for powders and dyes
	set @Polt_Powder, 10;
	set @Spec_Powder, 10;
	set @Iron_Pot, 10;
	set @Conc_Pot, 10;
	set @Red_Dye, 2;
	set @Yellow_Dye, 2;
	set @LB_Dye, 2;

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

	mes "You see a man, propped up against the foot of the bed.";
	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 " + @madamsir$ + ".  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_Quest_close;

L_greet:

	mes "[Headless Man]";
	mes "\"Greetings " + @madamsir$ + "!  Do you have any duck tape?\"";
	close;

L_Quest_ask:

	mes "[Thurstan]";
	mes "\"I am trying to get ingredients to make an adhesive that my alchemist friend told me about.  I want to see if it will work to keep my head where it's supposed to be.  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_close:

	close;

L_Quest_start:

	mes "[Thurstan]";
	mes "\"Great! I will need the following things.\"";
	mes "\"" + @Wisp_Powder + " [Wisp Powder],\"";
	mes "\"" + @Polt_Powder + " [Poltergeist Powder],\"";
	mes "\"" + @Spec_Powder + " [Spectre Powder],\"";
	mes "\"" + @Iron_Pot + " [Iron Potion],\"";
	mes "\"" + @Conc_Pot + " [Concentration Potion],\"";
	mes "\"" + @Red_Dye + " vials of [Red Dye],\"";
	mes "\"" + @Yellow_Dye + " vials of [Yellow Dye],\"";
	mes "\"and...\"";
	mes "\"" + @LB_Dye + " vials of [Light Blue Dye],\"";
	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 [Infantry Helmet] to serve that task.\"";
	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;
	close;

L_Quest_no:

	mes "[Thurstan]";
	mes "\"Very well.  Just don't come looking to me when your own head falls off!\"";
	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_Quest_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("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 "InfantryHelmet", 1;
	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.";
	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;
	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.\"";
	close;

L_Quest_items:

	mes "[Thurstan]";
	mes "\"" + @Wisp_Powder + " [Wisp Powder],\"";
	mes "\"" + @Polt_Powder + " [Poltergeist Powder],\"";
	mes "\"" + @Spec_Powder + " [Spectre Powder],\"";
	mes "\"" + @Iron_Pot + " [Iron Potion],\"";
	mes "\"" + @Conc_Pot + " [Concentration Potion],\"";
	mes "\"" + @Red_Dye + " vials of [Red Dye],\"";
	mes "\"" + @Yellow_Dye + " vials of [Yellow Dye],\"";
	mes "\"" + @LB_Dye + " vials of [Light Blue Dye],\"";
	mes "\"We'll also need 1 [Infantry Helmet] to use as a bowl for mixing everything together.\"";
	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;
	set @state, 3;
	callsub S_Update_Mask;
	mes "[Thurstan]";
	mes "\"Please take this for your efforts.\"";
	//TODO: Set appropriate reward
	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.\"";
	close;

S_Update_Mask:

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

}