tysonlim1989 Posted January 14, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 22 Reputation: 1 Joined: 12/13/12 Last Seen: September 25, 2016 Share Posted January 14, 2013 (edited) Will automatically kick a player out from a map after a specified time. Example, when a player goes into a map, after 1 minute, the player will be kick out of the map. Thank you for helping. [size=4]set .timeout, 60;[/size]if ( .timeout == 0 ) set .timeout, 60;set .respawnmap$, "Prontera";set .respawnx, 148;set .respawny, 380;set .@dif, strnpcinfo(0);set .remind[.@dif], 0;for ( set .@i, 1; .@i <= 9; set .@i, .@i +1 )deletearray getd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize");set .nobodycounter[.@dif], 0;getmapxy .@map$, .@x, .@y ,1;set .starttime[.@dif], gettimetick(0);do {set .remaintime[.@dif], .timeout * 1 + .starttime[.@dif] - gettimetick(0);set .@hour[.@dif], .remainTime[.@dif] / 3600 ;set .@min[.@dif], .remainTime[.@dif] % 3600 / 60 ;set .@sec[.@dif], .remainTime[.@dif] % 3600 % 60 ;delwaitingroom strnpcinfo(0);waitingroom "Time Left = "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0;if ( getmapusers(.@map$) )set .nobodycounter[.@dif], 0;else {set .nobodycounter[.@dif], .nobodycounter[.@dif] +1 ;if ( .nobodycounter[.@dif] > .nobodygiveup * 1 ) break;}sleep 995;} while ( .remaintime[.@dif] > 1 );set .remaintime[.@dif], 0;delwaitingroom "MVP Summoner#"+ .@dif;mapwarp .@map$, .respawnmap$, .respawnx, .respawny;end;close2;[/Code]I'm not building a MVP room, just try to copy the art work from the script but can't really make it to work. Edited January 15, 2013 by tysonlim1989 Quote Link to comment Share on other sites More sharing options...
Question
tysonlim1989
Will automatically kick a player out from a map after a specified time.
Example, when a player goes into a map, after 1 minute, the player will be kick out of the map.
Thank you for helping.
I'm not building a MVP room, just try to copy the art work from the script but can't really make it to work.
Edited by tysonlim1989Link to comment
Share on other sites
0 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.