prontera,159,187,4 script Server Uptime 858,{
function Add_Zero; function Add_S;
mes
"[Uptime]",
"The server has been online for ",
((.t[1])?Add_S(.t[1],"day")+", ":"")+
((.t[2])?Add_S(.t[2],"hour")+", ":"")+
((.t[2]||.t[3])?Add_S(.t[3],"minute")+" ":"")+
((getarraysize(.t)>2)?"and ":"")+Add_S(.t[4],"second")+", "+
"and counting!";
close;
function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0); }
function Add_S { return "^0055FF"+getarg(0)+" "+getarg(1)+((getarg(0)==1)?"":"s")+"^000000"; }
OnInit:
set .t[0], gettimetick(2);
waitingroom " [ 00:00:00 ]",0;
initnpctimer;
end;
OnTimer950:
set .@t, gettimetick(2)-.t[0];
set .t[1], .@t/(3600*24);
set .t[2], .@t/3600-.t[1]*24;
set .t[3], .@t/60-.t[2]*60;
set .t[4], .@t%60;
end;
OnTimer990:
initnpctimer;
delwaitingroom;
waitingroom " [ "+Add_Zero(.t[1])+":"+Add_Zero(.t[2])+":"+Add_Zero(.t[3])+":"+Add_Zero(.t[4])+" ]",0;
end;
}
found bug on this script.. if the server run for 12days its
show like this dd:hh:mm:ss 12:00:1234124:00 the day wll not increase the time
will add at minute..
then how to change this script like read when the server 1st start.
Question
Cisqua
found bug on this script.. if the server run for 12days its
show like this dd:hh:mm:ss 12:00:1234124:00 the day wll not increase the time
will add at minute..
then how to change this script like read when the server 1st start.
Edited by CisquaLink to comment
Share on other sites
1 answer 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.