rans Posted September 24, 2013 Group: Members Topic Count: 104 Topics Per Day: 0.02 Content Count: 429 Reputation: 60 Joined: 08/19/12 Last Seen: 23 hours ago Share Posted September 24, 2013 hi, Anyone know how to put a time limit in a map? like 3 mins and you'll be kick out of the map and Cool down to warp again in that map.. using the Warper .. ?? thnx.. Quote Link to comment Share on other sites More sharing options...
GmOcean Posted September 24, 2013 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 24, 2013 (edited) Well, this is just a basic script to do what you want. You can expand it further by using this template. prontera,150,180,4 script TimeWarper 123,{ if(cooldown){mes "Sorry, your still on CoolDown and cannot enter yet. You will be notified when you can."; close;} mes "[TimeWarper]"; mes "Hi, would you like to be warped?"; if(select("Yes:No") == 1){warp .loc$[0],atoi(.loc$[1]),atoi(.loc$[2]); end;} close; OnTimeLimit: addtimer((.CD*60000),strnpcinfo(3)+"::OnCoolDown"); set cooldown,1; end; OnCoolDown: set cooldown,0; dispbottom "Your may now be warped again."; end; OnPCLoadMapEvent: if( strcharinfo(3) == .loc$[0] ){addtimer( (.TL*60000),strnpcinfo(3)+"::OnTimeLimit");} end; OnInit: set .TL,3; //TimeLimit in Minutes. set .CD,5; //CoolDown in Minutes. setarray .loc$[0],"<mapname>","<x>","<y>"; end; } <mapname> mapflag loadevent Edited September 26, 2013 by GmOcean Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 24, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted September 24, 2013 or like that prontera,150,160,5 script warp anywhere 78,{ function t; function s; if ( cooldown_warp > gettimetick(2) ) { mes "you must wait "+ t( cooldown_warp - gettimetick(2) ); close; } warp "geffen", 0,0; cooldown_warp = gettimetick(2) + 3600;// 3600 secs = 1h addtimer ( 3 *60 *1000 ), strnpcinfo(3) +"::OnEvent";// 3mins end; OnEvent: dispbottom "end of timer"; warp "prontera", 0,0; end; function t { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@week = .@left / ( 86400 * 7 ); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; return ( ( .@week ? .@week +" week"+ s( .@week ) : "" ) + ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } } Quote Link to comment Share on other sites More sharing options...
rans Posted September 24, 2013 Group: Members Topic Count: 104 Topics Per Day: 0.02 Content Count: 429 Reputation: 60 Joined: 08/19/12 Last Seen: 23 hours ago Author Share Posted September 24, 2013 thank you very much guys =) Quote Link to comment Share on other sites More sharing options...
Question
rans
Link to comment
Share on other sites
3 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.