Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. //EMPERIUMRO ORIGINAL SCRIPT! DO NOT CLAIM THAT ITS YOURS! GIVE CREDIT TO THE SCRIPTER
  2. // PROBLEM IS I DONT KNOW HIS NAME. BUT CREDITS TO HIM AND TO ME FOR SHARING. LOL!
  3. Crystilia,72,33,3 script Man-Hunt Event 831,{
  4.  
  5. mes "[Man Hunt Event]";
  6. if(.MStatus)
  7. {
  8. mes "Status: ^00ff00ACTIVE!^000000";
  9. if(getgroupid() >= .GM)
  10. {
  11. menu "Join Event",-,"Admin Commands",MHAdmin;
  12. next;
  13. if(.MStart)
  14. { mes "You can't join the event when it is ongoing.";
  15. close;
  16. }
  17. set .ManHunt[.o], getcharid(3);
  18. set .ManHuntN$[.o], strcharinfo(0);
  19. set .o, .o + 1;
  20. warp .MHMap$,0,0;
  21. close;
  22. }
  23. else
  24. {
  25. menu "Join Event",-;
  26. if(.MStart)
  27. { mes "You can't join the event when it is ongoing.";
  28. close;
  29. }
  30. set .ManHunt[.o], getcharid(3);
  31. set .ManHuntN$[.o], strcharinfo(0);
  32. set .o, .o + 1;
  33. warp .MHMap$,0,0;
  34. close;
  35. close;
  36. }
  37. }
  38. else if(!.MStatus)
  39. {
  40.  
  41. mes "Status: ^00ff00INACTIVE!^000000";
  42. mes "Man Hunt Points: "+MHPoint+"";
  43. if(getgroupid() >= .GM)
  44. menu "Admin Commands",MHAdmin,"Claim Rewards",-;
  45. else
  46. menu "Claim Rewards",-;
  47. mes "There you go.";
  48. getitem .MHReward,MHPoint;
  49. set MHPoint, 0;
  50. close;
  51. }
  52.  
  53. MHAdmin:
  54. if(!.MStatus)
  55. {
  56. mes "Start Event?";
  57. menu "Start!",-;
  58. set .MStatus, 1;
  59. set .o, 0;
  60. announce "Man-Hunt Event warper will be closed in 3 minutes",0;
  61. setnpctimer 0;
  62. initnpctimer;
  63. close;
  64. }
  65. else if(.MStatus)
  66. {
  67. mes "End Event?";
  68. menu "End",-;
  69. set .MStatus, 0;
  70. deletearray .ManHunt[0],getarraysize(.ManHunt);
  71. deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);
  72. announce "A GM has ended the Man Hunt Event",0;
  73. stopnpctimer;
  74. close;
  75. }
  76. close;
  77.  
  78. OnClock0000:
  79. OnClock0300:
  80. OnClock0600:
  81. OnClock0900:
  82. OnClock1200:
  83. OnClock1500:
  84. OnClock1800:
  85. OnClock2100:
  86. set .MStatus, 1;
  87. announce "Man-Hunt Event warper will be closed in 3 minutes",0;
  88. set .o, 0;
  89. setnpctimer 0;
  90. initnpctimer;
  91. end;
  92. OnTimer60000:
  93. announce "Man-Hunt Event warper will be closed in 2 minutes",0;
  94. end;
  95. OnTimer120000:
  96. announce "Man-Hunt Event warper will be closed in 60 Seconds",0;
  97. end;
  98.  
  99. OnTimer180000:
  100. announce "Man-Hunt Event warper is now closed.",0;
  101. sleep2 2000;
  102. mapannounce .MHMap$,"The goal is this event is to kill the target within 30 seconds.",0;
  103. sleep2 2000;
  104. mapannounce .MHMap$,"The one who managed to kill the target will gain 1 Man Hunt Point",0;
  105. sleep2 2000;
  106. mapannounce .MHMap$,"But if the target surivived, the target will gain 3 Man Hunt Points",0;
  107. sleep2 2000;
  108. mapannounce .MHMap$,"Enough explaining, let's do the Man-Hunt Event!",0;
  109. sleep2 2000;
  110. mapannounce .MHMap$,"Man-Hunt Event start!",0;
  111. atcommand "@doommap";
  112. atcommand "@raisemap";
  113. set .MStart,1;
  114. stopnpctimer;
  115. set .MRounds, 1;
  116. goto ManHuntStart;
  117. end;
  118.  
  119. OnTimer30000:
  120. if (.HuntedTimer)
  121. {
  122. mapannounce .MHMap$,"The Target, "+.ManHuntN$[.Target]+", managed to survive",0;
  123. atcommand "#killable "+.ManHuntN$[.Target]+"";
  124. atcommand "#size \""+.ManHuntN$[.Target]+"\" 0";
  125. sleep2 1000;
  126. if(attachrid(.ManHunt[.Target]))
  127. {
  128. set MHPoint, MHPoint + .MSurvive;
  129. dispbottom "Gained "+.MSurvive+" Man Hunt Points.";
  130. dispbottom "Current Man Hunt Points: "+MHPoint+"";
  131. detachrid;
  132. }
  133. set .MRounds, .MRounds + 1;
  134. stopnpctimer;
  135. goto MHNextRound;
  136. }
  137. end;
  138.  
  139. ManHuntStart:
  140. if (getmapusers(.MHMap$) < .MHPlayer) goto MHPlayerLack;
  141. set .Target, rand(0,getarraysize(.ManHunt)-1);
  142. mapannounce .MHMap$,"[Round "+.MRounds+"] Our target is "+.ManHuntN$[.Target]+"!",0;
  143. atcommand "#killable "+.ManHuntN$[.Target]+"";
  144. atcommand "#size \""+.ManHuntN$[.Target]+"\" 2";
  145. setnpctimer 0;
  146. set .HuntedTimer, 1;
  147. initnpctimer;
  148. end;
  149.  
  150. OnPCDieEvent: //in victim's scope
  151. if (strcharinfo(3) == .MHMap$)
  152. {
  153. if( getcharid(3) == .ManHunt[.Target] ){
  154. if(attachrid(killerrid)) {
  155. announce ""+strcharinfo(0)+" has killed the target",0;
  156. set MHPoint, MHPoint + .MKill;
  157. atcommand "#killable "+.ManHuntN$[.Target]+"";
  158. atcommand "#size \""+.ManHuntN$[.Target]+"\" 0";
  159. dispbottom "Gained "+.MKill+" Man Hunt Points.";
  160. dispbottom "Current Man Hunt Points: "+MHPoint+"";
  161. set .MRounds, .MRounds + 1;
  162. stopnpctimer;
  163. detachrid;
  164. sleep2 500;
  165. atcommand "#alive "+.ManHuntN$[.Target]+"";
  166. goto MHNextRound;
  167. }
  168. }
  169. }
  170. end;
  171.  
  172. MHPlayerLack:
  173. mapannounce .MHMap$,"Failed to start Man-Hunt Event due to insufficient Players",0;
  174. sleep2 2000;
  175. mapannounce .MHMap$,"The minimum player required is "+.MHPlayer+" players",0;
  176. sleep2 2000;
  177. mapannounce .MHMap$,"All players will be warped to prontera in 2 seconds.",0;
  178. sleep2 2000;
  179. mapwarp .MHMap$,"prontera",150,150;
  180. set .MStatus, 0;
  181. set .HunterTimer, 0;
  182. set .Target, 0;
  183. set .MStart, 0;
  184. deletearray .ManHunt[0],getarraysize(.ManHunt);
  185. deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);
  186. end;
  187.  
  188.  
  189. MHNextRound:
  190. if (getmapusers(.MHMap$) < .MHPlayer) goto MHPlayerLack;
  191. if (.MRounds > .MRoundsMax)
  192. {
  193. sleep2 1000;
  194. announce "Man-Hunt Event ended.",0;
  195. sleep2 1000;
  196. set .MStatus, 0;
  197. set .HunterTimer, 0;
  198. deletearray .ManHunt[0],getarraysize(.ManHunt);
  199. deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);
  200. mapannounce .MHMap$,"All Players will be warped to prontera in 5 seconds.",0;
  201. sleep2 5000;
  202. set .Target, 0;
  203. set .MStart, 0;
  204. mapwarp .MHMap$,"prontera",150,150;
  205. end;
  206. }
  207. else
  208. {
  209. announce "Next Round in 10 seconds.",0;
  210. sleep2 10000;
  211. goto ManHuntStart;
  212. }
  213. end;
  214.  
  215. OnPCLogOutEvent:
  216. if (.MStatus)
  217. if (getcharid(3) == .ManHunt[.Target])
  218. {
  219. mapannounce .MHMap$,"The target has logged out of this game. This round will be nulled.",0;
  220. set .MRounds, .MRounds + 1;
  221. goto MHNextRound;
  222. }
  223. end;
  224.  
  225.  
  226. OnInit:
  227. //start of config
  228. set .MHMap$, "uv_bases"; // event map
  229. set .MHReward, 25000; // reward
  230. set .o, 0; // dont touch this
  231. set .GM, 99; // minimum gm lvl
  232. set .MRoundsMax, 10; // number of rounds
  233. set .MHPlayer, 3; // minimum players to start
  234. set .MSurvive, 3; // points para sa nagsurvive
  235. set .MKill, 1; // points para sa nakapatay
  236. //end of config
  237. setarray .ManHunt[0],0;
  238. setarray .ManHuntN$[0],"";
  239. end;
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement