Advertisement
icabit

LMS

Jan 27th, 2013
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.78 KB | None | 0 0
  1. - script LMS#disable -1,{
  2. OnInit:
  3. disablenpc "All Job Manager";
  4. end;
  5. }
  6.  
  7. //--------------------------
  8. prontera,155,173,5 script All Job Manager 106,{
  9. mes "Do You want to join the Last Man Standing Event?";
  10. switch(select("No:Yes")){
  11. case 1:
  12. close;
  13. break;
  14. case 2:
  15. if (.start==0)
  16. {
  17. warp "guild_vs1",0,0;
  18. }
  19. else
  20. {
  21. mes "Sorry You can't join The Last Man Standing even since the game has already begun.";
  22. close;
  23. }
  24. break;
  25. }
  26. end;
  27.  
  28. OnHour01:
  29. OnHour07:
  30. OnHour13:
  31. OnHour20:// Edit this to what ever you want. note : OnClock0000 is 12 midnight and OnClock1200 is 12 Noon
  32. goto startlmsevent;
  33.  
  34. startlmsevent:
  35. enablenpc "All Job Manager";
  36. announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0;
  37. sleep2 3000;
  38. announce "Mr. Manager: Those who want to play, please proceed to Prontera and talk to the All job Manager.",0;
  39. sleep2 3000;
  40. announce "Mr. Manager: After 1 Minute the portal will close.",0;
  41. sleep2 10000;
  42. announce "Mr. Manager: Please go to Prontera and talk to the All job Manager now if you want to join. The prize is 200m coin",0;
  43. sleep2 3000;
  44. announce "Mr. Manager: Last 30 seconds.",0;
  45. sleep2 5000;
  46. announce "Mr. Manager: If you want to join please talk to the All job Manager in Prontera.",0;
  47. sleep2 5000;
  48. announce "Mr. Manager: Last 10 seconds.",0;
  49. sleep2 5000;
  50. announce "Mr. Manager: 5.",0;
  51. sleep2 1000;
  52. announce "Mr. Manager: 4.",0;
  53. sleep2 1000;
  54. announce "Mr. Manager: 3.",0;
  55. sleep2 1000;
  56. announce "Mr. Manager: 2.",0;
  57. sleep2 1000;
  58. announce "Mr. Manager: 1.",0;
  59. sleep2 1000;
  60. announce "Mr. Manager: Time's up.",0;
  61. set .start,1;
  62. disablenpc "All Job Manager";
  63. goto L_startevent;
  64. end;
  65.  
  66. L_startevent:
  67. pvpoff "guild_vs1";
  68. mapannounce "guild_vs1","Mr. Manager:The Last Man Standing Event will start shortly",0;
  69. sleep2 3000;
  70. mapannounce "guild_vs1","Mr. Manager:But before we start this is just a few reminders..",0;
  71. sleep2 3000;
  72. mapannounce "guild_vs1","Mr. Manager:Using all kinds of skill is allowed..",0;
  73. sleep2 3000;
  74. mapannounce "guild_vs1","Mr. Manager: Only the Last Man Standing will win this event!!",0;
  75. sleep2 3000;
  76. mapannounce "guild_vs1","Mr. Manager: What are we waiting for?..Let's Get Ready to Rumble!!...",0;
  77. sleep2 3000;
  78. goto L_Start;
  79. end;
  80.  
  81. L_Start:
  82. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  83. if(getmapusers("guild_vs1") == 0) goto L_None;
  84. if(getmapusers("guild_vs1") > 1) {
  85. mapannounce "guild_vs1","Mr. Manager: Get ready at the count of 5 we will start!....",0;
  86. sleep2 1000;
  87. mapannounce "guild_vs1","Mr. Manager: 5",0;
  88. sleep2 1000;
  89. mapannounce "guild_vs1","Mr. Manager: 4",0;
  90. sleep2 1000;
  91. mapannounce "guild_vs1","Mr. Manager: 3",0;
  92. sleep2 1000;
  93. mapannounce "guild_vs1","Mr. Manager: 2",0;
  94. sleep2 1000;
  95. mapannounce "guild_vs1","Mr. Manager: 1",0;
  96. sleep2 1000;
  97. pvpon "guild_vs1";
  98. goto timer;
  99. end;
  100. }
  101.  
  102. timer:
  103. sleep2 1000;
  104. if(getmapusers("guild_vs1") == 0) goto L_None;
  105. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  106. if(getmapusers("guild_vs1") > 2) goto timer;
  107. if(getmapusers("guild_vs1") == 2) goto l_champs;
  108. end;
  109.  
  110. l_champs:
  111. announce "Mr. Manager: Last 2 Brave warriors are still alive in The Last Man Standing Event!",0;
  112. sleep2 1000;
  113. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  114. sleep2 1000;
  115. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  116. sleep2 1000;
  117. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  118. sleep2 1000;
  119. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  120. sleep2 1000;
  121. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  122. sleep2 1000;
  123. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  124. sleep2 1000;
  125. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  126. sleep2 1000;
  127. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  128. sleep2 1000;
  129. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  130. sleep2 1000;
  131. if(getmapusers("guild_vs1") == 1) goto L_Champ;
  132. if(getmapusers("guild_vs1") > 1) goto timer;
  133. end;
  134.  
  135. L_Champ:
  136. pvpoff "guild_vs1";
  137. mapannounce "guild_vs1","Congratulations You are the Last Man Standing",0;
  138. announce "Mr. Manager: We have a winner! well done "+getvariableofnpc(.lmsplayer$[0], "LMSPC")+"! for Winning the Last Man Standing Event",0;
  139. atcommand "#item "+getvariableofnpc(.lmsplayer$[0], "LMSPC")+" 671 2";// change 671 to your item number and and change 2 for the ammount
  140. atcommand "#warp "+getvariableofnpc(.lmsplayer$[0], "LMSPC")+" prontera 156 191";
  141. disablenpc "All Job Manager";
  142. set .start,0;
  143. end;
  144.  
  145. L_None:
  146. announce "No one joined the Last Man Standing Event",0;
  147. disablenpc "All Job Manager";
  148. set .start,0;
  149. pvpoff "guild_vs1";
  150. end;
  151.  
  152. }
  153. - script LMSPC -1,{
  154. OnPCLoadMapEvent:
  155. getmapxy(.@map$,.@x,.@y,0);
  156. dispbottom "You are now in "+.@map$;
  157. if(.@map$=="guild_vs1")
  158. {
  159. set .@kill_point, 0;
  160. set .lmsplayer$[ getarraysize( .lmsplayer$ ) ],strcharinfo(0);
  161. announce ""+strcharinfo(0)+" Joined the Last Man Standing Event",bc_all;
  162. end;
  163. }
  164. end;
  165. OnPCLogoutEvent:
  166. OnPCDieEvent:
  167. getmapxy(.@map$,.@x,.@y,0);
  168. if(.@map$=="guild_vs1")
  169. {
  170. set .@kill_point, 0;
  171. announce ""+strcharinfo(0)+" died, and out of the game!.",bc_all;
  172. warp "prontera",156,191;
  173. for( set .@i,0; .@i < getarraysize( .GM_Name$ ) ; set .@i,.@i + 1 ){
  174. if( strcharinfo(0) != .lmsplayer$[.@i] ) continue;
  175. deletearray .lmsplayer$[.@i],1;
  176. end;
  177. }
  178. }
  179. end;
  180. OnPCKillEvent:
  181. getmapxy(.@map$,.@x,.@y,0);
  182. if(.@map$=="guild_vs1")
  183. {
  184. set .@kill_point,.@kill_point+1;
  185. if ( #kill_point % 4 == 0) {
  186. announce ""+strcharinfo(0)+" have made 4 Consecutive Kills!!He will be granted an item",bc_all;
  187. getitem 673,1;
  188. end;
  189. }
  190. }
  191. end;
  192. }
  193.  
  194. // == Mapflags
  195. guild_vs1 mapflag noreturn
  196. guild_vs1 mapflag noicewall
  197. guild_vs1 mapflag nowarpto
  198. guild_vs1 mapflag noteleport
  199. guild_vs1 mapflag nosave
  200. guild_vs1 mapflag nomemo
  201. guild_vs1 mapflag nobranch
  202. guild_vs1 mapflag pvp_noguild
  203. guild_vs1 mapflag pvp_noparty
  204. guild_vs1 mapflag loadevent
  205. guild_vs1 mapflag nocommand 60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement