beach_dun.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. //===== rAthena Script =======================================
  2. //= Beach Dungeon Monster Spawn Script
  3. //===== By: ==================================================
  4. //= Athena (1.0)
  5. //===== Current Version: =====================================
  6. //= 1.4
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Additional Comments: =================================
  10. //= 1.1 Official kRO 10.1 spawns [Playtester]
  11. //= 1.2 Small 11.1 spawn update [Playtester]
  12. //= 1.3 More accurate spawns [Playtester]
  13. //= 1.4 Corrected MVP spawn variance. [L0ne_W0lf]
  14. //= 1.5 Added Illusion of Luanda. [Capuche]
  15. //============================================================
  16. //==================================================
  17. // beach_dun - Karu, the West cave
  18. //==================================================
  19. beach_dun,0,0 monster Medusa 1148,60,5000
  20. beach_dun,0,0 monster Nereid 1255,20,5000
  21. beach_dun,0,0 monster Pest 1256,20,5000
  22. beach_dun,0,0 monster Merman 1264,3,5000
  23. beach_dun,0,0,0,0 boss_monster Tao Gunka 1583,1,18000000,600000,0
  24. //==================================================
  25. // beach_dun2 - Ruande the northern cave
  26. //==================================================
  27. beach_dun2,0,0 monster Stalactic Golem 1278,65,5000
  28. beach_dun2,0,0 monster Tri Joint 1279,20,5000
  29. beach_dun2,0,0 monster Megalith 1274,15,5000
  30. beach_dun2,0,0 monster Hydra 1068,10,5000
  31. beach_dun2,0,0 monster Nereid 1255,3,5000
  32. //==================================================
  33. // beach_dun3 - Mao, the East Cave
  34. //==================================================
  35. beach_dun3,0,0 monster Thara Frog 1034,50,5000
  36. beach_dun3,0,0 monster Megalodon 1064,30,5000
  37. beach_dun3,0,0 monster Hydra 1068,30,5000
  38. beach_dun3,0,0 monster Nereid 1255,1,5000
  39. //==================================================
  40. // Illusion of Luanda
  41. //==================================================
  42. // Todo: the count should start after the end of the cooldown?
  43. - script illusion_luanda -1,{
  44. end;
  45. OnMob20270: callsub( S_Mob, 20270, 5 ); // ILL_TRI_JOINT
  46. OnMob20271: callsub( S_Mob, 20271, 5 ); // ILL_STALACTIC_GOLEM
  47. OnMob20272: callsub( S_Mob, 20272, 5 ); // ILL_MEGALITH
  48. OnMob20274: callsub( S_Mob, 20274, 4 ); // ILL_STONE_SHOOTER
  49. OnMob20275: callsub( S_Mob, 20275, 4 ); // ILL_WOOTAN_SHOOTER
  50. OnMob20276: callsub( S_Mob, 20276, 4 ); // ILL_WOOTAN_FIGHTER
  51. S_Mob:
  52. .@group = getarg(1);
  53. if (.@group != .group)
  54. end;
  55. if (playerattached()) {
  56. if (.count < 1500)
  57. .count++;
  58. if (.count == 1500 && !.boss_spawn && !.cooldown) {
  59. getunitdata( killedgid, .@data );
  60. callsub( S_Boss, (20273 + .swap), .@group, .@data[UMOB_X], .@data[UMOB_Y] );
  61. }
  62. }
  63. .@mob_id = getarg(0);
  64. sleep 5000;
  65. if (.@group == .group) {
  66. monster "com_d02_i",0,0,"--ja--",.@mob_id,1,"illusion_luanda::OnMob" + .@mob_id;
  67. // setunittitle for the title, setunitdata
  68. setunitdata $@mobid[0], UMOB_GROUP_ID, getarg(1);
  69. }
  70. end;
  71. S_Boss:
  72. killmonster "com_d02_i", "illusion_luanda::OnBossDeath";
  73. .boss_spawn = true;
  74. monster "com_d02_i",getarg(2),getarg(3),"--ja--",getarg(0),1,"illusion_luanda::OnBossDeath";
  75. setunitdata $@mobid[0], UMOB_GROUP_ID, getarg(1);
  76. if (.swap == 0) // ILL_TAO_GUNKA
  77. mapannounce "com_d02_i", "Ancient Tao Gunka: Is it time to show off your megalithic power?", bc_map, 0x70DBDB;
  78. else // ILL_WOOTAN_DEFENDER
  79. mapannounce "com_d02_i", "Ancient Wootan Defender: I guess I'll have to step in after all these useless guys.", bc_map, 0x70DBDB;
  80. end;
  81. OnBossDeath:
  82. killmonster "com_d02_i", "illusion_luanda::OnBossDeath";
  83. .boss_spawn = false;
  84. .cooldown = true;
  85. if (.swap == 0) { // ILL_TAO_GUNKA
  86. mapannounce "com_d02_i", "Ancient Tao Gunka: Megaliths, it's time to crouch and hold your breath.", bc_map, 0x70DBDB;
  87. sleep 2000;
  88. mapannounce "com_d02_i", "Ancient Tao Gunka: We'll grow stronger as we unhook and step out into the world.", bc_map, 0x70DBDB;
  89. sleep 2000;
  90. mapannounce "com_d02_i", "Ancient Tao Gunka: Crouch. When you crouch, you megalith.", bc_map, 0x70DBDB;
  91. }
  92. else { // ILL_WOOTAN_DEFENDER
  93. mapannounce "com_d02_i", "Ancient Wootan Defender: Ugh.. Quite a dangerous wound..", bc_map, 0x70DBDB;
  94. sleep 2000;
  95. mapannounce "com_d02_i", "Ancient Wootan Defender: You pushed me, a warrior of the Wootan tribe, this far. It's pretty good. It's a pity, but I'm going to step down now.", bc_map, 0x70DBDB;
  96. sleep 2000;
  97. mapannounce "com_d02_i", "Ancient Wootan Defender: Listen to all Wootans! Leave now and commit to the next one.", bc_map, 0x70DBDB;
  98. }
  99. sleep 1000;
  100. .group = (.group == 4 ? 5 : 4);
  101. // all the mobs are killed and immediately replaced with new mobs
  102. for ( .@i = 0; .@i < 3; ++.@i ) {
  103. .@mob_id = 20270 + .@i + .swap;
  104. killmonster "com_d02_i", "illusion_luanda::OnMob" + .@mob_id;
  105. }
  106. .swap = .swap ^ 4; // swap 0 -> 4, 4 -> 0 (used for mob ID)
  107. callsub( S_SpawnInit,
  108. (20270 + .swap),
  109. (20271 + .swap),
  110. (20272 + .swap)
  111. );
  112. initnpctimer;
  113. end;
  114. OnTimer7200000:
  115. .cooldown = false;
  116. stopnpctimer;
  117. end;
  118. S_SpawnInit:
  119. .count = 0;
  120. monster "com_d02_i",0,0,"--ja--",getarg(0),50,"illusion_luanda::OnMob" + getarg(0);
  121. copyarray .@gid[0], $@mobid[0], 50;
  122. monster "com_d02_i",0,0,"--ja--",getarg(1),50,"illusion_luanda::OnMob" + getarg(1);
  123. copyarray .@gid[50], $@mobid[0], 50;
  124. monster "com_d02_i",0,0,"--ja--",getarg(2),50,"illusion_luanda::OnMob" + getarg(2);
  125. copyarray .@gid[100], $@mobid[0], 50;
  126. for ( .@i = 0; .@i < 150; ++.@i )
  127. setunitdata .@gid[.@i], UMOB_GROUP_ID, .group;
  128. return;
  129. OnInit:
  130. .group = 5; // UMOB_GROUP_ID
  131. callsub( S_SpawnInit,
  132. 20270, // ILL_TRI_JOINT
  133. 20271, // ILL_STALACTIC_GOLEM
  134. 20272 // ILL_MEGALITH
  135. );
  136. end;
  137. }