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
|
//================= 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/>.
//=========================================================================
//= Buwaya Cave
//================= Description ===========================================
//= Defeat Buwaya in his cave.
//= Part of the "Secret in the Woods" quest.
//================= Current Version =======================================
//= 1.0
//=========================================================================
1@ma_c mapflag src4instance
ma_fild02,312,317,5 script Guard#buwaya_cave 4_MAL_SOLDIER,{
if (BaseLevel < 130) {
mes "[Guard]";
mes "People under ^ff0000level 130^000000";
mes "cannot enter this place.";
mes "This place is dangerous. Please go back.";
close;
}
.@party_id = getcharid(1);
.@md_name$ = "Buwaya Cave";
if (!.@party_id) {
mes "[Guard]";
mes "Buwaya is dangerous.";
mes "Please come back after you form a";
mes "team with other people.";
close;
}
if (getcharid(0) == getpartyleader(.@party_id,2)) {
mes "[Guard]";
mes "This place is dangerous. Please go back.";
mes "If you dont have any business here, please go back.";
next;
while(1) {
switch(select("Why is it so dangerous?", "I'm here to hunt down Buwaya.", "End conversation.")) {
case 1:
mes "[Guard]";
mes "Recently, there has been a case";
mes "where villagers have disappeared.";
mes "After investigating the tracks, ";
mes "we found out the giant monster Buwaya";
mes "was responsible.";
next;
mes "[Guard]";
mes "Soldiers and mercenaries have been dispatched to ";
mes "hunt down Buwaya, but were never";
mes "completely successful.";
next;
mes "[Guard]";
mes "Buwaya is still kidnapping";
mes "the villagers to this day.";
mes "Please gather some people to get rid of Buwaya.";
next;
break;
case 2:
.@playtime = questprogress(4229,PLAYTIME);
if (!.@playtime) {
// fall through
} else if (.@playtime == 1) {
mes "[Guard]";
mes "Buwaya is still hiding.";
mes "Even if you enter now, Buwaya will not come out. ";
mes "Please come back later.";
close;
} else {
erasequest 4229;
// fall through
}
.@instance = instance_create(.@md_name$,.@party_id);
if (.@instance < 0) {
mes "[Guard]";
mes "Party name is... "+getpartyname(.@party_id)+".";;
mes "Party leader is... "+strcharinfo(PC_NAME);
mes "^0000ff"+.@md_name$+"^000000 cannot be opened now.";
mes "Please try a moment later.";
close;
}
if (instance_attachmap("1@ma_c",.@instance) == "") {
mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
instance_destroy(.@instance);
close;
}
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
mes "[Guard]";
mes "I will open up the tunnel to ^0000ff"+.@md_name$+"^000000.";
mes "I wish you good luck.";
close;
case 3:
mes "[Guard]";
mes "This place is dangerous. You cannot enter.";
close;
}
}
} else {
mes "[Guard]";
mes "Let me talk with the party leader.";
mes "Please call forth the leader.";
close;
}
}
ma_fild02,315,323,0 script Cave Entrance#buwaya WARPNPC,2,2,{
end;
OnTouch:
if (BaseLevel < 130) {
mes "[Guard]";
mes "People under ^ff0000level 130^000000";
mes "cannot enter this place.";
mes "This place is dangerous. Please go back.";
close;
}
.@playtime = questprogress(4229,PLAYTIME);
if (!.@playtime) {
// fall through
} else if (.@playtime == 1) {
mes "[Guard]";
mes "Buwaya is still hiding.";
mes "Even if you enter now, Buwaya will not come out.";
mes "Please come back later.";
close;
} else {
erasequest 4229;
// fall through
}
switch(select("Enter.", "Turn back.")) {
case 1:
if( has_instance("1@ma_c") == "" ) {
mes "The memorial dungeon Buwaya Cave does not exist.";
mes "The party leader did not generate the dungeon yet.";
close;
} else {
mapannounce "ma_fild02",getpartyname(getcharid(1))+" party's "+strcharinfo(PC_NAME)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
setquest 4229;
warp "1@ma_c",35,57;
end;
}
case 2:
mes "[Guard]";
mes "You must value your life.";
mes "It is better to think carefully before you act.";
close;
}
}
1@ma_c,33,112,0 script #damage HIDDEN_WARP_NPC,7,7,{
end;
OnInstanceInit:
initnpctimer;
disablenpc instance_npcname("#damage");
end;
OnTimer1000:
enablenpc instance_npcname("#damage");
specialeffect EF_POISONHIT;
end;
OnTimer2000:
stopnpctimer;
initnpctimer;
disablenpc instance_npcname("#damage");
end;
OnTouch:
percentheal -10,-10;
sc_start SC_BLOODING,60000,0;
sc_start SC_POISON,60000,0;
end;
}
1@ma_c,29,110,5 script Kidnapped People#1 4_F_BARYO_OLD,{
mes "[Kidnapped Residents]";
mes "Buwaya was running around,";
mes "and new people got caught.";
mes "We will be stuck in here for the rest of our lives.";
next;
switch(select("Get me outta here!!", "Ca...can't escape?")) {
case 1:
mes "[Kidnapped Residents]";
mes "We don't have enough power to destroy it but Buwaya has a weakness.";
mes "Look at the wall over there.";
mes "If you knock there, Buywaya will feel pain and spit you out.";
donpcevent instance_npcname("#box_mob_call")+"::OnEnable";
close2;
disablenpc instance_npcname("Kidnapped People#1");
end;
case 2:
mes "[Kidnapped People]";
mes "Somthing is wrong here...";
mes "Have you experienced this before?";
close;
}
end;
OnInstanceInit:
disablenpc instance_npcname("Kidnapped People#1");
end;
OnEnable:
enablenpc instance_npcname("Kidnapped People#1");
donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
end;
}
1@ma_c,36,110,5 script Kidnapped People#2 4_M_BARYO_OLD,{
mes "[Kidnapped Residents]";
mes "Ahaa! I wish I had a little more power...";
mes "I know its weakness...";
next;
switch(select("Tell me.", "Do you really know?")) {
case 1:
mes "[Kidnapped Residents]";
mes "Are you sure you can do it...?";
mes "Ok, listen carefully,";
mes "its weakness is...";
next;
mes "[Kidnapped Residents]";
mes "...behind us on the walls.";
sc_start SC_ATKPOTION,60000,45;
sc_start SC_MATKPOTION,60000,45;
disablenpc instance_npcname("Kidnapped People#2");
close;
case 2:
mes "[Kidnapped Residents]";
mes "WHAT?!";
mes "Are you ignoring me";
mes "because I'm captured in here?";
close;
}
end;
OnInstanceInit:
disablenpc instance_npcname("Kidnapped People#2");
end;
OnEnable:
enablenpc instance_npcname("Kidnapped People#2");
end;
}
1@ma_c,3,3,0 script #box_mob_call HIDDEN_WARP_NPC,1,1,{
end;
OnInstanceInit:
setcell instance_mapname("1@ma_c"),30,118,35,118,cell_shootable,1; //custom
disablenpc instance_npcname("#box_mob_call");
end;
OnEnable:
enablenpc instance_npcname("#box_mob_call");
.@label$ = instance_npcname("#box_mob_call")+"::OnMyMobDead";
.@map$ = instance_mapname("1@ma_c");
monster .@map$,30,118,"Buwaya's Weakness",2333,1,.@label$;
monster .@map$,35,118,"Buwaya's Weakness",2333,1,.@label$;
end;
OnDisable:
killmonster instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead";
disablenpc instance_npcname("#box_mob_call");
end;
OnMyMobDead:
if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead") < 1)
donpcevent instance_npcname("#box_out")+"::OnEnable";
end;
}
1@ma_c,38,118,0 script #box_out WARPNPC,2,2,{
OnInstanceInit:
OnDisable:
disablenpc instance_npcname("#box_out");
end;
OnEnable:
enablenpc instance_npcname("#box_out");
end;
OnTouch:
.@x = rand(1,20) + 97;
.@y = rand(1,20) + 74;
warp instance_mapname("1@ma_c"),.@x,.@y;
end;
}
1@ma_c,97,74,0 script #box_call HIDDEN_WARP_NPC,50,50,{
end;
OnInstanceInit:
disablenpc instance_npcname("#box_call");
initnpctimer;
end;
OnTimer30000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : I will put you in my treasure box!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
// Should execute OnTimer33000, but client doesn't render the effect fast enough.
for(.@i = 1; .@i<=9; ++.@i)
donpcevent instance_npcname("#yunobi"+.@i)+"::OnEnable";
end;
OnTimer33000:
donpcevent instance_npcname("#box_out")+"::OnDisable";
donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
donpcevent instance_npcname("Kidnapped People#1")+"::OnEnable";
donpcevent instance_npcname("Kidnapped People#2")+"::OnEnable";
end;
OnTimer34000:
enablenpc instance_npcname("#box_call");
end;
OnTimer35000:
stopnpctimer;
initnpctimer;
disablenpc instance_npcname("#box_call");
end;
OnTouch:
specialeffect2 EF_GUIDEDATTACK;
warp instance_mapname("1@ma_c"),33,112;
end;
OnDisable:
stopnpctimer;
disablenpc instance_npcname("#box_call");
end;
}
1@ma_c,97,74,0 script #yunobi1 HIDDEN_WARP_NPC,{
end;
OnInstanceInit:
hideonnpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
specialeffect EF_MAPPILLAR2;
end;
}
1@ma_c,97,94,0 duplicate(#yunobi1) #yunobi2 HIDDEN_WARP_NPC
1@ma_c,117,94,0 duplicate(#yunobi1) #yunobi3 HIDDEN_WARP_NPC
1@ma_c,117,74,0 duplicate(#yunobi1) #yunobi4 HIDDEN_WARP_NPC
1@ma_c,117,54,0 duplicate(#yunobi1) #yunobi5 HIDDEN_WARP_NPC
1@ma_c,97,54,0 duplicate(#yunobi1) #yunobi6 HIDDEN_WARP_NPC
1@ma_c,77,54,0 duplicate(#yunobi1) #yunobi7 HIDDEN_WARP_NPC
1@ma_c,77,74,0 duplicate(#yunobi1) #yunobi8 HIDDEN_WARP_NPC
1@ma_c,77,94,0 duplicate(#yunobi1) #yunobi9 HIDDEN_WARP_NPC
1@ma_c,1,1,0 script #bunshin HIDDEN_WARP_NPC,{
end;
OnInstanceInit:
initnpctimer;
end;
OnTimer58000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : I had enough with this, let's go till the end!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer61000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : This is!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer62000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer63000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer64000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly... ATTACK!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer65000:
.@label$ = instance_npcname("#bunshin")+"::OnMyMobDead";
.@map$ = instance_mapname("1@ma_c");
areamonster .@map$,112,89,122,99,"Buwaya",2332,1,.@label$;
areamonster .@map$,112,49,122,59,"Buwaya",2332,1,.@label$;
areamonster .@map$,72,49,82,59,"Buwaya",2332,1,.@label$;
areamonster .@map$,72,89,82,99,"Buwaya",2332,1,.@label$;
end;
OnTimer66000:
mapannounce instance_mapname("1@ma_c"),"Buwaya : Are you scared?",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
end;
OnTimer105000:
killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
stopnpctimer;
initnpctimer;
end;
OnMyMobDead:
if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead") < 1) {
stopnpctimer;
initnpctimer;
}
end;
OnDisable:
stopnpctimer;
killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
disablenpc instance_npcname("#bunshin");
end;
}
1@ma_c,2,2,0 script #buwaya_con HIDDEN_WARP_NPC,{
end;
OnInstanceInit:
areamonster instance_mapname("1@ma_c"),90,67,104,81,"Buwaya",2319,1,instance_npcname("#buwaya_con")+"::OnMyMobDead";
end;
OnMyMobDead:
.@map$ = instance_mapname("1@ma_c");
if (mobcount(.@map$,instance_npcname("#buwaya_con")+"::OnMyMobDead") < 1) {
donpcevent instance_npcname("#box_call")+"::OnDisable";
donpcevent instance_npcname("#bunshin")+"::OnDisable";
donpcevent instance_npcname("#exit_mob")+"::OnDisable";
donpcevent instance_npcname("#cave_out")+"::OnEnable";
mapannounce .@map$,"Guard : You did great work. Please hurry up and escape to the way you came in!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
}
end;
}
1@ma_c,3,3,0 script #exit_mob HIDDEN_WARP_NPC,{
end;
OnInstanceInit:
initnpctimer;
end;
OnTimer60000:
.@label$ = instance_npcname("#exit_mob")+"::OnMyMobDead";
.@map$ = instance_mapname("1@ma_c");
if (mobcount(.@map$,.@label$) < 30)
.@amount = 10;
else
.@amount = 1;
areamonster .@map$,43,58,47,60,"Water Plant",2331,.@amount,.@label$;
areamonster .@map$,43,58,47,60,"Egg",2329,.@amount,.@label$;
stopnpctimer;
initnpctimer;
end;
OnDisable:
stopnpctimer;
killmonster instance_mapname("1@ma_c"),instance_npcname("#exit_mob")+"::OnMyMobDead";
disablenpc instance_npcname("#exit_mob");
end;
OnMyMobDead:
end;
}
1@ma_c,28,57,0 script #cave_out WARPNPC,2,2,{
OnInstanceInit:
disablenpc instance_npcname("#cave_out");
end;
OnEnable:
enablenpc instance_npcname("#cave_out");
end;
OnTouch:
mes "Would like to go out?";
next;
if(select("Yes!", "No, I will stay.") == 1)
warp "ma_fild02",315,315;
close;
}
1@ma_c,1,1,0 script #buwaya_spawn_mobs FAKE_NPC,{
OnInstanceInit:
.@map$ = instance_mapname("1@ma_c");
areamonster .@map$,73,81,93,101,"Seaweed",2331,18;
areamonster .@map$,110,97,116,103,"Seaweed",2331,8;
areamonster .@map$,59,63,63,67,"Seaweed",2331,8;
areamonster .@map$,73,55,77,59,"Seaweed",2331,4;
areamonster .@map$,103,69,107,73,"Seaweed",2331,4;
areamonster .@map$,108,45,122,63,"Seaweed",2331,15;
areamonster .@map$,73,81,93,101,"Buwaya's Egg",2329,10;
areamonster .@map$,110,97,116,103,"Buwaya's Egg",2329,8;
areamonster .@map$,59,63,63,67,"Buwaya's Egg",2329,4;
areamonster .@map$,73,55,77,59,"Buwaya's Egg",2329,3;
areamonster .@map$,103,69,107,73,"Buwaya's Egg",2329,3;
areamonster .@map$,108,45,122,63,"Buwaya's Egg",2329,15;
monster .@map$,0,0,"Seaweed",2331,5;
monster .@map$,0,0,"Buwaya's Slave",2330,5;
end;
}
|