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
|
// --------------------------------- Cave 1 -----------------------------------
025-4.gat,41,91,0 script #StartCaveFight1 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave1 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave1_loop, $@cave1_loop + 1;
areamonster "025-4.gat",26,63,60,97,"",$@CAVE1_MONSTERS_IDS[$@cave1_loop],$@CAVE1_MONSTERS_QTY[$@cave1_loop],"#StartCaveFight1::OnMonsterDeath";
if ($@cave1_loop <= getarraysize($@CAVE1_MONSTERS_IDS)) goto L_Summon;
set $@cave1_loop, 0;
set $@wave_cave1, $@wave_cave1 + 1;
end;
L_Done:
set $@cave1_kills, 0;
attachrid(getcharid(3,$@cave1fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave1 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave1 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave1 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave1 != $@CAVE1_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE1);
warp "025-3.gat", 78, 129;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave1fighter$));
set $@wave_cave1, 0;
set $@cave1_kills, 0;
set $@cave1start, 0;
set $@cave1fighter$, "";
set $@cave1fighterdeaths$, 0;
set $@battlecave1, 0;
killmonster "025-4.gat", "#StartCaveFight1::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave1_kills, $@cave1_kills + 1;
if ($@cave1_kills >= $@CAVE1_MONSTERS_QTY[1] + $@CAVE1_MONSTERS_QTY[2] + $@CAVE1_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE1_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE1_MONSTERS_QTY[1], 3, 2, 1;
// Number of waves.
set $@CAVE1_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE1_TIME, 30;
}
// --------------------- Cave 1 Checker ----------------------------
025-4.gat,41,97,0 script #CheckCaveFight1 127,1,1,{
if (cavefight & BATTLE_CAVE1) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 78, 130;
end;
}
// --------------------------------- Cave 2 ---------------------------------------
025-4.gat,110,90,0 script #StartCaveFight2 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave2 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave2_loop, $@cave2_loop + 1;
areamonster "025-4.gat",97, 62, 126, 96,"",$@CAVE2_MONSTERS_IDS[$@cave2_loop],$@CAVE2_MONSTERS_QTY[$@cave2_loop],"#StartCaveFight2::OnMonsterDeath";
if ($@cave2_loop <= getarraysize($@CAVE2_MONSTERS_IDS)) goto L_Summon;
set $@cave2_loop, 0;
set $@wave_cave2, $@wave_cave2 + 1;
end;
L_Done:
set $@cave2_kills, 0;
attachrid(getcharid(3,$@cave2fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave2 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave2 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave2 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave2 != $@CAVE2_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE2);
warp "025-3.gat", 53, 109;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave2fighter$));
set $@wave_cave2, 0;
set $@cave2_kills, 0;
set $@cave2start, 0;
set $@cave2fighter$, "";
set $@cave2fighterdeaths$, 0;
set $@battlecave2, 0;
killmonster "025-4.gat", "#StartCaveFight2::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave2_kills, $@cave2_kills + 1;
if ($@cave2_kills >= $@CAVE2_MONSTERS_QTY[1] + $@CAVE2_MONSTERS_QTY[2] + $@CAVE2_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE2_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE2_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE2_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE2_TIME, 30;
}
// --------------------- Cave 2 Checker ----------------------------
025-4.gat,110,96,0 script #CheckCaveFight2 127,1,1,{
if (cavefight & BATTLE_CAVE2) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 53, 110;
end;
}
// ------------------------------------ Cave 3 --------------------------------------
025-4.gat,168,111,0 script #StartCaveFight3 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave3 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave3_loop, $@cave3_loop + 1;
areamonster "025-4.gat",150, 84, 177, 117,"",$@CAVE3_MONSTERS_IDS[$@cave3_loop],$@CAVE3_MONSTERS_QTY[$@cave3_loop],"#StartCaveFight3::OnMonsterDeath";
if ($@cave3_loop <= getarraysize($@CAVE3_MONSTERS_IDS)) goto L_Summon;
set $@cave3_loop, 0;
set $@wave_cave3, $@wave_cave3 + 1;
end;
L_Done:
set $@cave3_kills, 0;
attachrid(getcharid(3,$@cave3fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave3 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave3 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave3 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave3 != $@CAVE3_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE3);
warp "025-3.gat", 71, 85;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave3fighter$));
set $@wave_cave3, 0;
set $@cave3_kills, 0;
set $@cave3start, 0;
set $@cave3fighter$, "";
set $@cave3fighterdeaths$, 0;
set $@battlecave3, 0;
killmonster "025-4.gat", "#StartCaveFight3::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave3_kills, $@cave3_kills + 1;
if ($@cave3_kills >= $@CAVE3_MONSTERS_QTY[1] + $@CAVE3_MONSTERS_QTY[2] + $@CAVE3_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE3_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE3_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE3_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE3_TIME, 30;
}
// --------------------- Cave 3 Checker ----------------------------
025-4.gat,168,117,0 script #CheckCaveFight3 127,1,1,{
if (cavefight & BATTLE_CAVE3) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 71, 85;
end;
}
// --------------------------- Cave 4 --------------------------------
025-4.gat,32,150,0 script #StartCaveFight4 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave4 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave4_loop, $@cave4_loop + 1;
areamonster "025-4.gat",28, 124, 57, 156,"",$@CAVE4_MONSTERS_IDS[$@cave4_loop],$@CAVE4_MONSTERS_QTY[$@cave4_loop],"#StartCaveFight4::OnMonsterDeath";
if ($@cave4_loop <= getarraysize($@CAVE4_MONSTERS_IDS)) goto L_Summon;
set $@cave4_loop, 0;
set $@wave_cave4, $@wave_cave4 + 1;
end;
L_Done:
set $@cave4_kills, 0;
attachrid(getcharid(3,$@cave4fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave4 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave4 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave4 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave4 != $@CAVE4_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE4);
warp "025-3.gat", 80, 85;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave4fighter$));
set $@wave_cave4, 0;
set $@cave4_kills, 0;
set $@cave4start, 0;
set $@cave4fighter$, "";
set $@cave4fighterdeaths$, 0;
set $@battlecave4, 0;
killmonster "025-4.gat", "#StartCaveFight4::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave4_kills, $@cave4_kills + 1;
if ($@cave4_kills >= $@CAVE4_MONSTERS_QTY[1] + $@CAVE4_MONSTERS_QTY[2] + $@CAVE4_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE4_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE4_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE4_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE4_TIME, 30;
}
// --------------------- Cave 4 Checker ----------------------------
025-4.gat,32,156,0 script #CheckCaveFight4 127,1,1,{
if (cavefight & BATTLE_CAVE4) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 80, 85;
end;
}
// ---------------------------- Cave 5 ------------------------------
025-4.gat,100,154,0 script #StartCaveFight5 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave5 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave5_loop, $@cave5_loop + 1;
areamonster "025-4.gat",91, 131, 124, 160,"",$@CAVE5_MONSTERS_IDS[$@cave5_loop],$@CAVE5_MONSTERS_QTY[$@cave5_loop],"#StartCaveFight5::OnMonsterDeath";
if ($@cave5_loop <= getarraysize($@CAVE5_MONSTERS_IDS)) goto L_Summon;
set $@cave5_loop, 0;
set $@wave_cave5, $@wave_cave5 + 1;
end;
L_Done:
set $@cave5_kills, 0;
attachrid(getcharid(3,$@cave5fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave5 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave5 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave5 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave5 != $@CAVE5_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE5);
warp "025-3.gat", 71, 32;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave5fighter$));
set $@wave_cave5, 0;
set $@cave5_kills, 0;
set $@cave5start, 0;
set $@cave5fighter$, "";
set $@cave5fighterdeaths$, 0;
set $@battlecave5, 0;
killmonster "025-4.gat", "#StartCaveFight5::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave5_kills, $@cave5_kills + 1;
if ($@cave5_kills >= $@CAVE5_MONSTERS_QTY[1] + $@CAVE5_MONSTERS_QTY[2] + $@CAVE5_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE5_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE5_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE5_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE5_TIME, 30;
}
// --------------------- Cave 5 Checker ----------------------------
025-4.gat,100,160,0 script #CheckCaveFight5 127,1,1,{
if (cavefight & BATTLE_CAVE5) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 71, 33;
end;
}
// -------------------------------- Cave 6 -----------------------------------------
025-4.gat,159,168,0 script #StartCaveFight6 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave6 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave6_loop, $@cave6_loop + 1;
areamonster "025-4.gat",153, 143, 178, 174,"",$@CAVE6_MONSTERS_IDS[$@cave6_loop],$@CAVE6_MONSTERS_QTY[$@cave6_loop],"#StartCaveFight6::OnMonsterDeath";
if ($@cave6_loop <= getarraysize($@CAVE6_MONSTERS_IDS)) goto L_Summon;
set $@cave6_loop, 0;
set $@wave_cave6, $@wave_cave6 + 1;
end;
L_Done:
set $@cave6_kills, 0;
attachrid(getcharid(3,$@cave6fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave6 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave6 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave6 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave6 != $@CAVE6_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE6);
warp "025-3.gat", 128, 37;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave6fighter$));
set $@wave_cave6, 0;
set $@cave6_kills, 0;
set $@cave6start, 0;
set $@cave6fighter$, "";
set $@cave6fighterdeaths$, 0;
set $@battlecave6, 0;
killmonster "025-4.gat", "#StartCaveFight6::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave6_kills, $@cave6_kills + 1;
if ($@cave6_kills >= $@CAVE6_MONSTERS_QTY[1] + $@CAVE6_MONSTERS_QTY[2] + $@CAVE6_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE6_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE6_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE6_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE6_TIME, 30;
}
// --------------------- Cave 6 Checker ----------------------------
025-4.gat,159,174,0 script #CheckCaveFight6 127,1,1,{
if (cavefight & BATTLE_CAVE6) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 128, 38;
end;
}
// -------------------------------- Cave 7 -----------------------------------
025-4.gat,39,215,0 script #StartCaveFight7 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave7 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave7_loop, $@cave7_loop + 1;
areamonster "025-4.gat",27, 185, 61, 219,"",$@CAVE7_MONSTERS_IDS[$@cave7_loop],$@CAVE7_MONSTERS_QTY[$@cave7_loop],"#StartCaveFight7::OnMonsterDeath";
if ($@cave7_loop <= getarraysize($@CAVE7_MONSTERS_IDS)) goto L_Summon;
set $@cave7_loop, 0;
set $@wave_cave7, $@wave_cave7 + 1;
end;
L_Done:
set $@cave7_kills, 0;
attachrid(getcharid(3,$@cave7fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave7 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave7 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave7 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave7 != $@CAVE7_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE7);
warp "025-3.gat", 70, 59;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave7fighter$));
set $@wave_cave7, 0;
set $@cave7_kills, 0;
set $@cave7start, 0;
set $@cave7fighter$, "";
set $@cave7fighterdeaths$, 0;
set $@battlecave7, 0;
killmonster "025-4.gat", "#StartCaveFight7::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave7_kills, $@cave7_kills + 1;
if ($@cave7_kills >= $@CAVE7_MONSTERS_QTY[1] + $@CAVE7_MONSTERS_QTY[2] + $@CAVE7_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE7_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE7_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE7_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE7_TIME, 30;
}
// --------------------- Cave 7 Checker ----------------------------
025-4.gat,42,219,0 script #CheckCaveFight7 127,1,1,{
if (cavefight & BATTLE_CAVE7) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 70, 60;
end;
}
// --------------------------- Cave 8 -------------------------------
025-4.gat,105,210,0 script #StartCaveFight8 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave8 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave8_loop, $@cave8_loop + 1;
areamonster "025-4.gat",90, 193, 119, 216,"",$@CAVE8_MONSTERS_IDS[$@cave8_loop],$@CAVE8_MONSTERS_QTY[$@cave8_loop],"#StartCaveFight8::OnMonsterDeath";
if ($@cave8_loop <= getarraysize($@CAVE8_MONSTERS_IDS)) goto L_Summon;
set $@cave8_loop, 0;
set $@wave_cave8, $@wave_cave8 + 1;
end;
L_Done:
set $@cave8_kills, 0;
attachrid(getcharid(3,$@cave8fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave8 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave8 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave8 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave8 != $@CAVE8_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE8);
warp "025-3.gat", 138, 94;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave8fighter$));
set $@wave_cave8, 0;
set $@cave8_kills, 0;
set $@cave8start, 0;
set $@cave8fighter$, "";
set $@cave8fighterdeaths$, 0;
set $@battlecave8, 0;
killmonster "025-4.gat", "#StartCaveFight8::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave8_kills, $@cave8_kills + 1;
if ($@cave8_kills >= $@CAVE8_MONSTERS_QTY[1] + $@CAVE8_MONSTERS_QTY[2] + $@CAVE8_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE8_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE8_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE8_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE8_TIME, 30;
}
// --------------------- Cave 8 Checker ----------------------------
025-4.gat,105,216,0 script #CheckCaveFight8 127,1,1,{
if (cavefight & BATTLE_CAVE8) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 138, 95;
end;
}
// --------------------------- Cave 9 -------------------------------
025-4.gat,157,220,0 script #StartCaveFight9 111,{
if (Rossy_Quest < 15) goto L_Cheat;
if ($@battlecave9 == 1) goto L_Summon;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Summon:
set $@cave9_loop, $@cave9_loop + 1;
areamonster "025-4.gat",144, 192, 173, 226,"",$@CAVE9_MONSTERS_IDS[$@cave9_loop],$@CAVE9_MONSTERS_QTY[$@cave9_loop],"#StartCaveFight9::OnMonsterDeath";
if ($@cave9_loop <= getarraysize($@CAVE9_MONSTERS_IDS)) goto L_Summon;
set $@cave9_loop, 0;
set $@wave_cave9, $@wave_cave9 + 1;
end;
L_Done:
set $@cave9_kills, 0;
attachrid(getcharid(3,$@cave9fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave9 == 1) message strcharinfo(0), "Oh no, more monsters?!";
if ($@wave_cave9 == 2) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave9 == 3) message strcharinfo(0), "You feel strange, your feet start trembling and some kind of force pulls you with an amazing strengh!";
if ($@wave_cave9 != $@CAVE9_WAVES) goto L_Summon;
set cavefights, (cavefights ^ BATTLE_CAVE9);
warp "025-3.gat", 138, 158;
goto L_Cleaning;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave9fighter$));
set $@wave_cave9, 0;
set $@cave9_kills, 0;
set $@cave9start, 0;
set $@cave9fighter$, "";
set $@cave9fighterdeaths$, 0;
set $@battlecave9, 0;
killmonster "025-4.gat", "#StartCaveFight9::OnMonsterDeath";
end;
OnMonsterDeath:
set $@cave9_kills, $@cave9_kills + 1;
if ($@cave9_kills >= $@CAVE9_MONSTERS_QTY[1] + $@CAVE9_MONSTERS_QTY[2] + $@CAVE9_MONSTERS_QTY[3]) goto L_Done;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned.
setarray $@CAVE9_MONSTERS_IDS[1], 1002, 1003, 1004;
// Number of monsters of each ID.
setarray $@CAVE9_MONSTERS_QTY[1], 5, 3, 2;
// Number of waves.
set $@CAVE9_WAVES, 3;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE9_TIME, 30;
}
// --------------------- Cave 9 Checker ----------------------------
025-4.gat,157,226,0 script #CheckCaveFight9 127,1,1,{
if (cavefight & BATTLE_CAVE9) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Done:
warp "025-3.gat", 138, 158;
end;
}
// --------------------- Boss Cave ----------------------------
025-4.gat,157,42,0 script #StartBossCaveFight 111,{
if (Rossy_Quest == 16) goto L_Found;
if ($@battlebosscave == 1 && cavefights & BATTLE_CAVE1 && cavefights & BATTLE_CAVE2 && cavefights & BATTLE_CAVE3 && cavefights & BATTLE_CAVE4 && cavefights & BATTLE_CAVE5 && cavefights & BATTLE_CAVE6 && cavefights & BATTLE_CAVE7 && cavefights & BATTLE_CAVE8 && cavefights & BATTLE_CAVE9 && Rossy_Quest == 15) goto L_Summon;
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Found:
message strcharinfo(0), "You found a golden key.";
set Killed_Boss, 1;
end;
L_Summon:
set $@cave10_loop, $@cave10_loop + 1;
areamonster "025-4.gat",142, 24, 172, 48,"",$@CAVE10_MONSTERS_IDS[$@cave10_loop],$@CAVE10_MONSTERS_QTY[$@cave10_loop],"#StartBossCaveFight::OnMonsterDeath";
if ($@cave10_loop <= getarraysize($@CAVE10_MONSTERS_IDS)) goto L_Summon;
set $@cave10_loop, 0;
set $@wave_cave10, $@wave_cave10 + 1;
end;
L_SummonBoss:
attachrid(getcharid(3,$@cave10fighter$));
message strcharinfo(0), "WHaaat? What is this?!";
areamonster "025-4.gat",142, 24, 172, 48,"",$@BOSS,1,"#StartBossCaveFight::OnBossDeath";
stopnpctimer;
setnpctimer 0;
end;
L_Done:
set $@cave10_kills, 0;
attachrid(getcharid(3,$@cave10fighter$));
// Here you can define the messages to be shown for the players on the beginning of each wave.
// Remember to adjust the number of conditionals according to the number of waves.
if ($@wave_cave10 == 1) message strcharinfo(0), "I can't give up now!";
if ($@wave_cave10 == 2) message strcharinfo(0), "I feel I'm getting close to the end...";
if ($@wave_cave10 == 3) message strcharinfo(0), "What? This is harder than I imagined!";
if ($@wave_cave10 == 4) message strcharinfo(0), "Finally! It seems I have defeated all of them! Wait... what is that?!";
if ($@wave_cave10 != $@CAVE10_WAVES) goto L_Summon;
set $@wave_cave10, 5;
startnpctimer;
end;
L_Cleaning:
attachrid(getcharid(3,$@cave10fighter$));
set $@wave_cave10, 0;
set $@cave10_kills, 0;
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
set $@battlebosscave, 0;
killmonster "025-4.gat", "#StartBossCaveFight::OnMonsterDeath";
killmonster "025-4.gat", "#StartBossCaveFight::OnBossDeath";
end;
OnTimer4000:
attachrid(getcharid(3,$@cave10fighter$));
set @boss, @boss + 1;
if (@boss == 1) message strcharinfo(0), "Due to the number of monsters in this cave, you feel you have more time to kill them all before other monsters come.";
if (@boss == 2) goto L_SummonBoss;
setnpctimer 0;
end;
OnMonsterDeath:
set $@cave10_kills, $@cave10_kills + 1;
if ($@cave10_kills >= $@CAVE10_MONSTERS_QTY[1] + $@CAVE10_MONSTERS_QTY[2] + $@CAVE10_MONSTERS_QTY[3]) goto L_Done;
end;
OnBossDeath:
attachrid(getcharid(3,$@cave10fighter$));
set $@wave_cave10, 0;
set $@cave10_kills, 0;
set $@cave10start, 0;
set $@cave10fighter$, "";
set $@cave10fighterdeaths$, 0;
message strcharinfo(0), "What a harsh battle! Oh, a golden key, it might open the chest!";
set Rossy_Quest, 16;
set Boss_10, 0;
end;
onInit:
// Here you can define the specifics of each battle cave.
// Monsters IDs to be spawned. before the boss.
setarray $@CAVE10_MONSTERS_IDS[1], 1002, 1003, 1004, 1036;
// Number of monsters of each ID.
setarray $@CAVE10_MONSTERS_QTY[1], 5, 3, 2, 1;
// ID of the boss monster.
set $@BOSS, 1067;
// Number of waves. before the boss.
set $@CAVE10_WAVES, 4;
// Maximum time (in seconds) for the player to finish the fight.
set $@CAVE10_TIME, 120;
}
// --------------------- Boss Cave Checker ----------------------------
025-4.gat,157,48,0 script #CheckCaveFight1 127,1,1,{
if (Rossy_Quest >= 17) goto L_Done;
if (Killed_Boss == 1) goto L_Done;
message strcharinfo(0), "Evil forces make you stop, you need to defeat them first before getting out.";
end;
L_Killed:
message strcharinfo(0), "The little girl seems so close, you can't let her stay here.";
end;
L_Done:
warp "025-3.gat", 77, 168;
end;
}
// --------------------- Julia Cave Checker Outside ----------------------------
025-4.gat,157,24,0 script #CheckJuliaCaveOutside 127,1,1,{
if (Killed_Boss == 1) goto L_Done;
message strcharinfo(0), "As you try to walk through, you bump into an invisible door. You might need a key to open it.";
end;
L_Done:
warp "025-4.gat", 93, 33;
end;
}
// --------------------- Julia Cave Checker Inside ----------------------------
025-4.gat,93,35,0 script #CheckJuliaCaveInside 127,1,1,{
if (Rossy_Quest >= 17 && Killed_Boss == 1) goto L_Done;
if (Rossy_Quest >= 17 && Killed_Boss == 0) goto L_Cheat2;
if (Rossy_Quest == 16 && Killed_Boss == 1) goto L_Save;
if (Rossy_Quest == 16 && Killed_Boss == 0) goto L_Cheat3;
if (Rossy_Quest <= 15) goto L_Cheat;
end;
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
percentheal -100, 0;
end;
L_Cheat2:
message strcharinfo(0), "You saved Julia without having killed the boss? Is that even possible?";
percentheal -100, 0;
end;
L_Cheat3:
message strcharinfo(0), "You can save Julia without killing the boss? Cheating isn't fair.";
percentheal -100, 0;
end;
L_Done:
warp "025-4.gat", 157, 26;
end;
L_Save:
message strcharinfo(0), "You can't leave Julia here, all alone!";
end;
}
|