Jump to content
  • 0

Remaining time goes Negative (-)


Question

Posted (edited)

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;
}

 

Edited by kitty14

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...