hi can someone help me modify this daily reward to reset every 12am and have an accurate message regarding the time to be available again
Quote
turbo_room,107,127,5 script Daily Reward NPC 75,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,12744;
set @rewardamount,1;
//======================= Settings End ================================================================
//*****************************************************************************************************
if(gettimetick(2) > #lastTimeTalked) {
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 following items!";
mes "3x Light White Potion Box";
mes "3x Light Blue Potion Box";
mes "2x NT Field Manaual";
mes "2x NT Job Manaual";
mes "2x NT Bubble Gum";
next;
mes "Welcome...this is Daily gift...";
getitem 13534,3;
getitem 13810,3;
getitem 12263,2;
getitem 14606,2;
getitem 12264,2;
mes "Okay have fun with it!";
set #lastTimeTalked,gettimetick(2)+86400;
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
.@delay = 24 - (gettimetick(2) - #lastTimeTalked);
.@hours = .@delay / 60*60;
.@hours = .@delay / (60*60);
.@minutes = (.@delay - (.@hours*60*60)) / 60;
mes "Sorry, you have to wait ^ff0000"+.@hours+" hour"+(.@hours>1?"s":"")+" "+.@minutes+" minute"+(.@minutes>1?"s":"")+" "+.@seconds+" second"+(.@seconds>1?"s":"")+"^000000 to claim your free supplies again.";
close;
OnTimer0050:
showscript "Daily Rewards", getnpcid(0);
initnpctimer;
end;
OnInit:
initnpctimer;
end;
}
Question
Sallycantdance
hi can someone help me modify this daily reward to reset every 12am and have an accurate message regarding the time to be available again
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.