summaryrefslogtreecommitdiff
path: root/npc/re/instances/MalangdoCulvert.txt
blob: 6e4862b81dc13caf083ab0c05ae29a8d72bfc656 (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
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
//================= 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)  Joseph
//= 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/>.
//=========================================================================
//= Malangdo Culvert
//================= Description ===========================================
//= Clean the culverts and defeat the Coelacanth.
//= Daily and weekly quests are available.
//= Contains a normal mode and hard mode.
//================= Current Version =======================================
//= 1.1
//=========================================================================

1@pump	mapflag	src4instance
2@pump	mapflag	src4instance

//== Quest NPCs ============================================
mal_in01,172,28,2	script	Albo#mal	4_CAT_SAILOR5,{
	if (checkweight(1201,1) == 0) {
		mes "You have too many kinds of objects. Try to continue after reducing those objects.";
		close;
	}
	if (MaxWeight - Weight < 1000) {
		mes "You have too many heavy objects. Try to continue after reducing your weight.";
		close;
	}
	if (BaseLevel < 90) {
		mes "[Albo]";
		mes "Who are you?";
		mes "We don't need a weaking!!";
		close;
	}
	setarray .@quests[0],12271,12272,12273,12274;
	setarray .@names$[0],
		"General Culvert Daily Service","^990000Hard Culvert Daily Service^000000",
		"General Culvert Weekly Service","^990000Hard Culvert Weekly Service^000000";
	.@menu$ = "Why are doing this job?:";
	for(.@i = 0; .@i<4; ++.@i) {
		if (questprogress(.@quests[.@i],PLAYTIME)) {
			.@status[.@i] = 2;
			.@menu$ += "^aaaaaa- There is no new task -^000000:";
		} else if (.@i%2 && BaseLevel < 140) {
			.@status[.@i] = 0;
			.@menu$ += "^aaaaaaCan't take this job because level is too low^000000:";
		} else {
			.@status[.@i] = 1;
			.@menu$ += .@names$[.@i]+":";
		}
	}
	mes "[Albo]";
	mes "We crossed the sea!";
	mes "We are great heroes of Culvert! We do not forgive the seafood that aims at Culvert!";
	next;
	.@i = select(.@menu$)-1;
	if (.@i == 0) {
		mes "[Albo]";
		mes "We used to be the henchmen of Mr. Missing! We almost became guards of such a historic site.";
		next;
		mes "[Albo]";
		mes "However, when sea water flooded all precious the resources, my dream... all my dreams melted away...";
		next;
		mes "[Albo]";
		mes "We do not forgive the seafood that invaded our territory. I'll eat them with spicy paste!!!";
		next;
		mes "^0000ffAlbo's voice shakes with anger. He smacked his lips when he mentioned spicy paste.^000000";
		close;
	}
	switch(.@status[.@i-1]) {
	case 0:
		mes "[Albo]";
		mes "That task is really hard for you, so I can't tell you about it. Why don't you find another one?";
		close;
	case 1:
		break;
	case 2:
		mes "[Albo]";
		mes "I'm sorry. There is no new task yet! If I find any work, I'll tell you so!";
		close;
	}
	switch(.@i) {
	case 1: // General Culvert Daily Service
		switch(rand(1,6)) {
			case 1: callsub L_GiveQuest,.@i,12255,12271,"Deep Sea Crab";
			case 2: callsub L_GiveQuest,.@i,12256,12271,"Deep Sea Marse";
			case 3: callsub L_GiveQuest,.@i,12257,12271,"Deep Sea Vadon";
			case 4: callsub L_GiveQuest,.@i,12258,12271,"Deep Sea Shellfish";
			case 5: callsub L_GiveQuest,.@i,12259,12271,"Deep Sea Kukre";
			case 6: callsub L_GiveQuest,.@i,12260,12271,"Deep Sea Cornutus";
		}
	case 2: // Hard Culvert Daily Service
		switch(rand(1,6)) {
			case 1: callsub L_GiveQuest,.@i,12261,12272,"Deep Sea Marc";
			case 2: callsub L_GiveQuest,.@i,12262,12272,"Deep Sea Sword Fish";
			case 3: callsub L_GiveQuest,.@i,12263,12272,"Deep Sea Strouf";
			case 4: callsub L_GiveQuest,.@i,12264,12272,"Deep Sea Anolian";
			case 5: callsub L_GiveQuest,.@i,12265,12272,"Deep Sea Obeanue";
			case 6: callsub L_GiveQuest,.@i,12266,12272,"Deep Sea Kapha";
		}
	case 3: // General Culvert Weekly Service
		switch(rand(1,2)) {
			case 1: callsub L_GiveQuest,.@i,12267,12273,"Weird Coelacanth";
			case 2: callsub L_GiveQuest,.@i,12268,12273,"Gloomy Coelacanth";
		}
	case 4: // Hard Culvert Weekly Service
		switch(rand(1,2)) {
			case 1: callsub L_GiveQuest,.@i,12269,12274,"Violent Coelacanth";
			case 2: callsub L_GiveQuest,.@i,12270,12274,"Mutant Coelacanth";
		}
	default:
		mes "[Albo]";
		mes "Uh!? Where is the task? Let me find that quickly. You must speak with Madeca!";
		close;
	}
	end;

// callsub L_GiveQuest,.@i,<quest 1>,<quest 2>,<monster>;
L_GiveQuest:
	setquest getarg(1);
	setquest getarg(2);
	mes "[Albo]";
	mes "Today, the heroes of Culvert!";
	mes "We raise our voices and set a date for the extermination of ^0000ff"+getarg(3)+"^000000!";
	next;
	mes "[Albo]";
	switch(getarg(0)) {
	case 1:
	case 2:
		mes "Come on, heroes! Don't be afraid of them! Just go on, since it's a one-day mission!";
		break;
	case 3:
		mes "I'll give you one week to finish this job! Terminate all of them in Culvert Dungeon, Normal Mode!";
		break;
	case 4:
		mes "I'll give you one week to finish this job! Terminate all of them in Culvert Dungeon, Hard Mode!";
		break;
	}
	next;
	mes "You received a request for the Extermination of ^005500"+getarg(3)+"^000000. If you need more details, please check the quest window.";
	close;
}

mal_in01,172,26,2	script	Madeca#mal	4_CAT_SAILOR1,{
	if (checkweight(1201,1) == 0) {
		mes "You have too many kinds of objects. Try to continue after reducing those objects.";
		close;
	}
	if (MaxWeight - Weight < 1000) {
		mes "You have too many heavy objects. Try to continue after reducing your weight.";
		close;
	}
	if (BaseLevel < 90) {
		mes "[Madeca]";
		mes "Karrrrrrr!!";
		mes "Let's have some bad seafood that can be boiled or grilled!";
		next;
		mes "[Madeca]";
		mes "Who are you? You are such a totterer. Even seaweed could kill you!";
		close;
	}
	mes "[Madeca]";
	mes "Oh?";
	mes "You're the one who took care of my big brother Albo's request. It was a hard job!";
	next;
	.@i = select("What are you doing here?:General Culvert Daily Service Compensation:Hard Culvert Daily Service Compensation:General Culvert Weekly Service Compensation:Hard Culvert Weekly Service Compensation")-1;
	if (.@i == 0) {
		mes "[Madeca]";
		mes "I'm here to help my big brother Albo!";
		next;
		mes "[Madeca]";
		mes "We provide precious materials to humans who make sludge out of the bad seafood in the Culverts!";
		next;
		mes "[Madeca]";
		mes "We provide A~B Grade Coins as compensation for daily service, and the precious Sea God's Wrath as compensation for weekly service.";
		next;
		mes "[Madeca]";
		mes "If you take care of big brother Albo's request, I will see you very often. So, let's stay close!";
		close;
	}
	mes "[Madeca]";
	mes "I can't give you compensation for an expired request, so let me check if any of yours have expired.";
	next;
	specialeffect2 EF_SPHERE;
	progressbar "0xFFFF00",3;
	specialeffect2 EF_STEAL;
	switch(.@i) {
	case 1: // General Culvert Daily Service
		if (questprogress(12271,PLAYTIME) == 2)
			callsub L_EraseQuest,12255,12256,12257,12258,12259,12260,12271;
		else {
			// Reward: 2x B Grade Coin
			callsub L_CheckQuest,12255,"Deep Sea Crab",6419,2;
			callsub L_CheckQuest,12256,"Deep Sea Marse",6419,2;
			callsub L_CheckQuest,12257,"Deep Sea Vadon",6419,2;
			callsub L_CheckQuest,12258,"Deep Sea Shellfish",6419,2;
			callsub L_CheckQuest,12259,"Deep Sea Kukre",6419,2;
			callsub L_CheckQuest,12260,"Deep Sea Cornutus",6419,2;
		}
		break;
	case 2: // Hard Culvert Daily Service
		if (questprogress(12272,PLAYTIME) == 2)
			callsub L_EraseQuest,12261,12262,12263,12264,12265,12266,12272;
		else {
			// Reward: 1x A Grade Coin
			callsub L_CheckQuest,12261,"Deep Sea Marc",6418,1;
			callsub L_CheckQuest,12262,"Deep Sea Sword Fish",6418,1;
			callsub L_CheckQuest,12263,"Deep Sea Strouf",6418,1;
			callsub L_CheckQuest,12264,"Deep Sea Anolian",6418,1;
			callsub L_CheckQuest,12265,"Deep Sea Obeaune",6418,1;
			callsub L_CheckQuest,12266,"Deep Sea Kapha",6418,1;
		}
		break;
	case 3: // General Culvert Weekly Service
		if (questprogress(12273,PLAYTIME) == 2)
			callsub L_EraseQuest,12267,12268,12273;
		else {
			// Reward: 1x Sea God's Wrath
			callsub L_CheckQuest,12267,"Weird Coelacanth",6423,1;
			callsub L_CheckQuest,12268,"Gloomy Coelacanth",6423,1;
		}
		break;
	case 4: // Hard Culvert Weekly Service
		if (questprogress(12274,PLAYTIME) == 2)
			callsub L_EraseQuest,12269,12270,12274;
		else {
			// Reward: 5x Sea God's Wrath
			callsub L_CheckQuest,12269,"Violent Coelacanth",6423,5;
			callsub L_CheckQuest,12270,"Mutant Coelacanth",6423,5;
		}
		break;
	default:
		mes "[Madeca]";
		mes "Something is wrong. Please check this again!";
		close;
	}
	mes "[Madeca]";
	mes "I don't see any completed mission!";
	close;

L_EraseQuest:
	for(.@j = 0; .@j<getargcount(); ++.@j) {
		if (questprogress(getarg(.@j)))
			erasequest getarg(.@j);
	}
	mes "[Madeca]";
	mes "Um, I'm sorry. You exceeded the time limit, so I can't give you any payment.";
	close;

// callsub L_CheckQuest,<quest ID>,<monster>,<reward item ID>,<reward item amount>;
L_CheckQuest:
	if (questprogress(getarg(0),HUNTING) == 2) {
		mes "[Madeca]";
		mes "You've punished ^0000ff"+getarg(1)+"^000000!";
		mes "Here's your pay!";
		erasequest getarg(0);
		specialeffect2 EF_STEAL;
		getitem getarg(2),getarg(3);
		close;
	}
	return;
}

//== Instance Creation =====================================
mal_in01,160,34,4	script	Missing, the Cleaner	4_CAT_SAILOR2,{
	if (BaseLevel < 90) {
		mes "[Missing, the Cleaner]";
		mes "Are you talking to me?!";
		next;
		mes "[Missing, the Cleaner]";
		mes "I'm not sure what made you come here but you can't enter!";
		mes "Tomas' orders...";
		next;
		mes "^770099You must be Base level 90 to enter.^000000";
		close;
	}
	if (in_canal_n == 0) {
		mes "[Missing, the Cleaner]";
		mes "(trembling)";
		next;
		mes "^660066This cat looks like it's in bad shape. It is slightly trembling.^000000";
		next;
		if(select("Pet the cat:Are you ok?") == 1) {
			mes "[Missing, the Cleaner]";
			mes "Are you talking to me?!";
			next;
			mes "^660066A trembling cat is looking up at you.^000000";
			close;
		}
		mes "[Missing, the Cleaner]";
		mes "Achoo!";
		next;
		mes "[Missing, the Cleaner]";
		mes "We have had many issues during the";
		mes "cleaning of the culverts. But a";
		mes "cat's gotta do it...";
		next;
		select("What culvert are you cleaning?");
		mes "[Missing, the Cleaner]";
		mes "It might look unfamiliar for an";
		mes "outsider, but actually this place";
		mes "is made to keep souvenirs and";
		mes "luxurious things.";
		next;
		mes "[Missing, the Cleaner]";
		mes "After there was a big trembling on";
		mes "this island, things started leaking";
		mes "around here. So that's why I became";
		mes "a cleaner here, though I used";
		mes "to be a manager.";
		next;
		mes "^660066The cat looks like it's been crying...^000000";
		next;
		mes "[Missing, the Cleaner]";
		mes "There is a culvert along this way";
		mes "to the basement. There are many bad";
		mes "guys who hurt me. I am tired of";
		mes "fighting with them so many times a";
		mes "day!";
		next;
		mes "[Missing, the Cleaner]";
		mes "Ohh! You touched my fur!";
		mes "My fur is falling out... it's all";
		mes "those guys' fault~";
		next;
		mes "^660066You just now notice that the cat's fur is missing in some places.^000000";
		next;
		select("Why don't you just quit!");
		mes "[Missing, the Cleaner]";
		mes "I still have to make a living, don't I?";
		next;
		mes "[Missing, the Cleaner]";
		mes "Sometimes I can get a lucky box,";
		mes "or even better, I can get cans...";
		next;
		if(select("Okay, cheers!:I will help if possible...") == 1) {
			mes "[Missing, the Cleaner]";
			mes "Thank you. I am going back to pour the water!";
			close;
		}
		mes "[Missing, the Cleaner]";
		mes "(turns down his voice)";
		mes "If you really want to help, come closer!";
		next;
		select("(get in closer)");
		mes "[Missing, the Cleaner]";
		mes "Not everyone can be an assistant";
		mes "here. But I can't help choosing";
		mes "anyone at the moment...";
		next;
		mes "[Missing, the Cleaner]";
		mes "If you want to go down here, let me get this code.";
		next;
		mes "^660066The cat scribbles a memo for code to you.^000000";
		next;
		select("Open the memo.");
		mes "^660000Aragam insulted me.^000000";
		next;
		mes "[Missing, the Cleaner]";
		mes "You must be here with friends";
		mes "because you can't go in alone! And";
		mes "the password code will be from the";
		mes "party leader!";
		next;
		mes "[Missing, the Cleaner]";
		mes "What is also important is you must";
		mes "have a Seagod Protection with you.";
		next;
		mes "[Missing, the Cleaner]";
		mes "Don't forget! I will not open the";
		mes "door if you do not have Seagod Protection!";
		in_canal_n = 1;
		close;
	}
	if (countitem(6436) == 0) {
		mes "[Missing, the Cleaner]";
		mes "You don't look like you have Seagod Protection. I can't open door at the moment!";
		close;
	}
	.@party_id = getcharid(1);
	.@md_name$ = "Culvert";
	if (!.@party_id) {
		mes "^0000ffYou have to organize a party of";
		mes "more than 1 member or be a member";
		mes "of the party and come back.^000000";
		close;
	}
	.@playtime = questprogress(12254,PLAYTIME);
	if (!.@playtime) {
		if (getcharid(0) == getpartyleader(.@party_id,2)) {
			mes "[Missing, the Cleaner]";
			mes "Ummm? What's up? Tell me the password if you're the leader!";
			next;
			switch(select("No... nothing.:Aragam insulted me.:Enter the Culvert.")) {
			case 1:
				mes "[Missing, the Cleaner]";
				mes "What a rookie.";
				close;
			case 2:
				.@instance = instance_create(.@md_name$,.@party_id);
				if (.@instance < 0) {
					mes "Party name: "+getpartyname(.@party_id);
					mes "Party leader: "+strcharinfo(0);
					mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
					close;
				}
				if (instance_attachmap("1@pump",.@instance) == "" || instance_attachmap("2@pump",.@instance) == "") {
					mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
					instance_destroy(.@instance);
					close;
				}
				instance_set_timeout 3600,300,.@instance;
				instance_init(.@instance);

				mes "^3333FF"+.@md_name$+"^000000 - Reserving";
				mes "After making the reservation, you";
				mes "have to select Enter the Culvert.";
				close;
			case 3:
				callsub L_Enter,0;
			}
		}
		if(select("Enter Culvert:Cancel") == 2)
			end;
		callsub L_Enter,1;
	} else if (.@playtime == 1) {
		mes "You can enter the Culvert if the gate is open.";
		next;
		if(select("Enter Culvert:Cancel") == 2)
			close;
		callsub L_Enter,0;
	} else if (.@playtime == 2) {
		mes "^0000ffThe gate to the Culvert is open again.^000000";
		erasequest 12254;
		close;
	}
	end;
L_Enter:
	if (has_instance("1@pump") == "") {
		if (questprogress(12254,PLAYTIME) == 1) {
			mes "The gate to the Culvert is still closed.";
			mes "You must wait until you are able to enter or find a party leader who can create the instance.";
			close;
		}
		mes "The memorial dungeon Culvert does not exist.";
		mes "The party leader has not reserved entrance to the dungeon yet.";
		close;
	}
	mapannounce "mal_in01", strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the Culvert.",bc_map,"0x00ff99";
	if (!questprogress(12254)) setquest 12254;
	warp "1@pump",63,98;
	end;
}

//== Instance: Common Scripts ==============================
1@pump,63,100,4	script	Missing, the Cleaner#0	4_CAT_SAILOR2,{
	if (getcharid(0) != getpartyleader(getcharid(1),2)) {
		mes "[Missing, the Cleaner]";
		mes "I am trying to have a conversation with your leader now. Please don't disturb and wait!";
		close;
	}
	mes "[Missing, the Cleaner]";
	mes "This is the underground culvert where you will clean with your friends!";
	next;
	mes "[Missing, the Cleaner]";
	mes "I'll open the door first. By the way, do you know how to fight?";
	next;
	switch(select("I'm pretty good at delivering bread.:I know how to fight.:^ffffffGive me the diamond.^000000")) {
	case 1:
		mes "[Missing, the Cleaner]";
		mes "Ok then, I'll let you clean the culverts here as usual! I will prepare at the right-hand corner, please follow me!";
		next;
		if(select("Wait! I changed my mind!:As you wish~") == 1) {
			mes "[Missing, the Cleaner]";
			mes "Huh? Not ready yet? Talk to me again when you're ready.";
			close;
		}
		'party_id = getcharid(1);
		mapannounce instance_mapname("1@pump"),"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15;
		disablenpc instance_npcname("Missing, the Cleaner#0");
		enablenpc instance_npcname("Missing, the Cleaner#n");
		close;
	case 2:
		if (BaseLevel < 140) {
			mes "[Missing, the Cleaner]";
			mes "Hmmm... Missing thinks you're weak! Tell me the truth!!";
			close;
		}
		mes "[Missing, the Cleaner]";
		mes "Huh? You have some fighting skills? Well, then, there is one place I wasn't able to clean... why don't you go there?!";
		next;
		mes "[Missing, the Cleaner]";
		mes "I must tell you that it's been such a long~~ time since we've cleaned that place, so anyone under level 140 cannot even enter! Are you sure you still want to go?";
		next;
		if(select("Wait! I changed my mind!:Sure, I'm prepared already~") == 1) {
			mes "[Missing, the Cleaner]";
			mes "Hmm? Talk to me again when you're ready.";
			close;
		}
		'party_id = getcharid(1);
		mapannounce instance_mapname("1@pump"),"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15;
		disablenpc instance_npcname("Missing, the Cleaner#0");
		enablenpc instance_npcname("Culvert Entrance#i");
		close;
	case 3:
		mes "[Missing, the Cleaner]";
		mes "I told you not to play with me~!";
		close;
	}
	end;
}

1@pump,84,105,0	script	Culvert Entrance#i	WARPNPC,3,3,{
	end;
OnInstanceInit:
	disablenpc instance_npcname("Culvert Entrance#i");
	end;
OnTouch:
	if (BaseLevel >= 140)
		warp instance_mapname("2@pump"),38,88;
	else
		warp instance_mapname("1@pump"),74,105;
	end;
}

function	script	F_mal_missing	{
	mes "[Missing, the Cleaner]";
	mes "I will tell you how to clean shortly. Can you see the culverts around you?";
	next;
	if(select("What culverts??:Yes, I see them.") == 1) {
		mes "[Missing, the Cleaner]";
		mes "Huh? Is this your first time seeing culverts? You'll see many buried machines in the ground. You may look around and come back!";
		close;
	}
	mes "[Missing, the Cleaner]";
	mes "That's right! Those culverts are very important! We must clean the culverts to prevent seaweed from blocking them. This is what we, cleaners, do!";
	next;
	mes "[Missing, the Cleaner]";
	mes "Watch out! Some monsters will be after you while you're cleaning the culverts! But do not yield to them!";
	next;
	mes "[Missing, the Cleaner]";
	mes "And... NEVER let 6 seaweeds stack! Up to 5 is acceptable! If there are 6, I'll drag you out of here!!";
	next;
	mes "[Missing, the Cleaner]";
	mes "I don't care if you get help from your friends or not. I want you to clean up all culverts! Don't forget! I will watch you and give you instructions. Just do what I said!!";
	next;
	if (getcharid(0) != getpartyleader(getcharid(1),2)) {
		mes "[Missing, the Cleaner]";
		mes "Once your leader finishes preparing, it will begin, so get your hearts ready for it!!";
		close;
	}
	mes "[Missing, the Cleaner]";
	mes "So, are you ready to clean now?";
	next;
	switch(select("Wait! Not yet!:Let's start!")) {
	case 1:
		mes "[Missing, the Cleaner]";
		mes "Huh? Not ready yet? Then talk to me when you're ready.";
		close;
	case 2:
		mes "[Missing, the Cleaner]";
		mes "OK! Now it begins!";
		return;
	}
}

//== Instance: Normal Mode =================================
1@pump,84,105,4	script	Missing, the Cleaner#nf	4_CAT_SAILOR2,{
	mes "[Missing, the Cleaner]";
	mes "I have the cleaning job for 40 years and I've never seen such a terrible team!!";
	next;
	mes "[Missing, the Cleaner]";
	mes "I see seaweed everywhere because you're wiggling! All the culverts will be blocked with seaweed!";
	next;
	if (getcharid(0) != getpartyleader(getcharid(1),2)) {
		mes "[Missing, the Cleaner]";
		mes "Once your leader finishes preparing, settlement will be decided so get your hearts ready for it!!";
		close;
	}
	mes "[Missing, the Cleaner]";
	mes "If you got some guts to challenge again, I'll give you another chance! What's your choice going to be!?";
	next;
	switch(select("Wait! Not yet!:Okay, let's start again!")) {
	case 1:
		mes "[Missing, the Cleaner]";
		mes "You're still slow! Talk to me again whenever your're ready.";
		close;
	case 2:
		mes "[Missing, the Cleaner]";
		mes "Ok! Let's start now!";
		.@i$ = charat(strnpcinfo(2),0);
		enablenpc instance_npcname("Missing, the Cleaner#"+.@i$);
		donpcevent instance_npcname("Missing, the Cleaner#"+.@i$)+"::OnStart";
		disablenpc instance_npcname("Culvert Entrance#"+.@i$);
		disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o");
		donpcevent instance_npcname("Monster Hole#"+.@i$)+"::OnClear";
		disablenpc instance_npcname(strnpcinfo(0));
		close;
	}
	close;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
}

1@pump,84,105,4	script	Missing, the Cleaner#n	4_CAT_SAILOR2,{
	callfunc "F_mal_missing";
	donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnStart";
	close;
OnInstanceInit:
	disablenpc instance_npcname("Missing, the Cleaner#n");
	end;
OnStart:
	killmonster instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
	disablenpc instance_npcname("Missing, the Cleaner#n");
	initnpctimer;
	end;
OnAddSeaweed:
	.@map$ = instance_mapname("1@pump");
	areamonster .@map$,55,99,61,105,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
	.@mob_dead_num = mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
	else
		mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
	end;
OnMyMobDead:
	end;
OnFail:
	stopnpctimer;
	donpcevent instance_npcname("Monster Hole#n")+"::OnClear";
	.@map$ = instance_mapname("1@pump");
	killmonster .@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
	enablenpc instance_npcname("Missing, the Cleaner#nf");
	mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
	disablenpc instance_npcname("Missing, the Cleaner#n");
	end;
OnTimer100:
	mapannounce instance_mapname("1@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
	end;
OnTimer5500:
	mapannounce instance_mapname("1@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
	donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
	end;
OnTimer45000:
OnTimer95000:
OnTimer145000:
OnTimer195000:
OnTimer245000:
OnTimer295000:
OnTimer345000:
OnTimer395000:
OnTimer445000:
	mapannounce instance_mapname("1@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
	end;
OnTimer50000:
OnTimer100000:
OnTimer150000:
	donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
	end;
OnTimer200000:
OnTimer250000:
OnTimer300000:
OnTimer350000:
OnTimer400000:
OnTimer450000:
	.@mob_dead_num = mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
	else
		donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
	end;
OnTimer515000:
	.@map$ = instance_mapname("1@pump");
	.@mob_dead_num = mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
	mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem. Missing will come and inspect the results of the cleaning soon.",bc_map,"0xff3333",FW_NORMAL,20;
	end;
OnTimer520000:
	stopnpctimer;
	.@mob_dead_num = mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
	else
		donpcevent instance_npcname("Boss Creation#n")+"::OnEnable";
	end;
}

1@pump,1,1,4	script	Monster Hole#n	-1,{
	end;
OnSpawn:
	.@i$ = charat(strnpcinfo(2),0);
	if (.@i$ == "n")
		.@n = 6;
	else if (.@i$ == "h")
		.@n = 10;
	donpcevent instance_npcname("#Culvert_"+.@i$+rand(1,.@n))+"::OnEnable";
	end;
OnClear:
	.@i$ = charat(strnpcinfo(2),0);
	if (.@i$ == "n")
		.@n = 6;
	else if (.@i$ == "h")
		.@n = 10;
	for(.@i = 1; .@i<=.@n; ++.@i)
		donpcevent instance_npcname("#Culvert_"+.@i$+.@n)+"::OnClear";
	end;
}

1@pump,36,111,4	script	#Culvert_n1	CLEAR_NPC,14,14,{ //temporary workaround for ALL_SAMEMAP
	progressbar "0xFFFF00",10;
	stopnpctimer;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnEnable:
	enablenpc instance_npcname(strnpcinfo(0));
	.@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
	.@map$ = instance_mapname("1@pump");
	.@index = atoi(charat(strnpcinfo(2),9));
	switch(.@index) {
		case 1: setarray .@c[0],32,107,40,115; break;
		case 2: setarray .@c[0],64,120,72,128; break;
		case 3: setarray .@c[0],76,110,84,118; break;
		case 4: setarray .@c[0],36,76,44,84; break;
		case 5: setarray .@c[0],71,76,79,84; break;
		case 6: setarray .@c[0],54,97,62,105; break;
	}
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Crab",2176,rand(1,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Marse",2175,rand(1,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Vadon",2174,rand(1,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Shellfish",2178,rand(1,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Kukre",2179,rand(1,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Cornutus",2177,rand(1,3),.@label$;
	specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken
	getmapxy(.@map$,.@x,.@y,1);
	getpartymember 'party_id,2;
	copyarray .@partymemberaid[0],$@partymemberaid[0],$@partymembercount;
	for(.@i = 0; .@i<$@partymembercount; ++.@i) {
		if (attachrid(.@partymemberaid[.@i])) {
			if (strcharinfo(3) == .@map$)
				viewpoint 0,.@x,.@y,.@index,0xFFFF00;
			detachrid;
		}
	}
	initnpctimer;
	end;
OnMyMobDead:
	end;
OnClear:
	stopnpctimer;
	killmonster instance_mapname("1@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
	end;
OnTimer49500:	//OnTimer50000 clashes with the timer in "Missing, the Cleaner#h".
	donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnAddSeaweed";
	donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnTouch:
	specialeffect EF_MAPPILLAR2;
	end;
}
1@pump,68,124,4	duplicate(#Culvert_n1)	#Culvert_n2	CLEAR_NPC,14,14
1@pump,80,114,4	duplicate(#Culvert_n1)	#Culvert_n3	CLEAR_NPC,14,14
1@pump,40,80,4	duplicate(#Culvert_n1)	#Culvert_n4	CLEAR_NPC,14,14
1@pump,75,80,4	duplicate(#Culvert_n1)	#Culvert_n5	CLEAR_NPC,14,14
1@pump,58,101,4	duplicate(#Culvert_n1)	#Culvert_n6	CLEAR_NPC,14,14

1@pump,1,1,4	script	Boss Creation#n	-1,{
	end;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnEnable:
	enablenpc instance_npcname(strnpcinfo(0));
	initnpctimer;
	end;
OnTimer100:
	.@i$ = charat(strnpcinfo(2),0);
	if (.@i$ == "n")
		mapannounce instance_mapname("1@pump"),"Hmm! That wasn't so bad!",bc_map,"0xff88ff",FW_NORMAL,15;
	else if (.@i$ == "h")
		mapannounce instance_mapname("2@pump"),"Hmm! You guys are pretty good!!",bc_map,"0xff88ff",FW_NORMAL,15;
	end;
OnTimer5000:
	mapannounce strnpcinfo(4),"Let's pack up and go... WHAT!!?",bc_map,"0xff88ff",FW_NORMAL,15;
	end;
OnTimer10000:
	mapannounce strnpcinfo(4),"I sense something strange!! Don't loosen up-- prepare for a fight!!",bc_map,"0xff88ff",FW_NORMAL,15;
	end;
OnTimer20000:
	stopnpctimer;
	.@i$ = charat(strnpcinfo(2),0);
	.@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
	if (rand(1,100) > 50) {
		if (.@i$ == "n")
			monster instance_mapname("1@pump"),0,0,"Weird Coelacanth",2188,1,.@label$;
		else if (.@i$ == "h")
			monster instance_mapname("2@pump"),0,0,"Mutant Coelacanth",2189,1,.@label$;
		mapannounce strnpcinfo(4),"Something big inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
	} else {
		if (.@i$ == "n")
			monster instance_mapname("1@pump"),0,0,"Gloomy Coelacanth",2187,1,.@label$;
		else if (.@i$ == "h")
			monster instance_mapname("2@pump"),0,0,"Violent Coelacanth",2190,1,.@label$;
		mapannounce strnpcinfo(4),"Something savage inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
	}
	end;
OnMyMobDead:
	if (mobcount(strnpcinfo(4),instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
		mapannounce strnpcinfo(4),"You've destroyed all monsters in the culverts. There are trophies lying on the ground, please look for them.",bc_map,"0xffff00",FW_NORMAL,15;
		.@i$ = charat(strnpcinfo(2),0);
		.@map$ = strnpcinfo(4);
		enablenpc instance_npcname("Culvert Entrance#"+.@i$);
		enablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o");
		if (.@i$ == "n") {
			for(.@i = 0; .@i<10; ++.@i) {
				.@j = rand(1,6401);
				     if (.@j < 5001) .@item = 12636; //Malang_Sp_Can
				else if (.@j < 5501) .@item = 12615; //Low_Coin_Pocket
				else if (.@j < 6001) .@item = 12621; //Egrade_Pocket
				else if (.@j < 6201) .@item = 12620; //Dgrade_Pocket
				else if (.@j < 6401) .@item = 12623; //High_Weapon_Box
				else continue;
				makeitem .@item,1,.@map$,rand(40,77),rand(87,120);
			}
		} else if (.@i$ == "h") {
			for(.@i = 0; .@i<10; ++.@i) {
				.@j = rand(1,5001);
				     if (.@j < 2001) .@item = 12615; //Low_Coin_Pocket
				else if (.@j < 3001) .@item = 12621; //Egrade_Pocket
				else if (.@j < 4001) .@item = 12620; //Dgrade_Pocket
				else if (.@j < 4501) .@item = 12619; //Cgrade_Pocket
				else if (.@j < 5001) .@item = 12623; //High_Weapon_Box
				else continue;
				makeitem .@item,1,.@map$,rand(40,77),rand(87,120);
			}
		}
	} else
		mapannounce strnpcinfo(4),"There are still monsters alive.",bc_map,"0x00ff99",FW_NORMAL,20;
	end;
}

1@pump,84,105,4	script	Missing, the Cleaner#no	4_CAT_SAILOR2,{
	.@i$ = charat(strnpcinfo(2),0);
	if (.@i$ == "n") {
		mes "[Missing, the Cleaner]";
		mes "I was very surprised!!";
		next;
		mes "[Missing, the Cleaner]";
		mes "That funny-looking fish seems to be one of Coelacanths living around here. This is my first time seeing one coming here alone!";
		next;
		mes "[Missing, the Cleaner]";
		mes "I'll clean up the remains. Go pack and leave! Enterance is located on the other side, look for it!";
		next;
	} else if (.@i$ == "h") {
		mes "[Missing, the Cleaner]";
		mes "You've destroyed an immense monster!";
		next;
		mes "[Missing, the Cleaner]";
		mes "The one you destroyed was among the variety of Coelacanths. Others have tried to destroy them but failed.";
		next;
		mes "[Missing, the Cleaner]";
		mes "I'll clean up the remains. You go ahead to get trophies and leave!";
		next;
	}
	mes "[Missing, the Cleaner]";
	mes "One more thing! DO NOT TALK to ANYONE about what you've seen here today!!";
	next;
	mes "[Missing, the Cleaner]";
	mes "If Tomas closes this down, we will lose our jobs!";
	close;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
}

1@pump,32,100,0	script	Culvert Entrance#n	WARPNPC,3,3,{
	end;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnTouch:
	warp "mal_in01",161,32;
	end;
}

//MD_Putmob "1@pump" 0 0 0 0 20 HYDRA 0 0 2
1@pump,1,1,4	script	Hydra#n	-1,{
OnInstanceInit:
	monster strnpcinfo(4),0,0,"Hydra",1068,20;
	end;
}

//== Instance: Hard Mode ===================================
2@pump,39,88,4	duplicate(Missing, the Cleaner#nf)	Missing, the Cleaner#hf	4_CAT_SAILOR2

2@pump,39,88,4	script	Missing, the Cleaner#h	4_CAT_SAILOR2,{
	callfunc "F_mal_missing";
	donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnStart";
	close;
OnStart:
	killmonster instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
	disablenpc instance_npcname("Missing, the Cleaner#h");
	initnpctimer;
	end;
OnAddSeaweed:
	.@map$ = instance_mapname("2@pump");
	areamonster .@map$,75,78,85,88,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
	.@mob_dead_num = mobcount(.@map$,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
	else
		mapannounce .@map$,"Proliferous Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
	end;
OnMyMobDead:
	end;
OnFail:
	stopnpctimer;
	donpcevent instance_npcname("Monster Hole#h")+"::OnClear";
	.@map$ = instance_mapname("2@pump");
	killmonster .@map$, instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
	enablenpc instance_npcname("Missing, the Cleaner#hf");
	mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
	disablenpc instance_npcname("Missing, the Cleaner#h");
	end;
OnTimer100:
	mapannounce instance_mapname("2@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
	end;
OnTimer5500:
	mapannounce instance_mapname("2@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
	donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
	end;
OnTimer35000:
OnTimer75000:
OnTimer115000:
OnTimer155000:
OnTimer195000:
OnTimer235000:
OnTimer275000:
OnTimer315000:
OnTimer355000:
	mapannounce instance_mapname("2@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
	end;
OnTimer40000:
OnTimer80000:
OnTimer120000:
	donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
	end;
OnTimer160000:
OnTimer200000:
OnTimer240000:
OnTimer280000:
OnTimer320000:
OnTimer360000:
	.@mob_dead_num = mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
	else
		donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
	end;
OnTimer420000:
	mapannounce instance_mapname("2@pump"),"It seems Missing will come and inspect the results of the cleaning soon. Shall we clean up the mess around here?",bc_map,"0xff3333",FW_NORMAL,20;
	end;
OnTimer425000:
	stopnpctimer;
	.@mob_dead_num = mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
	if (.@mob_dead_num >= 6)
		donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
	else
		donpcevent instance_npcname("Boss Creation#h")+"::OnEnable";
	end;
}

2@pump,53,114,4	script	#Culvert_h1	CLEAR_NPC,14,14,{ //temporary workaround for ALL_SAMEMAP
	progressbar "0xFFFF00",15;
	stopnpctimer;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnEnable:
	enablenpc instance_npcname(strnpcinfo(0));
	.@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
	.@map$ = instance_mapname("2@pump");
	.@index = atoi(substr(strnpcinfo(2),9,getstrlen(strnpcinfo(2))-1));
	switch(.@index) {
		case 1: setarray .@c[0],49,110,57,118; break;
		case 2: setarray .@c[0],75,105,83,113; break;
		case 3: setarray .@c[0],110,110,118,118; break;
		case 4: setarray .@c[0],94,94,102,102; break;
		case 5: setarray .@c[0],58,92,66,100; break;
		case 6: setarray .@c[0],53,66,61,74; break;
		case 7: setarray .@c[0],43,45,51,53; break;
		case 8: setarray .@c[0],77,59,85,67; break;
		case 9: setarray .@c[0],96,70,104,78; break;
		case 10: setarray .@c[0],111,46,119,54; break;
	}
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Marc",2182,rand(2,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Sword Fish",2181,rand(2,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Strouf",2180,rand(2,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Mutant Anolian",2183,rand(2,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Obeaune",2184,rand(2,3),.@label$;
	areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Metamorphous Kapha",2185,rand(2,3),.@label$;
	specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken
	initnpctimer;
	end;
OnMyMobDead:
	end;
OnClear:
	stopnpctimer;
	killmonster instance_mapname("2@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
	end;
OnTimer39500:	//OnTimer40000 clashes with the timer in "Missing, the Cleaner#h".
	donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnAddSeaweed";
	donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
	disablenpc instance_npcname(strnpcinfo(0));
	end;
OnTouch:
	specialeffect EF_MAPPILLAR2;
	end;
}
2@pump,79,109,4	duplicate(#Culvert_h1)	#Culvert_h2	CLEAR_NPC,14,14
2@pump,114,114,4	duplicate(#Culvert_h1)	#Culvert_h3	CLEAR_NPC,14,14
2@pump,98,98,4	duplicate(#Culvert_h1)	#Culvert_h4	CLEAR_NPC,14,14
2@pump,62,96,4	duplicate(#Culvert_h1)	#Culvert_h5	CLEAR_NPC,14,14
2@pump,57,70,4	duplicate(#Culvert_h1)	#Culvert_h6	CLEAR_NPC,14,14
2@pump,47,49,4	duplicate(#Culvert_h1)	#Culvert_h7	CLEAR_NPC,14,14
2@pump,81,63,4	duplicate(#Culvert_h1)	#Culvert_h8	CLEAR_NPC,14,14
2@pump,100,74,4	duplicate(#Culvert_h1)	#Culvert_h9	CLEAR_NPC,14,14
2@pump,115,50,4	duplicate(#Culvert_h1)	#Culvert_h10	CLEAR_NPC,14,14

2@pump,1,1,4	duplicate(Monster Hole#n)	Monster Hole#h	-1
2@pump,1,1,4	duplicate(Boss Creation#n)	Boss Creation#h	-1
2@pump,39,88,4	duplicate(Missing, the Cleaner#no)	Missing, the Cleaner#ho	4_CAT_SAILOR2
2@pump,38,100,0	duplicate(Culvert Entrance#n)	Culvert Entrance#h	WARPNPC,3,3

//MD_Putmob "2@pump" 0 0 0 0 20 HYDRA 0 0 2
2@pump,1,1,4	duplicate(Hydra#n)	Hydra#h	-1