summaryrefslogtreecommitdiff
path: root/npc/003-1_Beach/stranger.txt
blob: 1eb98d1fdca9a52f0a06af799a2b4bcb332b2cd2 (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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
//003-1.gat,35,25,0	script	Stranger	192, {

	set @month, 5;
	set @start_day, 18;
//TODO	set @end_day, 25;
	set @end_day, 22;
	set @IRONINGOT, 5;
	set @PINKANTENNA, 21;
	set @cost, 500;

//TODO: uncomment
	if (FLAGS & FLAG_TOWEL_COMPLETED) goto L_Event_Done;
//	if (gettime(6) != @month) goto L_No_Event;
//	if (gettime(5) < @start_day) goto L_No_Event;
//	if (gettime(5) > @end_day) goto L_No_Event;
//	if ((gettimetick(2)-TUT_var < 4*7*86400) || (baselevel < 42 )) //player must be created at least 4 weeks ago and at least level 42
//		goto L_No_Event;
//	if ((gettime(5) == @end_day) && (FLAGS & FLAG_TOWEL_HELPED)) goto L_Towel;
	if (FLAGS & FLAG_TOWEL_HELPED) goto L_Towel; // TODO: remove
	if (FLAGS & FLAG_TOWEL_HELPED) goto L_Come_Back;

	mes "[Stranger]";
	mes "\"Hello, hello! It's great to see you. Maybe you can help me with a little problem I have.\"";
	next;
	mes "\"I need some materials to repair my spacesh- ahm, it's not important why I need it.\"";
	next;
	mes "\"Anyway, I'd be really happy if you can give me " + @IRONINGOT + " [Iron Ingot]s and " + @PINKANTENNA + " [Pink Antenna]s.\"";
	next;
	mes "\"Do you have that for me?\"";
	menu
		"Yeah, sure.",L_Items,
		"No.",L_Close;
	close;

L_Items:
	if (countitem("IngotIron") < @IRONINGOT) goto L_No_Item;
	if (countitem("PinkAntenna") < @PINKANTENNA) goto L_No_Item;
	delitem "IngotIron", @IRONINGOT;
	delitem "PinkAntenna", @PINKANTENNA;
	set FLAGS, FLAGS | FLAG_TOWEL_HELPED;

	mes "[Stranger]";
	mes "\"Great! Thank you!\"";
	next;
	if (gettime(5) == @end_day) goto L_Towel;
L_Come_Back:
	mes "\"Excuse me, I have a lot of work to do now. Maybe you want to come back soon to celebrate Towel Day with me.\"";
	close;

L_Towel:
	getinventorylist;
	if (@inventorylist_count == 100) goto L_Full_Inv;
	mes "[Stranger]";
	mes "\"Today is a very special day - Towel Day.\"";
	next;
	mes "\"To celebrate this I'll ask you some questions about my favourite book, The Hitchhiker's Guide to the Galaxy. If you can answer them, I'll give you something very useful.\"";
	next;
	mes "";
	mes "[Server]";
	mes "The answers might need to have whitespaces.";
	mes "If you're using a client which confirms your answer when pressing space, change this setting before continuing.";
	mes "";
	next;
	mes "[Stranger]";
	mes "\"The first one is easy.\"";
	next;

	setarray @easy_questions$,
	"What two words are written in big friendly letters on the back cover?",
	"What's the name of the paranoid robot?",
	"What is the answer to life, the universe and everything?",
	"What is the first name of the author of the hitchhikers guide?",
	"What is the last name of the author of the hitchhikers guide?",
	"Who is the male human protagonist?",
	"Who is the female human protagonist?",
	"According to the Guide, space is ____?",
	"What is the name of the spaceship which was stolen from the president of the universe?",
	"How many heads does Zaphod Beeblebrox have?";

	setarray @easy_answers_amount,2,2,2,2,2,4,4,2,4,2;

	set @random, rand(10);
	mes "\"" + @easy_questions$[@random] + "\"";
	input @answer$;

	if (@easy_answers_amount[@random] < 4)
		goto L_Easy_Skip4;
	if (("###" + @answer$ == getspellinvocation("towelanswer0" + @random + "d")))
		goto L_Right_Answer_Easy;
L_Easy_Skip4:
	if (@easy_answers_amount[@random] < 3)
		goto L_Easy_Skip3;
	if (("###" + @answer$ == getspellinvocation("towelanswer0" + @random + "c")))
		goto L_Right_Answer_Easy;
L_Easy_Skip3:
	if (("###" + @answer$ == getspellinvocation("towelanswer0" + @random + "a")) || ("###" + @answer$ == getspellinvocation("towelanswer0" + @random + "b")))
		goto L_Right_Answer_Easy;

	goto L_Wrong_Answer;

L_Right_Answer_Easy:
	mes "[Stranger]";
	mes "\"You're absolutely right. The next one will be more tricky.\"";
	next;

	setarray @medium_questions$,
	"What is the name of the rock group claiming to be the loudest band in the universe?",
	"What star is near Ford's home planet?s",
	"Which country does the human protagonist come from?",
	"What is the name of the computer on The Heart of Gold?",
	"What color has a Babel Fish?",
	"What did the bowl of petunias think?",
	"What body orifice should a babel fish be inserted in to work properly?",
	"What is the name of the super computer?",
	"What were the second most intelligent creatures on Earth?",
	"What race creates the worst poetry in universe?",
	"What is the name of the Vogon home planet?",
	"What is the name of the Restaurant at the End of the Universe?";

	setarray @medium_answers_amount,2,2,2,2,2,3,2,2,4,4,2,2;

	set @random, rand(12);
	mes "\"" + @medium_questions$[@random] + "\"";
	input @answer$;

	if (@medium_answers_amount[@random] < 4)
		goto L_Medium_Skip4;
	if (("###" + @answer$ == getspellinvocation("towelanswer1" + @random + "d")))
		goto L_Right_Answer_Medium;
L_Medium_Skip4:
	if (@medium_answers_amount[@random] < 3)
		goto L_Medium_Skip3;
	if (("###" + @answer$ == getspellinvocation("towelanswer1" + @random + "c")))
		goto L_Right_Answer_Medium;
L_Medium_Skip3:
	if (("###" + @answer$ == getspellinvocation("towelanswer1" + @random + "a")) || ("###" + @answer$ == getspellinvocation("towelanswer1" + @random + "b")))
		goto L_Right_Answer_Medium;

	goto L_Wrong_Answer;

L_Right_Answer_Medium:
	mes "[Stranger]";
	mes "\"Not bad, not bad. Let's see if you can answer an even more difficult one.\"";
	next;

	setarray @hard_questions$,
	"Drinking what drink is like having your brain smashed out by a slice of lemon wrapped round a large gold brick?",
	"How many beers should you drink before hitchhiking?",
	"What initials are carved into Zaphod Beeblebrox's brain?",
	"What is Ford Prefect's nickname?",
	"Who is responsible for the fjords of Norway?",
	"What game is played on earth as a relict of memories to an ancient war?",
	"What is the name of the triple-breasted whore from Eroticon VI?",
	"Who will insult every living being in the universe, because he is immortal and getting bored?",
	"What is the name of the piteous creature that is continually reincarnated and subsequently killed, each time unknowingly, by Arthur Dent?";

	setarray @hard_answers_amount,4,2,2,2,2,2,2,4,2;

	set @random, rand(9);
	mes "\"" + @hard_questions$[@random] + "\"";
	input @answer$;

	if (@hard_answers_amount[@random] < 4)
		goto L_Hard_Skip4;
	if (("###" + @answer$ == getspellinvocation("towelanswer2" + @random + "d")))
		goto L_Right_Answer_Hard;
L_Hard_Skip4:
	if (@hard_answers_amount[@random] < 3)
		goto L_Hard_Skip3;
	if (("###" + @answer$ == getspellinvocation("towelanswer2" + @random + "c")))
		goto L_Right_Answer_Hard;
L_Hard_Skip3:
	if (("###" + @answer$ == getspellinvocation("towelanswer2" + @random + "a")) || ("###" + @answer$ == getspellinvocation("towelanswer2" + @random + "b")))
		goto L_Right_Answer_Hard;

	goto L_Wrong_Answer;

L_Right_Answer_Hard:
	mes "[Stranger]";
	mes "\"Unbelievable! You're really a wise person.\"";
	next;
	mes "\"One last question, but this shouldn't be a problem for you.\"";
	next;
	mes "\"What is the most important item for every hitchhiker to have?\"";
	input @answer$;
	if (@answer != "Towel" && @answer != "towel")
		goto L_Wrong_Answer;

	mes "TODO: remove. again?";
	menu
		"Yes.",L_Towel,
		"Go on.",-,
		"Close.",L_Close;

	mes "[Stranger]";
	mes "\"There you are! A towel is really the most important item for a hitchhiker to have.\"";
	next;
	mes "\"Please take this.\""; // no full inventory check, this is done before the game
	getitem "GreyWarpTowel", 1;
	set FLAGS, FLAGS | FLAG_TOWEL_COMPLETED;
	next;
	mes "[Stranger]";
	mes "\"This towel is even more useful than usual towels are. If you change its color, it uses a special techno-, ahm, let's say, it can help you to get to other places.\"";
	next;
	mes "\"Bring me some powder made from gemstones and a bottle of water, and I can prepare it for you.\"";
	close;

L_No_Event:
	mes "[Stranger]";
	mes "\"Hello. Isn't this a beautiful place?\"";
	next;
	mes "\"And it really comes in handy that I have my towel with me. A towel is about the most massively useful thing an inte- ahm, a person can have.\"";
	close;

L_No_Item:
	mes "[Stranger]";
	mes "\"Hu? It seems you haven't.\"";
	close;

L_Wrong_Answer:
	mes "[Stranger]";
	mes "\"Nah, that's wrong. Come back if you want to try again.\"";
	close;

L_Event_Done:
	mes "[Stranger]";
	mes "\"Ah, welcome back. Thanks again for your help.\"";
	next;
	mes "\"Shall I dye your towel?\"";
	menu
		"That would be great!",-,
		"No, thanks.", L_Close;
L_Dye_Towel:
	mes "[Stranger]";
	mes "\"Alright, which color do you want?\"";
// the other colors should be added when more places are released
	menu
		"Red",L_Red,
		"Yellow",L_Yellow,
		"White",L_White,
//		"Blue",L_Blue,
//		"Green",L_Green,
//		"Purple",L_Purple,
//		"Orange",L_Orange,
//		"Pink",L_Pink,
//		"Lime",L_Lime,
//		"Teal",L_Teal,
		"I changed my mind.", L_Close;
	close;

L_Red:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Ruby Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderRed") < 2) goto L_No_Powder;
	delitem "GemPowderRed", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "RedWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Yellow:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Topaz Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderYellow") < 2) goto L_No_Powder;
	delitem "GemPowderYellow", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "YellowWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;


L_White:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Diamond Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderWhite") < 2) goto L_No_Powder;
	delitem "GemPowderWhite", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "WhiteWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Blue:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Sapphire Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderBlue") < 2) goto L_No_Powder;
	delitem "GemPowderBlue", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "BlueWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Green:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Emerald Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderGreen") < 2) goto L_No_Powder;
	delitem "GemPowderGreen", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "GreenWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Purple:
	mes "[Stranger]";
	mes "\"Ok, I'll need two bags of Amethyst Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderPurple") < 2) goto L_No_Powder;
	delitem "GemPowderPurple", 2;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "PurpleWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Orange:
	mes "[Stranger]";
	mes "\"Ok, I'll need one bag of Ruby Powder, one bag of Topaz Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderRed") < 1) goto L_No_Powder;
	if (countitem("GemPowderYellow") < 1) goto L_No_Powder;
	delitem "GemPowderRed", 1;
	delitem "GemPowderYellow", 1;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "OrangeWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Pink:
	mes "[Stranger]";
	mes "\"Ok, I'll need one bag of Ruby Powder, one bag of Diamond Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderRed") < 1) goto L_No_Powder;
	if (countitem("GemPowderWhite") < 1) goto L_No_Powder;
	delitem "GemPowderRed", 1;
	delitem "GemPowderWhite", 1;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "PinkWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Lime:
	mes "[Stranger]";
	mes "\"Ok, I'll need one bag of Emerald Powder, one bag of Topaz Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderGreen") < 1) goto L_No_Powder;
	if (countitem("GemPowderYellow") < 1) goto L_No_Powder;
	delitem "GemPowderGreen", 1;
	delitem "GemPowderYellow", 1;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "LimeWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_Teal:
	mes "[Stranger]";
	mes "\"Ok, I'll need one bag of Emerald Powder, one bag of Sapphire Powder and a bottle of water for that.\"";
	next;
	if (countitem("GreyWarpTowel") < 1) goto L_No_Towel;
	getinventorylist;
	if ((countitem("GreyWarpTowel") > 1) && (@inventorylist_count == 100)) goto L_Full_Inv;
	if (countitem("BottleOfWater") < 1) goto L_No_Water;
	if (countitem("GemPowderGreen") < 1) goto L_No_Powder;
	if (countitem("GemPowderBlue") < 1) goto L_No_Powder;
	delitem "GemPowderGreen", 1;
	delitem "GemPowderBlue", 1;
	delitem "GreyWarpTowel", 1;
	delitem "BottleOfWater", 1;
	getitem "TealWarpTowel", 1;
	mes "He takes your enchanted towel, the water and the gem powder, then he turns away and does something you can't see. After some minutes, he turns to you again.";
	next;
	mes "[Stranger]";
	mes "\"Done! It'll use its color after being used, but just come back, I can dye it again for you.\"";
	close;

L_No_Water:
	mes "[Stranger]";
	mes "\"You don't have water.\"";
	close;

L_No_Powder:
	mes "[Stranger]";
	mes "\"You need to bring me enough gem powder in that color. Maybe someone used to mining can help you with that.\"";
	close;

L_No_Towel:
	mes "[Stranger]";
	mes "\"Where's your towel? It is really useful, you should always keep it with you.\"";
	close;

L_Full_Inv:
	mes "[Stranger]";
	mes "\"You carry a lot of stuff with you, don't you? Maybe you should get rid of something.\"";
	close;

L_Close:
	close;
}