glemor123 1 Posted September 13, 2014 (edited) how to set the time limit per account not per player? thank you function t;function s; if ( cooldown_warp > gettimetick(2) ) { mes "you must wait "+ t( cooldown_warp - gettimetick(2) ); close; } warp .map$,0,0; cooldown_warp = gettimetick(2) + 3600;// 3600 secs = 1h addtimer ( 3 *60 *1000 ), strnpcinfo(3) +"::OnEvent";// 3mins end;OnEvent: dispbottom "Gold Hunt is Over"; warp "invek",146,173; 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) ? "" : " " ) ); }} Edited September 13, 2014 by glemor123 Quote Share this post Link to post Share on other sites
0 GmOcean 92 Posted September 13, 2014 Change all instances of: cooldown_warp INTO: #cooldown_warp Quote Share this post Link to post Share on other sites
0 glemor123 1 Posted September 13, 2014 (edited) addtimer ( 3 *60 *1000 ) how to read this part? Edited September 13, 2014 by glemor123 Quote Share this post Link to post Share on other sites
0 glemor123 1 Posted September 13, 2014 Change all instances of: cooldown_warp INTO: #cooldown_warp is addtimer ( 3 *60 *40000 ) = 3hours? Quote Share this post Link to post Share on other sites
0 GmOcean 92 Posted September 13, 2014 (edited) I thought I replied to this already lol. I must have erased it oh wellz. Hours * 3600 * 1000 = Hours in ticks3 * 3600 * 1000 = 10800000 (3 hours in ticks) As for reading the format: Seconds * 60 = 60seconds(1min) * 60(min) = 3600seconds(1hour) * 1000(ticks) = 3600000ticksSince we know what 1 hour is, we simplify it by doing this:(Hours we want) * 3600(1hour) * 1000(ticks) = hourswewant_in_ticksTo make it cleaner just do this:(Hours we want) * ( 3600 * 1000 ) = hourswewant_in_ticks3 * ( 3600 * 1000 ) = 10800000 Edited September 13, 2014 by GmOcean 1 glemor123 reacted to this Quote Share this post Link to post Share on other sites
how to set the time limit per account not per player? thank you
Edited by glemor123Share this post
Link to post
Share on other sites