summaryrefslogtreecommitdiff
path: root/npc/quests/quests_geffen.txt
blob: 30ac0e3a6f01d4b54bf7bda6d1c68a0e51cad6ff (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
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Euphy
//= Copyright (C)  L0ne_W0lf
//= Copyright (C)  Samuray22
//= Copyright (C)  silent
//= Copyright (C)  Lupus
//= Copyright (C)  kobra_k88
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= Quest NPCs related to Geffen
//================= Description ===========================================
//= Welding Mask and Headset Quests.
//================= Current Version =======================================
//= 1.5
//=========================================================================

//== Blacksmith: 'Welding Mask' Quest ======================
geffen_in,144,166,4	script	Blacksmith	1_M_SMITH,{
	mes "[Blacksmith]";
	mes "You've never heard of me? Why, I'm the Veteran Blacksmith of this land. I've spent 30 years in this hot and bloody hellfire, bending steel to my iron will!";
	next;
	mes "[Blacksmith]";
	mes "But...";
	mes "I am growing older and my prowess begins to fade with age. So I've invented something for young, hot, upcoming Blacksmiths, in hopes that they too will master my craft...";
	next;
	switch(select("What is it?:...")) {
	case 1:
		mes "[Blacksmith]";
		mes "We Blacksmiths must always manipulate steel under extreme heat, and the hot air and melted metals are more than most people can stand.";
		next;
		mes "[Blacksmith]";
		mes "For the sake of our craft, our beautiful, yet masculine faces are put at risk...";
		next;
		mes "[Blacksmith]";
		mes "But with this wonder of technology, there's no need to worry! Behold, the ^3355FFWelding Mask^000000 !!";
		next;
		mes "[Blacksmith]";
		mes "It works by covering your face with a fat metal plate. Truly, it's an item that everyone should want! If not yourself, it'd be a good idea to give this to a friend who is studying smithing.";
		next;
		mes "[Blacksmith]";
		mes "So how about it ? If you give me ^2244FF50 Steel^000000 and ^4422FFonly 2000 Zeny^000000, I will make it for you right away~!!";
		next;
		switch(select("Hm... Not bad. Alright.:How does it work again?")) {
		case 1:
			if ((countitem(999) > 49) && (Zeny > 1999)){
				mes "[Blacksmith]";
				mes "Ah, I see that you appreciate a Blacksmith's work! Alright, I'll do it right away !!";
				next;
				delitem 999,50;  //Steel
				Zeny -= 2000;
				getitem 2292,1; // Welding_Mask
				mes "[Blacksmith]";
				mes "Hahaha~! Make good use of that!";
				close;
			}
			else {
				mes "[Blacksmith]";
				mes "Hmmm...";
				mes "You do not have the items I require.";
				next;
				mes "[Blacksmith]";
				mes "A common Blacksmith would interpret this as a sign of disrepect, but I will forgive you. Just don't forget what I need if you want me to make you this mask.";
				close;
			}
		case 2:
			mes "[Blacksmith]";
			mes "The ^3355FFWelding Mask^000000 protects your face by covering it with a fat metal plate. This invention is the result of 30 years of endless toil at the hammer and anvil.";
			close;
		}
	case 2:
		mes "[Blacksmith]";
		mes "Ah...!";
		mes "I guess this is the first time you've met a Blacksmith as great as me, and you're just speechless with awe. Please, take your time and speak up when you are ready.";
		next;
		mes "^3355FFThis guy seems";
		mes "a little full";
		mes "of himself.^000000";
		close;
	}
}

//== Eric: 'Headset' Quest =================================
geffen_in,30,71,4	script	Eric	4_M_01,{
	mes "[Eric]";
	mes "Please listen";
	mes "to my story";
	mes "of my blessed";
	mes "grandfather.";
	next;
	switch(select("Talk:Ask about Items needed:Manufacture:Quit")) {
	case 1:
		mes "[Eric]";
		mes "My Grandfather, who passed away a few years ago, was special to me. He always stayed with me, and took care of me. He was much better than my old man, who was always busy working.";
		next;
		mes "[Eric]";
		mes "To me, Grandfather's library was always like a fantasy land where I could escape. I spent most of my time there.";
		next;
		mes "[Eric]";
		mes "I learned a lot of things from his books in the Library. Grandfather was interested in Alchemy and Music, and his Library was filled with many mysterious old books.";
		next;
		mes "[Eric]";
		mes "One day...";
		mes "As usual, I went to the Library and discovered an interesting schematic.";
		next;
		mes "[Eric]";
		mes "It showed some instrument which looked like Ear Muffs that, when worn on the head, could transmit music or whispers to the ears through a thin wire.";
		next;
		mes "[Eric]";
		mes "I guess...";
		mes "It is my grand father's unfinished work. I met a few Alchemists and asked them to produce it, but they rejected my offer...";
		next;
		mes "[Eric]";
		mes "In the end, I thought 'I've gotta make it myself.' So I researched for a few years, and now I fully understand how to make that thing. But, I could never gather the materials to make it!";
		next;
		mes "[Eric]";
		mes "If I can get those articles, I would build it right away. If you are interested in my idea, would you bring them for me?";
		next;
		mes "[Eric]";
		mes "All I wanna do is build this thing in honor of my grandfather and finish the work he started. If you ask me to keep it, I wouldn't mind.";
		close;
	case 2:
		mes "[Eric]";
		mes "40 ^3355FFSteel^000000";
		mes "1 ^3355FFOridecon^000000";
		mes "1 ^3355FFAlcohol^000000";
		mes "1 ^3355FFCoal^000000";
		mes "These are the things I need for Grandfather's masterpiece.";
		close;
	case 3:
		if ((countitem(999) > 39) && (countitem(984) > 0) && (countitem(970) > 0) && (countitem(1003) > 0)) {
			delitem 999,40; //Steel
			delitem 984,1; //Oridecon
			delitem 970,1; //Alchol
			delitem 1003,1; //Coal
			getitem 5001,1; //Headset
			mes "*Tap! Tap! Tap!*";
			next;
			mes "[Eric]";
			mes "Thank you.";
			mes "Because of you, I could accomplish my grandfather's wish. He would be happy if he looked down on me from Heaven.";
			next;
			mes "[Eric]";
			mes "As I said, please take this. I am just proud that I can make this by myself.";
			close;
		}
		else {
			mes "[Eric]";
			mes "Thank you for trying to help me, but you didn't bring all the items I need. I think you will find them all soon though.";
			close;
		}
	case 4:
		mes "[Eric]";
		mes "N-no?";
		mes "Well...";
		mes "You have your own";
		mes "worries, I suppose.";
		mes "Farewell.";
		close;
	}
}

//== Number Match Game :: gef_yagu =========================
geffen,122,77,4	script	Nia#yagu	8_F_GIRL,{
	mes "[Nia]";
	mes "Hello, I'm Nia, the fifth";
	mes "disciple of Mawong, the";
	mes "gaming mastermind. Now,";
	mes "how would you like to play a";
	mes "Number Match game with me?";
	next;
	switch(select("Number Match Game?:Practice Number Match:Play Number Match:Record Holder:Cancel")) {
	case 1:
		mes "[Nia]";
		mes "Ah, well, the objective of";
		mes "the Number Match game is to";
		mes "guess the number I'm thinking";
		mes "of. Of course, there are a few";
		mes "rules that limit the numbers";
		mes "that I can choose from.";
		next;
		mes "[Nia]";
		mes "All the numbers that I make";
		mes "up must be 3 digits, I can't";
		mes "use 0 for any of the digits,";
		mes "and I can't use the same";
		mes "number for any of the digits";
		mes "more than once.";
		next;
		mes "[Nia]";
		mes "So, for example, I can't";
		mes "use the numbers 103, 112,";
		mes "252, or 701. Those numbers";
		mes "either have a 0, or they use";
		mes "the same number in the digits";
		mes "more than once. Got it now?";
		next;
		mes "[Nia]";
		mes "Now, you only get 5 guesses,";
		mes "and after each guess, I'll tell";
		mes "you how many digits you guessed";
		mes "correctly, followed by the number of correctly guessed digits in";
		mes "the correct digit place.";
		next;
		mes "[Nia]";
		mes "For example, let's say the";
		mes "number I come up with is 168.";
		mes "If your first guess is 678, then you guessed two of the digits,";
		mes "6 and 8, correctly. However,";
		mes "only 8 is in the correct place.";
		next;
		mes "[Nia]";
		mes "You know, it'd be a good idea";
		mes "if you try the Practice Mode";
		mes "first. Then, when you're more";
		mes "comfortable, play the actual";
		mes "Number Match game. Don't forget that speed counts for your score!";
		next;
		mes "[Nia]";
		mes "Ah, if you happen to";
		mes "make a new record in the";
		mes "Number Match game, you'll";
		mes "have your name recorded,";
		mes "so don't miss this chance for";
		mes "fame and maybe even fortune~";
		close;
	case 2:
		mes "[Nia]";
		mes "Great, let's do a practice";
		mes "Number Match game. Please";
		mes "try to guess my number, okay?";
		mes "If you want to cancel, then please enter a number greater than 1,000.";
		.@practice = 1;
		break;
	case 3:
		mes "[Nia]";
		mes "Great, let's play Number Match!";
		mes "You will have 5 chances to guess the number that I'm thinking of.";
		mes "If you want to cancel, then please enter a number greater than 1,000.";
		.@practice = 0;
		break;
	case 4:
		.@name_record$ = $050908_minus1_yagu$;
		if (.@name_record$ == "") //custom
			.@name_record$ = "(null)";
		.@score_record = $050908_minus1_yagu;
		.@score_min = .@score_record / 60;
		.@score_sec = .@score_record % 60;
		mes "[Nia]";
		mes "^ff0000" + .@name_record$ + "^000000 is the";
		mes "record holder for the Number";
		mes "Match game with a time of";
		mes "^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
		close;
	case 5:
		mes "[Nia]";
		mes "Take care of yourself,";
		mes "adventurer. If you ever";
		mes "feel like playing a Number";
		mes "Match game, come and talk";
		mes "to me, alright? See you~";
		close;
	}
	next;

	// Generate 3 digits of a number.
	while(1) {
		.@yagu100 = rand(1,9);
		.@yagu10 = rand(1,9);
		.@yagu1 = rand(1,9);
		if ((.@yagu100 != .@yagu10) && (.@yagu100 != .@yagu1) && (.@yagu10 != .@yagu1)) {
			// Store the actual number (unofficial).
			.@yagu = (100*.@yagu100) + (10*.@yagu10) + .@yagu1;
			break;
		}
	}

	// The official time calculation is based on ServerTime,
	// an int HHMMSS equivalent to atoi(gettimestr("%H%M%S",7)).
	// UNIX time is really a better way to do this.
	.@start_time = gettimetick(2);

	while(1) {

		// Guess a number that meets all conditions.
		while(1) {
			if (input(.@input,100,999) != 0) {
				mes "[Nia]";
				mes "You've canceled the";
				mes "Number Match game.";
				close;
			}
			.@input100 = .@input / 100;
			.@input10 = (.@input % 100) / 10;
			.@input1 = .@input % 10;
			if ((.@input100 > 0) && (.@input10 > 0) && (.@input1 > 0)) {
				if ((.@input100 != .@input10) && (.@input100 != .@input1) && (.@input10 != .@input1))
					break;
			}
			mes "[Nia]";
			mes "You entered one of the";
			mes "digits as 0, or input the";
			mes "same numerical value in";
			mes "the digits more than once.";
			mes "Please enter another guess.";
			next;
		}

		.@retry = .@retry+1;
		mes "[Nia]";
		mes "^ff0000"+strcharinfo(0)+"^000000,";
		mes "your guess is ^0000ff"+.@input+"^000000.";
		mes "Give me a moment to";
		mes "come up with your results.";
		next;

		// Correct digits in correct locations.
		.@strike = 0;
		if (.@yagu100 == .@input100)
			.@strike += 1;
		if (.@yagu10 == .@input10)
			.@strike += 1;
		if (.@yagu1 == .@input1)
			.@strike += 1;

		// Correct digits in incorrect locations.
		.@ball = 0;
		if ((.@yagu100 == .@input10) || (.@yagu100 == .@input1))
			.@ball += 1;
		if ((.@yagu10 == .@input100) || (.@yagu10 == .@input1))
			.@ball += 1;
		if ((.@yagu1 == .@input100) || (.@yagu1 == .@input10))
			.@ball += 1;

		if (.@strike == 3) {
			if (.@practice) {
				mes "[Nia]";
				mes "Yes, the number that";
				mes "I guessed was ^ff0000"+.@yagu+"^000000!";
				mes "Congratulations, you";
				mes "just won this practice";
				mes "game! Now you should be";
				mes "ready for the real thing~";
				close;
			} else {

				// Calculate final time and check against the previous record.
				.@end_time = gettimetick(2);
				if (.@end_time < .@start_time)
					.@end_time += 3600;
				.@total_time = .@end_time - .@start_time;
				.@total_min = .@total_time / 60;
				.@total_sec = .@total_time % 60;
				.@name_record$ = $050908_minus1_yagu$;
				if (.@name_record$ == "") //custom
					.@name_record$ = "(null)";
				.@score_record = $050908_minus1_yagu;
				.@score_min = .@score_record / 60;
				.@score_sec = .@score_record % 60;

				if (.@score_record >= .@total_time || !.@score_record) { //custom (second condition)
					$050908_minus1_yagu$ = strcharinfo(0);
					$050908_minus1_yagu = .@total_time;
					mes "[Nia]";
					mes "Great! You guessed";
					mes "my number, which was";
					mes "^ff0000" + .@yagu + "^000000. You finished in";
					mes "^ff0000" + .@total_min + " minutes, " + .@total_sec + " seconds^000000,";
					mes "breaking the previous record";
					mes "of ^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
					next;
					mes "[Nia]";
					mes "^ff0000" + .@name_record$ + "^000000";
					mes "set that old record,";
					mes "but now you are the";
					mes "new person to beat in the";
					mes "Match Game. Congratulations";
					mes "for setting a new record!";
					close;
				}
				mes "[Nia]";
				mes "Nice work, you guessed";
				mes "my number! The answer, of";
				mes "course, was ^ff0000" + .@yagu + "^000000. You managed";
				mes "to guess this number correctly";
				mes "in ^ff0000" + .@total_min + " minutes, " + .@total_sec + " seconds^000000.";
				next;
				mes "[Nia]";
				mes "^ff0000" + .@name_record$ + "^000000 is";
				mes "the current Number Match";
				mes "record holder with a time";
				mes "of ^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
				mes "Good luck, and hopefully you";
				mes "can break this record someday~";
				close;
			}
		} else {
			if (.@practice) {
				mes "[Nia]";
				mes "Your guess has ^ff0000" + .@ball + "^000000 of the";
				mes "correct numbers. ^ff0000" + .@strike + "^000000 of the";
				mes "digits in your guess have";
				mes "the correct number in the";
				mes "correct digit placement.";
				mes "Alright, try it again~";
				next;
			} else {
				mes "[Nia]";
				mes "Your last guess had ^ff0000" + .@ball + "^000000";
				mes "of the correct numbers,";
				mes "and ^ff0000" + .@strike + "^000000 digits in your guess";
				mes "had the correct number in";
				mes "the correct digit placement.";
				switch(.@retry) {
					case 1: mes "You have four guesses left."; break;
					case 2: mes "You have three guesses left."; break;
					case 3: mes "You have two guesses left."; break;
					case 4: mes "You only have one guess left..."; break;
					case 5: mes "The answer was ^ff0000" + .@yagu + "^000000."; close;
				}
				next;
			}
		}
	}
}