summaryrefslogtreecommitdiff
path: root/npc/re/instances/BakonawaLake.txt
blob: 8214a30397e9ffe2950cf1edd002b45b13accfeb (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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2013-2015  Hercules Dev Team
//= Copyright (C)  Euphy
//=
//= 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/>.
//=========================================================================
//= Bakonawa Lake
//================= Description ===========================================
//= Defeat Bakonawa before he eats the moon.
//= Part of the "Bakonawa Extermination" quest.
//================= Current Version =======================================
//= 1.1
//=========================================================================

1@ma_b	mapflag	src4instance

ma_scene01,174,179,4	script	Taho	4_M_DEWZATIMAN,{
	disable_items;
	if (checkweight(Knife,1) == 0) {
		mes "You are carrying too many items. Come back after taking off some of them.";
		close;
	}
	if (MaxWeight - Weight < 10000) {
		mes "You are carrying too much weight. Come back after reducing the weight.";
		close;
	}
	if (BaseLevel < 140) {
		mes "[Taho]";
		mes "Hey. This is too dangerous a place for you. You cannot keep yourself safe. Get out of here and go to the village right now!";
		close;
	}
	if (malaya_bakona1 < 7 && malaya_bakona2 < 15) {
		mes "[Taho]";
		mes "We are gonna be killed all by that Bakonawa. Ah, we must slay him but unfortunately we are not prepared.";
		close;
	}

	.@party_id = getcharid(1);
	.@md_name$ = "Bakonawa Lake";

	.@baku_time = questprogress(12278,PLAYTIME);
	if (!.@baku_time) {
		if (!questprogress(12279)) setquest 12279;
	}
	if (!.@party_id) {
		mes "[Taho]";
		mes "Isn't there any company who can go with you? Or even if you wanna go alone, come after organizing a party.";
		close;
	}
	if (!.@baku_time) {
		if (getcharid(0) == getpartyleader(.@party_id,2)) {
			mes "[Taho]";
			mes "Are you the leader of the Bakonawa slayers? The road is not well so we have to go down the cliff with a rope, is that OK?";
			next;
			.@i = select("Please weave a rope.", "Now I will go down.", "Cancel.");
		} else {
			mes "[Taho]";
			mes "You came for slaying Bakonawa. The leader of your party has to help me weaving the rope for going down.";
			next;
			.@i = select("", "Now I will go down.", "Cancel.");
		}
		switch(.@i) {
		case 1:
			.@instance = instance_create(.@md_name$,.@party_id);
			if (.@instance < 0) {
				mes "[Taho]";
				mes "Oh, the rope got dropped. I have to make a new one.";
				close;
			}
			if (instance_attachmap("1@ma_b",.@instance) == "") {
				mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
				instance_destroy(.@instance);
				close;
			}
			instance_set_timeout 7200,300,.@instance;
			instance_init(.@instance);
			mes "[Taho]";
			mes "Now I'm weaving, so you can go down when I'm done.";
			close;
		case 2:
			if( has_instance("1@ma_b") == "" ) {
				mes "The memorial dungeon "+.@md_name$+" does not exist.";
				mes "The party leader did not generate the dungeon yet.";
				close;
			} else {
				mapannounce "ma_scene01","A party member, "+strcharinfo(PC_NAME)+" of the party "+getpartyname(.@party_id)+" is entering the dungeon, "+.@md_name$+".",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
				setquest 12278;
				warp "1@ma_b",64,51;
				end;
			}
		case 3:
			close;
		}
	} else if (.@baku_time == 1) {
		mes "[Taho]";
		mes "The rope used for getting to the Lake is already broken. We are now cleaning up the surroundings so come back after some time.";
		close;
	} else if (.@baku_time == 2) {
		mes "[Taho]";
		mes "It's all cleaned up around here. Now you can go down again after getting a rope.";
		erasequest 12278;
		close;
	}
}

sec_in02,26,26,4	script	Bakonawa's Rage	4_M_DEWZATIMAN,{
	callfunc "F_GM_NPC";
	mes "[Taho]";
	mes "My name is Minky.";
	if (callfunc("F_GM_NPC",1854,0) == 1) {
		erasequest 12278;
		erasequest 12279;
		malaya_bakona1 = 7;
		malaya_bakona2 = 15;
	}
	close;
}

1@ma_b,62,52,4	script	Taho#nf	4_M_DEWZATIMAN,{
	mes "[Taho]";
	mes "Heehee, I could join the Bakonawa hunt, but I'd rather hide behind that rock and cheer you guys on.";
	next;
	mes "[Taho]";
	mes "Bakonawa becomes invincible at some point. When that time comes, listen to my guides carefully. Just trust me and all will be good.";
	next;
	if (getcharid(0) == getpartyleader(getcharid(1),2)) {
		mes "[Taho]";
		mes "Now I will make Bakonawa spring out from the lake.";
		next;
		switch(select("Hold on! I'm not ready yet!", "Let's do it!")) {
		case 1:
			mes "[Taho]";
			mes "Oh... alright... tell me when you are ready.";
			close;
		case 2:
			mes "[Taho]";
			mes "Then I will drop a drop of Albopal to this lake.";
			next;
			mes "[Taho]";
			mes "Once Bakonawa tastes this, he will surface...";
			donpcevent instance_npcname("#Bakonawan1")+"::OnStart";
			disablenpc instance_npcname("Taho#nf");
			close;
		}
	} else {
		mes "[Taho]";
		mes "I am dropping the Alpopal to make Bakonawa mad. Bakonawa can be a good source of protein once we get him.";
		close;
	}
}

1@ma_b,36,111,4	script	#Bakonawan1	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#Bakonawan1");
	end;
OnStart:
	enablenpc instance_npcname("#Bakonawan1");
	.@map$ = instance_mapname("1@ma_b");
	mapannounce .@map$,"Taho: I can see him there on the surface! ATTACK!!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	monster .@map$,78,81,"Bakonawa",2320,1,instance_npcname("#Bakonawan1")+"::OnMyMobDead"; //original: (78,83)
	initnpctimer;
	end;
OnFail:
	killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan1")+"::OnMyMobDead";
	end;
OnMyMobDead:
	.@map$ = instance_mapname("1@ma_b");
	if (mobcount(.@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead") < 1) {
		donpcevent instance_npcname("#BakonawaDeadn1")+"::OnStart";
		killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead";
		stopnpctimer;
		disablenpc instance_npcname("#Bakonawan1");
	}
	end;
OnTimer1000:	callsub OnAnnounce,"10 minutes";
OnTimer60000:	callsub OnAnnounce,"9 minutes";
OnTimer120000:	callsub OnAnnounce,"8 minutes";
OnTimer180000:	callsub OnAnnounce,"7 minutes";
OnTimer240000:	callsub OnAnnounce,"6 minutes";
OnTimer300000:	callsub OnAnnounce,"5 minutes";
OnTimer360000:	callsub OnAnnounce,"4 minutes";
OnTimer420000:	callsub OnAnnounce,"3 minutes";
OnTimer480000:	callsub OnAnnounce,"2 minutes";
OnTimer540000:	callsub OnAnnounce,"1 minute";
OnTimer570000:
	mapannounce instance_mapname("1@ma_b"),"Time Limit: 30 seconds",bc_map,"0xff4400"; //FW_NORMAL 18 0 0
	donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
	end;
OnTimer600000:
	.@map$ = instance_mapname("1@ma_b");
	mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
	donpcevent instance_npcname("Taho#Fail")+"::OnStart";
	donpcevent instance_npcname("#Bakonawan1")+"::OnFail";
	killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead";
	stopnpctimer;
	disablenpc instance_npcname("#Bakonawan1");
	end;
OnAnnounce:
	mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL 15 0 0
	donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
	end;
}

1@ma_b,78,81,0	script	#SummonPuppetsn1	HIDDEN_WARP_NPC,4,5,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#SummonPuppetsn1");
	end;
OnStart:
	stopnpctimer;
	enablenpc instance_npcname("#SummonPuppetsn1");
	initnpctimer;
	end;
OnTouch:
	stopnpctimer;
	disablenpc instance_npcname("#SummonPuppetsn1");
	end;
OnTimer5000:
	setarray .@x[0],79,71,60,61,57,89,95,96,99;
	setarray .@y[0],71,72,80,90,99,73,82,90,99;
	.@map$ = instance_mapname("1@ma_b");
	for(.@i = 0; .@i<9; ++.@i) {
		.@rand = rand(1,10);
		if (.@rand > 7)
			monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2337,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
		else if (.@rand < 4)
			monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2343,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
	}
	end;
OnTimer50000:
	killmonster instance_mapname("1@ma_b"),instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
	stopnpctimer;
	disablenpc instance_npcname("#SummonPuppetsn1");
	end;
OnMyMobDead:
	end;
}

1@ma_b,1,5,4	script	#BakonawaDeadn1	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#BakonawaDeadn1");
	end;
OnStart:
	enablenpc instance_npcname("#BakonawaDeadn1");
	initnpctimer;
	end;
OnTimer100:
	mapannounce instance_mapname("1@ma_b"),"Taho: Good! Bakonawa is hidden under water. He will now try to swallow the moon.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	end;
OnTimer5000:
	mapannounce instance_mapname("1@ma_b"),"Taho: We must make loud noises with caldron and gong so he can never concentrate on the moon!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	end;
OnTimer10000:
	mapannounce instance_mapname("1@ma_b"),"Taho: Do not engage on him even if he come above the surface. Just make loud noises!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	end;
OnTimer15000:
	mapannounce instance_mapname("1@ma_b"),"Mission - Destroy 2 caldrons and 2 gongs on left and right sides of the lake.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0
	donpcevent instance_npcname("#Bakonawan2")+"::OnStart";
	stopnpctimer;
	disablenpc instance_npcname("#BakonawaDeadn1");
	end;
}

1@ma_b,36,111,4	script	#Bakonawan2	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#Bakonawan2");
	end;
OnStart:
	enablenpc instance_npcname("#Bakonawan2");
	.@label$ = instance_npcname("#Bakonawan2")+"::OnMyMobDead";
	.@map$ = instance_mapname("1@ma_b");
	monster .@map$,95,98,"Caldron",2328,1,.@label$;
	monster .@map$,60,98,"Caldron",2328,1,.@label$;
	monster .@map$,97,104,"Gong",2328,1,.@label$;
	monster .@map$,58,104,"Gong",2328,1,.@label$;
	donpcevent instance_npcname("#Bakonawan2-1")+"::OnStart";
	initnpctimer;
	end;
OnMyMobDead:
	.@map$ = instance_mapname("1@ma_b");
	.@mob_dead_num = mobcount(.@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead");
	if (.@mob_dead_num < 1) {
		donpcevent instance_npcname("#Bakonawan2-1")+"::OnEnd";
		stopnpctimer;
		disablenpc instance_npcname("#Bakonawan2");
	} else
		mapannounce .@map$,"Taho: Good! "+.@mob_dead_num+" left to go!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	 end;
OnTimer1000:	callsub OnAnnounce,"5 minutes",15,1;
OnTimer60000:	callsub OnAnnounce,"4 minutes",15,1;
OnTimer120000:	callsub OnAnnounce,"3 minutes",15,1;
OnTimer180000:	callsub OnAnnounce,"2 minutes",15,1;
OnTimer240000:	callsub OnAnnounce,"1 minute",15,1;
OnTimer270000:	callsub OnAnnounce,"30 seconds",15,0;
OnTimer280000:	callsub OnAnnounce,"20 seconds",15,0;
OnTimer290000:	callsub OnAnnounce,"10 seconds",15,0;
OnTimer295000:	callsub OnAnnounce,"5 seconds",16,0;
OnTimer296000:	callsub OnAnnounce,"4 seconds",17,0;
OnTimer297000:	callsub OnAnnounce,"3 seconds",18,0;
OnTimer298000:	callsub OnAnnounce,"2 seconds",19,0;
OnTimer299000:	callsub OnAnnounce,"1 second",20,0;
OnTimer300000:
	.@map$ = instance_mapname("1@ma_b");
	mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
	donpcevent instance_npcname("Taho#Fail")+"::OnStart";
	donpcevent instance_npcname("#Bakonawan2-1")+"::OnFail";
	killmonster .@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead";
	stopnpctimer;
	disablenpc instance_npcname("#Bakonawan2");
	end;
OnAnnounce:
	mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0
	if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
	end;
}

1@ma_b,36,111,4	script	#Bakonawan2-1	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#Bakonawan2-1");
	end;
OnStart:
	enablenpc instance_npcname("#Bakonawan2-1");
	monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2321,1,instance_npcname("#Bakonawan2-1")+"::OnMyMobDead"; //original: (78,93)
	end;
OnFail:
	killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead";
	end;
OnEnd:
	enablenpc instance_npcname("#Bakonawan2-1");
	killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead";
	initnpctimer;
	end;
OnTimer1000:
	mapannounce instance_mapname("1@ma_b"),"Taho: He is back into the lake again. Is it over?",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	end;
OnTimer5000:
	mapannounce instance_mapname("1@ma_b"),"Taho: UHM! Something is moving up rapidly under the water! Ba... Bakonawa is coming!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	end;
OnTimer10000:
	mapannounce instance_mapname("1@ma_b"),"Mission - Eliminate Bakonawa who became more fierce.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0
	donpcevent instance_npcname("#Bakonawan3")+"::OnStart";
	stopnpctimer;
	disablenpc instance_npcname("#Bakonawan2-1");
	end;
OnMyMobDead:
	end;
}

1@ma_b,36,111,4	script	#Bakonawan3	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#Bakonawan3");
	end;
OnStart:
	enablenpc instance_npcname("#Bakonawan3");
	initnpctimer;
	monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2322,1,instance_npcname("#Bakonawan3")+"::OnMyMobDead"; //original: (78,83)
	donpcevent instance_npcname("#Bakonawan3-1")+"::OnStart";
	end;
OnMyMobDead:
	.@map$ = instance_mapname("1@ma_b");
	.@mob_dead_num = mobcount(.@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead");
	if (.@mob_dead_num < 1) {
		mapannounce .@map$,"Taho: We got him! I can see he has threw up something that looks like a box.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
		donpcevent instance_npcname("Taho#Completed")+"::OnStart";
		donpcevent instance_npcname("#Bakonawan3-1")+"::OnEnd";
		killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead";
		stopnpctimer;
		disablenpc instance_npcname("#Bakonawan3");
	}
	end;
OnTimer1000:
	callsub OnAnnounce,"10 minutes",15,1;
	end;
OnTimer60000:
OnTimer120000:
OnTimer180000:
OnTimer240000:
	donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
	end;
OnTimer300000:	callsub OnAnnounce,"5 minutes",15,1;
OnTimer360000:	callsub OnAnnounce,"4 minutes",15,1;
OnTimer420000:	callsub OnAnnounce,"3 minutes",15,1;
OnTimer480000:	callsub OnAnnounce,"2 minutes",15,1;
OnTimer540000:	callsub OnAnnounce,"1 minute",15,1;
OnTimer570000:	callsub OnAnnounce,"30 seconds",15,0;
OnTimer580000:	callsub OnAnnounce,"20 seconds",15,0;
OnTimer590000:	callsub OnAnnounce,"10 seconds",15,0;
OnTimer595000:	callsub OnAnnounce,"5 seconds",16,0;
OnTimer596000:	callsub OnAnnounce,"4 seconds",17,0;
OnTimer597000:	callsub OnAnnounce,"3 seconds",18,0;
OnTimer598000:	callsub OnAnnounce,"2 seconds",19,0;
OnTimer599000:	callsub OnAnnounce,"1 second",20,0;
OnTimer600000:
	.@map$ = instance_mapname("1@ma_b");
	mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
	donpcevent instance_npcname("Taho#Fail")+"::OnStart";
	killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead";
	stopnpctimer;
	disablenpc instance_npcname("#Bakonawan3");
	end;
OnAnnounce:
	mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0
	if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
	end;
}

1@ma_b,36,111,4	script	#Bakonawan3-1	CLEAR_NPC,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("#Bakonawan3-1");
	end;
OnStart:
	initnpctimer;
	end;
OnEnd:
	killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
	//showdigit 0;
	stopnpctimer;
	end;
OnMyMobDead:
	showdigit mobcount(instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead");
	end;
OnTimer120000:	callsub OnMobSpawn,10;
OnTimer180000:	callsub OnMobSpawn,15;
OnTimer240000:	callsub OnMobSpawn,20;
//OnTimer300000:	callsub OnMobSpawn,25;
OnTimer300000:	callsub OnMobSpawn,30;
OnTimer360000:	callsub OnMobSpawn,35;
OnTimer420000:	callsub OnMobSpawn,40;
OnTimer480000:	callsub OnMobSpawn,45;
OnTimer540000:	callsub OnMobSpawn,50;
OnTimer600000:
	killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
	stopnpctimer;
	end;
OnMobSpawn:
	.@label$ = instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
	.@map$ = instance_mapname("1@ma_b");
	killmonster .@map$,.@label$;
	.@mob_dead_num = mobcount(.@map$,.@label$);
	if (.@mob_dead_num < 50) {
		.@mob_rg = 50 - .@mob_dead_num;
		if (.@mob_rg > getarg(0))
			.@mob_rg = getarg(0);
		while(1) {
			areamonster .@map$,74,74,82,74,"Bakonawa's Puppet",2334,1,.@label$;
			.@mob_dead_num = mobcount(.@map$,.@label$);
			if (.@mob_dead_num >= .@mob_rg) {
				break;
			}
		}
	}
	end;
}

1@ma_b,62,52,4	script	Taho#Completed	4_M_DEWZATIMAN,{
	disable_items;
	if (checkweight(Knife,1) == 0) {
		mes "It seems you are carrying too many different kinds of items. Please try again after reducing it.";
		close;
	}
	if (MaxWeight - Weight < 10000) {
		mes "It seems you are already carrying items of too much weight. Please try again after reducing the weight.";
		close;
              }
	if (questprogress(12279,HUNTING) == 2) {
		erasequest 12279;
		mes "[Taho]";
		mes "This was found from Bakonawa's corpse. It would be better if you take this.";
//		if (IsPremiumPcCafe == 10)
			getitem Ancient_Grudge,7;
//		else
//			getitem Ancient_Grudge,5;
		getexp 0,100000;
		next;
	}
	mes "[Taho]";
	mes "We better hurry and get out of this place. This place is still dangerous even without Bakonawa...";
	next;
	mes "[Taho]";
	mes "Then let's use to the rope to go up!";
	close2;
	warp "ma_scene01",175,176;
	end;
OnInstanceInit:
	disablenpc instance_npcname("Taho#Completed");
	end;
OnStart:
	enablenpc instance_npcname("Taho#Completed");
	initnpctimer;
	end;
OnTimer1000:
	monster instance_mapname("1@ma_b"),78,74,"Bakonawa Treasure Box",2335,1;
	end;
OnTimer10000:
	mapannounce instance_mapname("1@ma_b"),"Taho: After opening the treasure box, please visit me at the top of the hill. I've got something to give to you.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
	stopnpctimer;
	end;
}

1@ma_b,62,52,4	script	Taho#Fail	4_M_DEWZATIMAN,{
	mes "[Taho]";
	mes "HMM. We almost got him but he is one fast creature...";
	next;
	if (getcharid(0) == getpartyleader(getcharid(1),2)) {
		mes "[Taho]";
		mes "Are we going to try again?";
		next;
		switch(select("Hold on a sec!", "Of course! We cannot stand back now!")) {
		case 1:
			mes "[Taho]";
			mes "AWW... I almost brought him out.";
			close;
		case 2:
			mes "[Taho]";
			mes "Then I will use Albopal once again to the lake.";
			next;
			mes "[Taho]";
			mes "We are about to see Bakonawa with intenser anger...";
			disablenpc instance_npcname("Taho#Fail");
			donpcevent instance_npcname("#Bakonawan1")+"::OnStart";
			close;
		}
		close;
	} else {
		mes "[Taho]";
		mes "I am dropping Albopal like I did a while ago. I hope it pisses him off...";
		close;
	}

OnInstanceInit:
	disablenpc instance_npcname("Taho#Fail");
	end;
OnStart:
	enablenpc instance_npcname("Taho#Fail");
	end;
}