Advertisement
Guest User

MVP Event

a guest
Oct 11th, 2012
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.46 KB | None | 0 0
  1. //============================================================
  2. //= Auto MVP Summoner
  3. //===== By: =======================Modified By:=========
  4. //= xMachina / Acetito Emistry / Myzter
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= eA SVN 5000+
  9. //===== Additional Comments: =================================
  10. //= v1.0 Testing Mode
  11. //============================================================
  12.  
  13.  
  14. mid_camp,167,271,5 script MVP Attack 811,{
  15. if (getgmlevel() < 20) {
  16. mes "[ ^0065DFxMachina^000000 ]";
  17. if (!.Event) {
  18. mes "There is no MVP Attack Event now.";
  19. } else {
  20. mes "There is a MVP Attack Event on now!";
  21. mes "Location: ^ff0000" + $@Map$ + "^000000";
  22. }
  23. close;
  24. }
  25. set .@ItsOK,0;
  26. set .@SpecialMVP, $@SpecialMVP;
  27. set .@NormalMVP, $@NormalMVP;
  28. set .@Amount, $@Amount;
  29. set .@ItemID, $@ItemID;
  30. set .@Map$, $@Map$;
  31. while(!.@Configuring) {
  32. mes "[ ^0065DFxMachina^000000 ]";
  33. mes "Customizing MVP Attack Event:";
  34. mes "> MVP Item: " + (.@Amount?"^0000ff" + .@Amount:"^ff0000<Undefined>") + "^000000 x " + (getitemname(.@ItemID) == "null"?"^ff0000<Item>":"^0000ff" + getitemname(.@ItemID)) + "^000000";
  35. mes "> Location: " + (getstrlen(.@Map$)?"^0000ff" + .@Map$:"^ff0000<Undefined>") + "^000000";
  36. mes "> Special MVP: " + (.@SpecialMVP?"^0000ff" + .@SpecialMVP:"^ff0000<None>") + "^000000";
  37. mes "> Normal MVP: " + (.@NormalMVP?"^0000ff" + .@NormalMVP:"^ff0000<None>") + "^000000";
  38. mes "> Status: " + (.Event?"^ff44ffActive^000000":"^ff0000Inactive^000000");
  39. next;
  40.  
  41. set .@ItsOK, getitemname(.@ItemID)!="null" && getstrlen(.@Map$) && getstrlen(.@Map$) < 24 && .@Amount && .@SpecialMVP && .@NormalMVP;
  42.  
  43. if (.Event) {
  44. set .@Menu$, "^ff0000[·] Stop Event^000000:::::[x] ^ff0000Exit^000000";
  45. } else {
  46. set .@Menu$, (.Event?":":(.@ItsOK?"^0000ff[!] Start Event^000000:":":") + "- Set MVP Item:- Set Location:- Special MVP Count:- Normal MVP Count:[x] ^ff0000Exit^000000");
  47. }
  48.  
  49. switch(select(.@Menu$)) {
  50. case 1:
  51. mes "[ ^0065DFxMachina^000000 ]";
  52. mes "Are you sure you want to " + (.Event?"Stop the Event":"Start the Event") + "?";
  53. next;
  54. set .@Configuring, select("No:Yes")-1;
  55. break;
  56. case 2:
  57. mes "[ ^0065DFxMachina^000000 ]";
  58. mes "What item to be given to MVP Killer ?";
  59. next;
  60. do {
  61. message strcharinfo(0),"Enter a VALID itemID. Example 501 - Red Potion.";
  62. input .@ItemID,501,32767;
  63. } while (getitemname(.@ItemID) == "null");
  64. mes "[ ^0065DFxMachina^000000 ]";
  65. mes "Input the Amount of ^0000ff" + getitemname(.@ItemID) + "^000000 to be Rewarded for Special MVP Killer.";
  66. next;
  67. input .@Amount,1,30000;
  68. break;
  69. case 3:
  70. mes "[ ^0065DFxMachina^000000 ]";
  71. mes "Which map would you like me to host this event?";
  72. mes "Input a ^FF0000VALID^000000 mapname.";
  73. next;
  74. do {
  75. message strcharinfo(0),"Enter a VALID map. Example - izlude.";
  76. input .@Map$;
  77. monster .@Map$,0,0,".",1084,1,strnpcinfo(3)+"::OnNormalKill";
  78. sleep2 100;
  79. set .@MC, mobcount(.@Map$,strnpcinfo(3)+"::OnNormalKill");
  80. killmonster .@Map$,strnpcinfo(3)+"::OnNormalKill";
  81. } while (.@MC<1);
  82. break;
  83. case 4:
  84. mes "[ ^0065DFxMachina^000000 ]";
  85. mes "How many ^FF0000Special^000000 MVP would you like me to summon?";
  86. next;
  87. input .@SpecialMVP;
  88. break;
  89. case 5:
  90. mes "[ ^0065DFxMachina^000000 ]";
  91. mes "How many ^FF0000Normal^000000 MVP would you like me to summon?";
  92. next;
  93. input .@NormalMVP;
  94. break;
  95. case 6:
  96. mes "[ ^0065DFxMachina^000000 ]";
  97. mes "See you later.";
  98. close;
  99. }
  100. }
  101. if (!.Event) {
  102. set .Event,1;
  103. set $@SpecialMVP, .@SpecialMVP;
  104. set $@NormalMVP, .@NormalMVP;
  105. set $@Amount, .@Amount;
  106. set $@ItemID, .@ItemID;
  107. set $@Map$, .@Map$;
  108.  
  109. monster $@Map$,0,0,"--ja--",-3,$@SpecialMVP,strnpcinfo(3)+"::OnSpecialKill";
  110. monster $@Map$,0,0,"--ja--",-3,$@NormalMVP,strnpcinfo(3)+"::OnNormalKill";
  111. announce "Map Invasion Begin : " + $@SpecialMVP + " Special MVP has invaded in " + $@Map$ + ". Hurry Up..",bc_all,0x98FB98;
  112. } else {
  113. set .Event,0;
  114. announce "The MVP Attack Event is now over!",0,0x98FB98;
  115. killmonster $@Map$,"All";
  116. }
  117. mes "[ ^0065DFxMachina^000000 ]";
  118. mes (.Event?"Starting":"Stopping") + " the event now...";
  119. close;
  120.  
  121. OnClock0000:
  122. OnClock0500:
  123. OnClock1000:
  124. OnClock1500:
  125. OnClock2000:
  126. if (!.Event) {
  127. set .Event,1;
  128. monster $@Map$,0,0,"--ja--",-3,$@SpecialMVP,strnpcinfo(3)+"::OnSpecialKill";
  129. monster $@Map$,0,0,"--ja--",-3,$@NormalMVP,strnpcinfo(3)+"::OnNormalKill";
  130. announce "Map Invasion Begin : "+$@SpecialMVP+" Special MVP has invaded in " + $@Map$ + ". Hurry Up..",bc_all,0x98FB98;
  131. }
  132.  
  133. OnSpecialKill:
  134. set .@MobCnt, mobcount($@Map$,strnpcinfo(3)+"::OnSpecialKill");
  135. if (playerattached()) {
  136. if (!.@MobCnt) {
  137. announce $@Map$ + ": " + strcharinfo(0) + " has killed the last Special MVP",bc_all;
  138. } else {
  139. announce $@Map$ + ": " + strcharinfo(0) + " has killed 1 Special MVP and Gained Mystery Items - Remaining Special MVP: " + .@MobCnt,(!rand(3)?bc_all:bc_map);
  140. }
  141. getitem $@ItemID,$@Amount;
  142. }
  143. if (!.@MobCnt) {
  144. set .Event,0;
  145. killmonster $@Map$,"All";
  146. sleep 5000;
  147. mapannounce $@Map$, "The MVP Attack Event is now over!",bc_all,0x98FB98;
  148. }
  149. end;
  150.  
  151. OnNormalKill:
  152. if (playerattached()) dispbottom "You killed Normal MVP ( No Reward ). Special MVP Left : "+mobcount($@Map$,strnpcinfo(3)+"::OnSpecialKill")+" .";
  153. end;
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement