after 24 hours the timer go count again negatively.
See pic below. and no error on map.
set .Hour,24;
if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) {
mes .@npcname$;
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait for your next delivery.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
close;
}
mes .@npcname$;
mes "Congrats!";
mes " ";
mes "Here's your reward 1 Activity Point!(s)";
mes "Check your Chat-Log!";
++#activity_points;
dispbottom "You've gained one Activity Point! Your total is ["+#activity_points+"] Activity point(s).";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
Question
Takuyakii
Hi! i need help for this.
after 24 hours the timer go count again negatively.
See pic below. and no error on map.
set .Hour,24; if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) { mes .@npcname$; set .@last,#dailytimer - gettimetick(2); set .@hour, .@last % ( 24 * 3600 ) / 3600; set .@min, .@last % ( 24 * 3600 ) % 3600 / 60; set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60; mes "You have to wait for your next delivery."; mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000"; close; } mes .@npcname$; mes "Congrats!"; mes " "; mes "Here's your reward 1 Activity Point!(s)"; mes "Check your Chat-Log!"; ++#activity_points; dispbottom "You've gained one Activity Point! Your total is ["+#activity_points+"] Activity point(s)."; set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
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.