MukkiesftKies Posted March 22, 2013 Posted March 22, 2013 map,146,139,5 script Arena Master 808,{ if( select("PVP Room [ "+getmapusers("arena02")+"/50 ]:Cancel") == 1 ) { if( getmapusers("arena02") >= 50 ) { mes "[Arena Master]", "I'm sorry but the PVP Room is already full!"; close; } warp "arena02",0,0; atcommand "@heal"; } close; OnPCDieEvent: atcommand "@alive"; atcommand "@heal"; end; } arena02 mapflag pvp arena02 mapflag nocommand 80 arena02 mapflag nomemo arena02 mapflag nosave SavePoint arena02 mapflag noteleport arena02 mapflag nowarp arena02 mapflag nowarpto arena02 mapflag noreturn arena02 mapflag nobranch My example like this . - Pvp Room have 5 minutes , if 5 minutes end , ppl auto exit from map Quote
Capuche Posted March 22, 2013 Posted March 22, 2013 (edited) Little optimized map,146,139,5 script Arena Master 808,{ if( select("PVP Room [ "+getmapusers("arena02")+"/50 ]:Cancel") == 1 ) { if( getmapusers("arena02") >= 50 ) { mes "[Arena Master]", "I'm sorry but the PVP Room is already full!"; close; } addtimer 300000,"Arena Master::OnTimeout"; warp "arena02",0,0; percentheal 100,100; } close; OnPCDieEvent: getmapxy .@map$, .@x, .@y, 0; if( .@map$ != "arena02" ) end; sleep2 2; warp .@map$, .@x, .@y; percentheal 100,100; end; OnTimeout: dispbottom "5 minutes has been elapsed."; warp "SavePoint",0,0; end; } Edited March 22, 2013 by Capuche 1 Quote
nanakiwurtz Posted March 22, 2013 Posted March 22, 2013 map,146,139,5 script Arena Master 808,{ if( select("PVP Room [ "+getmapusers("arena02")+"/50 ]:Cancel") == 1 ) { if( getmapusers("arena02") >= 50 ) { mes "[Arena Master]", "I'm sorry but the PVP Room is already full!"; close; } addtimer 300000,"Arena Master::OnTimeout"; warp "arena02",0,0; atcommand "@heal"; } close; OnPCDieEvent: atcommand "@alive"; atcommand "@heal"; end; OnTimeout: dispbottom "5 minutes has been elapsed."; warp "SavePoint",0,0; end; } arena02 mapflag pvp arena02 mapflag nocommand 80 arena02 mapflag nomemo arena02 mapflag nosave SavePoint arena02 mapflag noteleport arena02 mapflag nowarp arena02 mapflag nowarpto arena02 mapflag noreturn arena02 mapflag nobranch 1 Quote
nanakiwurtz Posted March 22, 2013 Posted March 22, 2013 Capuche, why did you change the timer to only 5 seconds? (5000) Quote
MukkiesftKies Posted March 23, 2013 Author Posted March 23, 2013 Thanks Capuche and nanakiwurtz . You will make my PvP more interesting: D Quote
Emistry Posted March 25, 2013 Posted March 25, 2013 it's better to add a deltimer to remove any current attached timer to that label.. deltimer "Arena Master::OnTimeout"; addtimer 300000,"Arena Master::OnTimeout"; otherwise the the player could have attached multiple addtimer and run separately... Quote
Question
MukkiesftKies
My example like this .
- Pvp Room have 5 minutes , if 5 minutes end , ppl auto exit from map
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.