summaryrefslogtreecommitdiff
path: root/npc/events/halloween_2009.txt
blob: a35c9885981c6e7044840700bb1cb3e7a6e22fb2 (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
//================= 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)  Lupus
//= Copyright (C)  Kisuka
//=
//= 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/>.
//=========================================================================
//= iRO Halloween (2009)
//================= Description ===========================================
//= iRO Halloween (2009)
//= Quest for Weird Pumpkin Hat.
//= Exchange treats for buffs.
//= Summon event monsters in towns.
//================= Current Version =======================================
//= 1.1
//================= Additional Comments ===================================
//= You must enable the event items in item_db2.
//= You must enable the event mobs in mob_db2, mob_avail, and their skills
//= in mob_skill_db2.
//=========================================================================

//== Headgear Quest - Pumpkin Hat ==========================
prontera,152,192,5	script	Pumpkin Hat Researcher	4_M_05,{
	if(BaseLevel < 45) {
		mes "[Pumpkin Hat Researcher]";
		mes "Shoo, I don't need a child. Shoo! I don't talk to novices.";
		next;
		mes "[Pumpkin Hat Researcher]";
		mes "Go reach a level that can fight with stronger monsters and come back.";
		close;
	}
	mes "[Pumpkin Hat Researcher]";
	mes "Say do you like Pumpkin Pies?";
	next;
	mes "[Pumpkin Hat Researcher]";
	mes "I'm a Pumpkin Hat researcher, Why don't you listen to my story?";
	next;
	while(1) {
		switch(select("Listen to the story.:Ask about Pumpkin Hat.:Get a Pumpkin Hat.:Stop the conversation.")) {
			case 1:
				mes "[Pumpkin Hat Researcher]";
				mes "I've been studying about an upgraded Pumpkin Hat.";
				mes "I have discovered that it is a very simple process.";
				next;
				mes "[Pumpkin Hat Researcher]";
				mes "The process is quite simple.";
				mes "If you bring me ^4a4aff20 Jack o' Pumpkin^000000 I can show you.";
				mes "Isn't that a tempting proposal?";
				next;
				break;
			case 2:
				mes "[Pumpkin Hat Researcher]";
				mes "This upgraded pumpkin hat is powerful stuff!";
				next;
				mes "[Pumpkin Hat Researcher]";
				mes "It can make a Pumpkin Pie that restores a large percentage of HP & SP using condensed energy to the person who wears it.";
				next;
				mes "[Pumpkin Hat Researcher]";
				mes "All you need is ^4a4aff20 Jack o' Pumpkin^000000s.";
				next;
				break;
			case 3:
				mes "[Pumpkin Hat Researcher]";
				mes "Do you want to get Pumpkin Pies? Okay, let me count the Jack o' Pumpkins you've brought.";
				next;
				if(countitem(Pumpkin_Head) < 20) {
					mes "[Pumpkin Hat Researcher]";
					mes "I need ^4a4aff20 Jack o' Pumpkin^000000.";
					mes "I'm not an alchemist or a wizard to create something from nothing.";
					next;
					mes "[Pumpkin Hat Researcher]";
					mes "Okay, go hunting monsters and come back.";
					mes "I'm going to stay here for a while so take your time.";
					next;
					break;
				}else{
					mes "[Pumpkin Hat Researcher]";
					mes "I hope this will be useful to you. Don't forget to wear it while fighting to get your Pumpkin Pies.";
					delitem Pumpkin_Head,20;	// Jack o' Pumpkin
					getitem Weird_Pumpkin_Hat,1;		// Weird Pumpkin Hat
					next;
					mes "[Pumpkin Hat Researcher]";
					mes "I guess that I should get back to my research.";
					close;
				}
			case 4:
				mes "[Pumpkin Hat Researcher]";
				mes "Bye, until we'll see each other again.";
				mes "I wish you well...";
				close;
		}
	}
}

//== Buffs - Trick or Treaters =============================
-	script	Trick or Treater::09Treats	4_M_KID1,2,2,{
OnTouch:
	hideoffnpc strnpcinfo(3);
	initnpctimer;
	mes "[Trick or Treater]";
	mes "Hooray! hooray! Hooray!";
	mes "Trick or Treat?";
	next;
	if(select("Trick.:Treat.") == 1) {
		mes "[Trick or Treater]";
		mes "!!!!";
		mes "Fine. I have no choice but to trick you back!";
		sc_start SC_STUN,5000,0;
		close;
	}
	mes "[Trick or Treater]";
	mes "Oh yay! What kind of treat do you have?";
	next;
	switch(select("Candy:Candy Cane:Well-baked Cookie:Nothing")) {
		case 1:
			if(countitem(Candy) > 0) {
				mes "[Trick or Treater]";
				mes "Yay thank you!";
				mes "Here, take this for being so nice!";
				sc_start SC_FOOD_STR, 1800000, 5;
				sc_start SC_FOOD_INT, 1800000, 5;
				sc_start SC_FOOD_VIT, 1800000, 5;
				sc_start SC_FOOD_AGI, 1800000, 5;
				sc_start SC_FOOD_DEX, 1800000, 5;
				sc_start SC_FOOD_LUK, 1800000, 5;
				sc_start SC_FOOD_BASICAVOIDANCE, 1800000, 15;
				delitem Candy,1;	// Candy
				close;
			}else{
				mes "[Trick or Treater]";
				mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
				mes "Fine. I have no choice but to trick you!";
				sc_start SC_STUN,5000,0;
				close;
			}
		case 2:
			if(countitem(Candy_Striper) > 0) {
				mes "[Trick or Treater]";
				mes "Yay thank you!";
				mes "Here, take this for being so nice!";
				sc_start SC_FOOD_STR, 1800000, 5;
				sc_start SC_FOOD_INT, 1800000, 5;
				sc_start SC_FOOD_VIT, 1800000, 5;
				sc_start SC_FOOD_AGI, 1800000, 5;
				sc_start SC_FOOD_DEX, 1800000, 5;
				sc_start SC_FOOD_LUK, 1800000, 5;
				sc_start SC_FOOD_BASICAVOIDANCE, 1800000, 15;
				delitem Candy_Striper,1;	// Candy Cane
				close;
			}else{
				mes "[Trick or Treater]";
				mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
				mes "Fine. I have no choice but to trick you!";
				sc_start SC_STUN,5000,0;
				close;
			}
		case 3:
			if(countitem(Well_Baked_Cookie) > 0) {
				mes "[Trick or Treater]";
				mes "Yay thank you!";
				mes "Here, take this for being so nice!";
				sc_start SC_FOOD_STR, 1800000, 5;
				sc_start SC_FOOD_INT, 1800000, 5;
				sc_start SC_FOOD_VIT, 1800000, 5;
				sc_start SC_FOOD_AGI, 1800000, 5;
				sc_start SC_FOOD_DEX, 1800000, 5;
				sc_start SC_FOOD_LUK, 1800000, 5;
				sc_start SC_FOOD_BASICAVOIDANCE, 1800000, 15;
				delitem Well_Baked_Cookie,1;	// Well-baked Cookie
				close;
			}else{
				mes "[Trick or Treater]";
				mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
				mes "Fine. I have no choice but to trick you!";
				sc_start SC_STUN,5000,0;
				close;
			}
		case 4:
			mes "[Trick or Treater]";
			mes "At least a Candy, a Candy Cane or a Well-baked Cookie is all I ask for a treat.";
			mes "Fine. I have no choice but to trick you!";
			sc_start SC_STUN,5000,0;
			close;
	}
OnInit:
	hideonnpc "Trick or Treater#iRO1";
	hideonnpc "Trick or Treater#iRO2";
	hideonnpc "Trick or Treater#iRO3";
	hideonnpc "Trick or Treater#iRO4";
	hideonnpc "Trick or Treater#iRO5";
	hideonnpc "Trick or Treater#iRO6";
	hideonnpc "Trick or Treater#iRO7";
	hideonnpc "Trick or Treater#iRO8";
	end;

OnEnableTreat:
	enablenpc strnpcinfo(3);
	hideonnpc strnpcinfo(3);
	end;

OnTimer15000:
	hideonnpc strnpcinfo(3);
	disablenpc strnpcinfo(3);
	end;

OnTimer300000:
	donpcevent strnpcinfo(3)+"::OnEnableTreat";
	stopnpctimer;
	end;
}
prontera,151,173,5	duplicate(09Treats)	Trick or Treater#iRO1	4_M_KID1,2,2
prontera,270,350,5	duplicate(09Treats)	Trick or Treater#iRO2	4_M_KID1,2,2
prontera,234,310,5	duplicate(09Treats)	Trick or Treater#iRO3	4_M_KID1,2,2
prontera,156,321,5	duplicate(09Treats)	Trick or Treater#iRO4	4_M_KID1,2,2
prontera,156,283,5	duplicate(09Treats)	Trick or Treater#iRO5	4_M_KID1,2,2
prontera,142,214,5	duplicate(09Treats)	Trick or Treater#iRO6	4_M_KID1,2,2
prontera,134,125,5	duplicate(09Treats)	Trick or Treater#iRO7	4_M_KID1,2,2
prontera,220,72,5	duplicate(09Treats)	Trick or Treater#iRO8	4_M_KID1,2,2

//== Monster Summoning - Halloween Wizard ==================
-	script	Halloween Wizard#iRO09::09HallowWiz	4_DARKLORD,{
	mes "[Halloween Wizard]";
	mes "...";
	mes "Do you want to play a trick on someone?";
	next;
	while(1) {
		switch(select("What trick?:Sure:No.")) {
			case 1:
				mes "[Halloween Wizard]";
				mes "I can summon monsters in other parts of the world with just a few materials.";
				next;
				mes "[Halloween Wizard]";
				mes "Sounds interesting huh?";
				next;
				mes "[Halloween Wizard]";
				mes "If you bring me Fabric, Jack o' Pumpkins, Worn Fabric, or Crushed Pumpkins I can summon the monsters.";
				next;
				break;
			case 2:
				mes "[Halloween Wizard]";
				mes "Which town do you want to play a trick on?";
				next;
				getmapxy(.@mapname$,.@mapx,.@mapy,0,""+strcharinfo(0)+"");
				if (.@mapname$ == "prontera") {
					switch(select("Geffen:Payon:Alberta:Aldebaran")) {
						case 1:
							.@HallowTown = 3;
							break;
						case 2:
							.@HallowTown = 2;
							break;
						case 3:
							.@HallowTown = 4;
							break;
						case 4:
							.@HallowTown = 5;
							break;
					}
				}
				else if (.@mapname$ == "payon") {
					switch(select("Prontera:Geffen:Alberta:Aldebaran")) {
						case 1:
							.@HallowTown = 1;
							break;
						case 2:
							.@HallowTown = 3;
							break;
						case 3:
							.@HallowTown = 4;
							break;
						case 4:
							.@HallowTown = 5;
							break;
					}
				}
				else if (.@mapname$ == "geffen") {
					switch(select("Prontera:Payon:Alberta:Aldebaran")) {
						case 1:
							.@HallowTown = 1;
							break;
						case 2:
							.@HallowTown = 2;
							break;
						case 3:
							.@HallowTown = 4;
							break;
						case 4:
							.@HallowTown = 5;
							break;
					}
				}
				else if (.@mapname$ == "alberta") {
					switch(select("Prontera:Geffen:Payon:Aldebaran")) {
						case 1:
							.@HallowTown = 1;
							break;
						case 2:
							.@HallowTown = 3;
							break;
						case 3:
							.@HallowTown = 2;
							break;
						case 4:
							.@HallowTown = 5;
							break;
					}
				}
				else if (.@mapname$ == "aldebaran") {
					switch(select("Prontera:Geffen:Payon:Alberta")) {
						case 1:
							.@HallowTown = 1;
							break;
						case 2:
							.@HallowTown = 3;
							break;
						case 3:
							.@HallowTown = 2;
							break;
						case 4:
							.@HallowTown = 4;
							break;
					}
				}
				setarray .@HallowTowns$[1],"prontera","payon","geffen","alberta","aldebaran";
				mes "[Halloween Wizard]";
				mes "Ok then let's go to the next step.";
				next;
				mes "[Halloween Wizard]";
				mes "How many Fabrics or Jack o' Pumpkins do you want to use? Don't go over 100 because that is the max amount that I can use.";
				next;
				input .@input;
				if (.@input == 0) {
					mes "[Halloween Wizard]";
					mes "You have no definite idea.";
					mes "It's not a big deal.";
					mes "Let me know.";
					next;
					break;
				}
				else if (.@input > 100) {
					mes "[Halloween Wizard]";
					mes "I told you that it must be between 1 to 100!";
					mes "You didn't pay attention!";
					next;
					break;
				}
				else {
					.@fabric = countitem(Transparent_Cloth);
					.@jack = countitem(Pumpkin_Head);
					.@worn = countitem(Worn_Cloth_Piece);
					.@crushed = countitem(Pumpkin_Head_Crushed);
					.@whispers = 0;
					.@darklords = 0;

					.@total = .@fabric + .@jack + .@worn + .@crushed;

					if(.@total < .@input) {
						mes "[Halloween Wizard]";
						mes "Recount the number of items you have and tell me the total.";
						mes "Huhuhuhuhuhu...";
						next;
						break;
					}

					if(.@fabric > 0) {
						if(.@fabric >= .@input) {
							delitem 1059,.@input;
							.@whispers += .@input;
							.@input = 0;
						}
						else{
							delitem 1059,.@fabric;
							.@input -= .@fabric;
							.@whispers += .@fabric;
						}
					}
					if(.@worn > 0 && .@input != 0) {
						if(.@worn >= .@input) {
							delitem 6299,.@input;
							.@whispers += .@input;
							.@input = 0;
						}
						else{
							delitem 6299,.@worn;
							.@input -= .@worn;
							.@whispers += .@worn;
						}
					}
					if(.@jack > 0 && .@input != 0) {
						if(.@jack >= .@input) {
							delitem 1062,.@input;
							.@darklords += .@input;
							.@input = 0;
						}
						else{
							delitem 1062,.@jack;
							.@input -= .@jack;
							.@darklords += .@jack;
						}
					}
					if(.@crushed > 0 && .@input != 0) {
						if(.@crushed >= .@input) {
							delitem 6298,.@input;
							.@darklords += .@input;
							.@input = 0;
						}
						else{
							delitem 6298,.@crushed;
							.@input -= .@crushed;
							.@darklords += .@crushed;
						}
					}
					if (.@input > 0) {
						mes "Theres a problem.";
						close;
					}
					monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Whisper",3014,.@whispers;
					monster ""+.@HallowTowns$[.@HallowTown]+"",0,0,"Halloween Dark Lord",3015,.@darklords;
					mes "[Halloween Wizard]";
					mes "Here's what you wanted.";
					mes "Imagine what the people must be thinking in the other villages?";
					mes "Muahahaha";
					close;
				}
			case 3:
				mes "[Halloween Wizard]";
				mes "If you change your mind, come back here...";
				mes "I'll stay here for a while...";
				mes "Kkkk...";
				close;
		}
	}
}
prontera,156,195,5	duplicate(09HallowWiz)	Halloween Wizard#1	4_DARKLORD
geffen,133,122,5	duplicate(09HallowWiz)	Halloween Wizard#2	4_DARKLORD
payon,156,196,5	duplicate(09HallowWiz)	Halloween Wizard#3	4_DARKLORD
alberta,96,57,5	duplicate(09HallowWiz)	Halloween Wizard#4	4_DARKLORD
aldebaran,146,122,5	duplicate(09HallowWiz)	Halloween Wizard#5	4_DARKLORD