devil_square.txt 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. //===== rAthena Script =======================================
  2. //= Devil Square
  3. //===== By: ==================================================
  4. //= Kirlein, Stillhard (translation), AnnieRuru (rewrite)
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Devil Square, based on the event in MU Online.
  11. //= Defeat three waves of monsters for treasure.
  12. //===== Additional Comments: =================================
  13. //= 1.0 First version, edited. [Euphy]
  14. //============================================================
  15. prontera,156,185,5 script Devil Square Guardian#1 406,{
  16. set .@gm_level, 99; // GM level required to start/stop the event
  17. mes "[Devil Square Guardian]";
  18. mes "This is the entrance to ^FF0000Devil Square^000000.";
  19. mes "If you fail or die, the door will close and you must wait until the event starts again to re-enter.";
  20. next;
  21. switch(select("Enter.:Information.:" + ((getgmlevel() >= .@gm_level) ? "GM Menu." : "") + ":Cancel.")) {
  22. case 1:
  23. if (.start != 1) { // registration period
  24. mes "[Devil Square Guardian]";
  25. mes "Devil Square is now closed.";
  26. mes "It will open at these times:";
  27. mes "00:00 , 02:00 , 04:00 , 06:00"; // display your times here
  28. mes "08:00 , 10:00 , 12:00 , 14:00";
  29. mes "16:00 , 18:00 , 20:00 , 22:00";
  30. close;
  31. }
  32. if (BaseLevel < 70 || Zeny < 20000) { // requirements
  33. mes "[Devil Square Guardian]";
  34. mes "You do not meet the requirements to enter Devil Square.";
  35. mes " ";
  36. mes "Requirements:";
  37. mes " - Base Level 70";
  38. mes " - Registration fee 20,000z";
  39. close;
  40. }
  41. Zeny -= 20000;
  42. announce strcharinfo(0)+" has entered Devil Square.", bc_npc;
  43. percentheal 100,100;
  44. warp "ordeal_1-1",183,182;
  45. close;
  46. case 2:
  47. mes "[Devil Square Guardian]";
  48. mes "Inside, you will encounter 3 waves of monsters. The monsters will grow stronger with each wave.";
  49. next;
  50. mes "[Devil Square Guardian]";
  51. mes "If you defeat all the enemies, you will be given the opportunity to open 10 Treasure Chests with items, equipment, and rare cards inside!";
  52. close;
  53. case 3:
  54. mes "[Devil Square Guardian]";
  55. switch (.start) { // event states
  56. case 0: mes "Devil Square has not yet started."; break;
  57. case 1: mes "Devil Square is currently accepting participants."; break;
  58. case 2: mes "Devil Square Event is currently running on Round "+ .round +" with "+ .mob +" monsters remaining."; break;
  59. }
  60. next;
  61. switch(select("Start event.:Stop event.:Cancel.")) {
  62. case 1:
  63. mes "[Devil Square Guardian]";
  64. if (.start)
  65. mes "Devil Square has already started.";
  66. else {
  67. mes "Starting Devil Square...";
  68. donpcevent strnpcinfo(0)+"::OnStartEvent";
  69. }
  70. close;
  71. case 2:
  72. mes "[Devil Square Guardian]";
  73. if (!.start)
  74. mes "Devil Square has not yet started.";
  75. else {
  76. mes "Stopping Devil Square...";
  77. donpcevent strnpcinfo(0)+"::OnStopEvent";
  78. }
  79. close;
  80. case 3:
  81. break;
  82. }
  83. break;
  84. case 4:
  85. break;
  86. }
  87. mes "[Devil Square Guardian]";
  88. mes "Farewell.";
  89. close;
  90. OnStartEvent:
  91. OnClock0000:
  92. OnClock0200:
  93. OnClock0400:
  94. OnClock0600:
  95. OnClock0800:
  96. OnClock1000:
  97. OnClock1200:
  98. OnClock1400:
  99. OnClock1600:
  100. OnClock1800:
  101. OnClock2000:
  102. OnClock2200:
  103. .start = 1;
  104. disablenpc "ord11-12"; //from npc/warps/pvp.txt
  105. disablenpc "Devil Square Guardian#2";
  106. mapannounce "ordeal_1-1","Devil Square is now closed.", bc_map;
  107. getmapxy .@map$, .@x, .@y, 1;
  108. mapwarp "ordeal_1-1", .@map$, .@x, .@y;
  109. killmonsterall "ordeal_1-1";
  110. announce "Devil Square is OPEN. The event will begin in 5 minutes.", bc_all;
  111. sleep 60000;
  112. announce "Devil Square will begin in 4 minutes.", bc_all;
  113. sleep 60000;
  114. announce "Devil Square will begin in 3 minutes.", bc_all;
  115. sleep 60000;
  116. announce "Devil Square will begin in 2 minutes.", bc_all;
  117. sleep 60000;
  118. announce "Devil Square will begin in 1 minute.", bc_all;
  119. sleep 60000;
  120. announce "Devil Square has STARTED!", bc_all;
  121. if ( !getmapusers("ordeal_1-1") )
  122. goto OnStopEvent;
  123. .start = 2;
  124. .round = 1;
  125. .mob = 75;
  126. areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::OnDevilDead";
  127. areamonster "ordeal_1-1",183,182,246,244,"[DS] ORC ARCHER",1189,15,strnpcinfo(0)+"::OnDevilDead";
  128. areamonster "ordeal_1-1",183,182,246,244,"[DS] SANDMAN",1165,10,strnpcinfo(0)+"::OnDevilDead";
  129. areamonster "ordeal_1-1",183,182,246,244,"[DS] ARCHER SKELETON",1016,15,strnpcinfo(0)+"::OnDevilDead";
  130. areamonster "ordeal_1-1",183,182,246,244,"[DS] MINOROUS",1149,15,strnpcinfo(0)+"::OnDevilDead";
  131. areamonster "ordeal_1-1",183,182,246,244,"[DS] REQUIEM",1164,10,strnpcinfo(0)+"::OnDevilDead";
  132. end;
  133. OnDevilDead:
  134. .mob--;
  135. if ( .mob == 25 || .mob == 5 )
  136. announce "Devil Square : "+ .mob +" monsters remaining in round 1.", bc_map;
  137. else if ( .mob <= 0 ) {
  138. announce "Devil Square is entering round 2...", bc_map;
  139. goto OnDevil2;
  140. }
  141. end;
  142. OnDevil2:
  143. .round = 2;
  144. .mob = 70;
  145. areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::OnDevilDead2";
  146. areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::OnDevilDead2";
  147. areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::OnDevilDead2";
  148. areamonster "ordeal_1-1",183,182,246,244,"[DS] INJUSTICE",1257,10,strnpcinfo(0)+"::OnDevilDead2";
  149. areamonster "ordeal_1-1",183,182,246,244,"[DS] MIMIC",1191,15,strnpcinfo(0)+"::OnDevilDead2";
  150. areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1192,10,strnpcinfo(0)+"::OnDevilDead2";
  151. end;
  152. OnDevilDead2:
  153. .mob--;
  154. if ( .mob == 25 || .mob == 5 )
  155. announce "Devil Square : "+ .mob +" monsters remaining in round 2.", bc_map;
  156. else if ( .mob <= 0 ) {
  157. announce "Devil Square is entering round 3...", bc_map;
  158. goto OnDevil3;
  159. }
  160. end;
  161. OnDevil3:
  162. .round = 3;
  163. .mob = 58;
  164. areamonster "ordeal_1-1",183,182,246,244,"[DS] ANOLIAN",1206,15,strnpcinfo(0)+"::OnDevilDead3";
  165. areamonster "ordeal_1-1",183,182,246,244,"[DS] WANDERER",1208,15,strnpcinfo(0)+"::OnDevilDead3";
  166. areamonster "ordeal_1-1",183,182,246,244,"[DS] DEVIRUCHI",1109,10,strnpcinfo(0)+"::OnDevilDead3";
  167. areamonster "ordeal_1-1",183,182,246,244,"[DS] JOKER",1131,15,strnpcinfo(0)+"::OnDevilDead3";
  168. areamonster "ordeal_1-1",183,182,246,244,"[DS] MOONLIGHT",1150,2,strnpcinfo(0)+"::OnDevilDead3";
  169. areamonster "ordeal_1-1",183,182,246,244,"[DS] DARK ILLUSION",1302,1,strnpcinfo(0)+"::OnDevilDead3";
  170. end;
  171. OnDevilDead3:
  172. .mob--;
  173. if ( .mob == 25 || .mob == 5 )
  174. announce "Devil Square : "+ .mob +" monsters remaining in the final round.", bc_map;
  175. else if ( .mob <= 0 ) {
  176. announce "Devil Square : CONGRATULATIONS. These 10 Treasure Chests are yours.", bc_map;
  177. goto OnDevil4;
  178. }
  179. end;
  180. OnDevil4:
  181. .round = 4;
  182. .mob = 10;
  183. monster "ordeal_1-1",231,250,"Treasure Chest",1324,1,strnpcinfo(0)+"::OnTreasureDead";
  184. monster "ordeal_1-1",234,247,"Treasure Chest",1328,1,strnpcinfo(0)+"::OnTreasureDead";
  185. monster "ordeal_1-1",237,244,"Treasure Chest",1332,1,strnpcinfo(0)+"::OnTreasureDead";
  186. monster "ordeal_1-1",240,241,"Treasure Chest",1336,1,strnpcinfo(0)+"::OnTreasureDead";
  187. monster "ordeal_1-1",243,238,"Treasure Chest",1340,1,strnpcinfo(0)+"::OnTreasureDead";
  188. monster "ordeal_1-1",246,235,"Treasure Chest",1344,1,strnpcinfo(0)+"::OnTreasureDead";
  189. monster "ordeal_1-1",249,232,"Treasure Chest",1348,1,strnpcinfo(0)+"::OnTreasureDead";
  190. monster "ordeal_1-1",252,229,"Treasure Chest",1352,1,strnpcinfo(0)+"::OnTreasureDead";
  191. monster "ordeal_1-1",249,241,"Treasure Chest",1356,1,strnpcinfo(0)+"::OnTreasureDead";
  192. monster "ordeal_1-1",240,249,"Treasure Chest",1360,1,strnpcinfo(0)+"::OnTreasureDead";
  193. end;
  194. OnTreasureDead:
  195. .mob--;
  196. announce "Devil Square : "+ strcharinfo(0) +" has opened the Treasure Chest at Devil Square.", bc_all;
  197. if ( .mob <= 0 )
  198. goto OnStopEvent;
  199. end;
  200. OnStopEvent:
  201. killmonsterall "ordeal_1-1";
  202. enablenpc "ord11-12"; //from npc/warps/pvp.txt
  203. enablenpc "Devil Square Guardian#2";
  204. .start = .round = .mob = 0;
  205. end;
  206. }
  207. ordeal_1-1,246,245,7 script Devil Square Guardian#2 406,{
  208. mes "[Exit]";
  209. mes "Farewell.";
  210. close2;
  211. warp "SavePoint",0,0;
  212. end;
  213. }
  214. ordeal_1-1 mapflag nowarp
  215. ordeal_1-1 mapflag nowarpto
  216. ordeal_1-1 mapflag noteleport
  217. ordeal_1-1 mapflag monster_noteleport
  218. ordeal_1-1 mapflag nosave SavePoint
  219. ordeal_1-1 mapflag nomemo
  220. ordeal_1-1 mapflag nobranch
  221. ordeal_1-1 mapflag nopenalty
  222. ordeal_1-1 mapflag noicewall