Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script Sample -1,{
- OnInit:
- // gm level to access
- set .gm_level,90;
- // default duration of pvp in map
- set .duration,10;
- // map list
- setarray .map$,
- "prontera",
- "payon",
- "alberta",
- "izlude";
- set .map_size,getarraysize( .map$ );
- for( set .@i,0; .@i < .map_size; set .@i,.@i + 1 )
- set .map_menu$,.map_menu$ + .map$[.@i] +":";
- end;
- OnClock1300:
- OnClock2100:
- callsub( OnPVPOn,rand( .map_size ) );
- end;
- OnWhisperGlobal:
- if( getgmlevel() >= .gm_level ){
- if( .map_random$ == "" ){
- mes "Select a map.";
- set .@i,select( .map_menu$ ) - 1;
- close2;
- detachrid;
- callsub( OnPVPOn,.@i );
- }else{
- dispbottom "PVP Mode running at "+.map_random$;
- }
- }
- end;
- OnPVPOn:
- debugmes ""+.map_random$;
- if( .map_random$ == "" ){
- set .map_random$,.map$[getarg(0)];
- announce .map_random$+" has been set with PVP Mode for next "+.duration+" minutes.",0;
- pvpon .map_random$;
- sleep ( .duration * 60000 );
- announce "PVP Mode at "+.map_random$+" has been removed.",0;
- pvpoff .map_random$;
- set .map_random$,"";
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment