yuhsing

Untitled

Oct 7th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1.  
  2.  
  3. - script Sample -1,{
  4. OnInit:
  5. // gm level to access
  6. set .gm_level,90;
  7. // default duration of pvp in map
  8. set .duration,10;
  9. // map list
  10. setarray .map$,
  11. "prontera",
  12. "payon",
  13. "alberta",
  14. "izlude";
  15.  
  16. set .map_size,getarraysize( .map$ );
  17. for( set .@i,0; .@i < .map_size; set .@i,.@i + 1 )
  18. set .map_menu$,.map_menu$ + .map$[.@i] +":";
  19. end;
  20.  
  21. OnClock1300:
  22. OnClock2100:
  23. callsub( OnPVPOn,rand( .map_size ) );
  24. end;
  25.  
  26. OnWhisperGlobal:
  27. if( getgmlevel() >= .gm_level ){
  28. if( .map_random$ == "" ){
  29. mes "Select a map.";
  30. set .@i,select( .map_menu$ ) - 1;
  31. close2;
  32. detachrid;
  33. callsub( OnPVPOn,.@i );
  34. }else{
  35. dispbottom "PVP Mode running at "+.map_random$;
  36. }
  37. }
  38. end;
  39.  
  40. OnPVPOn:
  41. debugmes ""+.map_random$;
  42. if( .map_random$ == "" ){
  43. set .map_random$,.map$[getarg(0)];
  44. announce .map_random$+" has been set with PVP Mode for next "+.duration+" minutes.",0;
  45. pvpon .map_random$;
  46. sleep ( .duration * 60000 );
  47. announce "PVP Mode at "+.map_random$+" has been removed.",0;
  48. pvpoff .map_random$;
  49. set .map_random$,"";
  50. }
  51. return;
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment