Help me with this script please.
if it's below 00:00 it becomes -00 : -00 negative. how can i stop it to 00:00 claim prize now?
Payon,161,240,3 script Playing Game 911,{
.@last = #lastTimeTalked + .countdown - gettimetick(2);
.@days = .@last / 60 / 60 / 24;
.@hours = .@last / 60 / 60 % 24;
.@minutes = .@last / 60 % 60;
.@seconds = .@last % 60;
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes ""+.@hours+":"+.@minutes+":"+.@seconds+"!";
close;
}
if (#lastTimeTalked + .countdown > gettimetick(2)) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set #lastTimeTalked,gettimetick(2);
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
OnInit:
.countdown = 60 * 60 * 24;
end;
}