MikZ 5 Posted February 6, 2018 Good day Hercules Masters Scripters! May we request a NPC script that: Gives reward to player that played for 5 hours. Means Five (5) hours is the maximum hours. If player reach 5 hours then the timer stop. Player needs to redeem the prize first to reset the playing hours. Timer should only count if player is online. If player is log off playing hours still be recorder and the countdown must stop to the time where player log off. Prizes is random with success %. Prize A. 80%; Prize B 60%; Prize C 50%; 40%; 30%; 20%; 10% NPC message: If hour < 5 { You only Played 3 hours you still need to play for # of hours in order to redeem the prize. If hour = 5 . Thank you for playing here is your reward. at random success rate (%) ; reset timer. Thanks! Quote Share this post Link to post Share on other sites
0 MikZ 5 Posted February 16, 2018 anyone? I tried below. but it seems it still count down even it player is offline. please help. thanks! if(gettimetick(2) - #lastTimeTalked > (60 * 60 * 24)) { .@delay = 60*60*24 - (gettimetick(2) - #lastTimeTalked); // .@hours = .@delay / 60*60; .@hours = .@delay / (60*60); .@minutes = (.@delay - (.@hours*60*60)) / 60; .@seconds = (.@delay - (.@hours*60*60) - (.@minutes*60)); mes "Sorry, you have to wait "+.@hours+" hour"+(.@hours>1?"s":"")+" "+.@minutes+" minute"+(.@minutes>1?"s":"")+" "+.@seconds+" second"+(.@seconds>1?"s":"")+" "; mes "Thank you!!"; Quote Share this post Link to post Share on other sites
Good day Hercules Masters Scripters!
May we request a NPC script that:
Prizes is random with success %.
Prize A. 80%; Prize B 60%; Prize C 50%; 40%; 30%; 20%; 10%
NPC message:
If hour < 5 { You only Played 3 hours you still need to play for # of hours in order to redeem the prize.
If hour = 5 . Thank you for playing here is your reward. at random success rate (%) ; reset timer.
Thanks!
Share this post
Link to post
Share on other sites