Jump to content
  • 0
Sign in to follow this  
MikZ

PLAYING HOUR REWARD

Question

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!



 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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!!";

 

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.