Jump to content
  • 0

Need this script


xDeMiGoD

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  06/01/12
  • Last Seen:  

I need help at this one, ex. i have 24 hours, i want that 24 hours to be reduced every time the player is online. So if I have 24 hours at the start, then ill go online for 3 hours then when i log out, it will be just 21 hours the next time I log on. Also if the time runs out when I am still online, I'll be notified. Is this one possible?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Haven't tested, some of the math might be off but this is the concept:

-    script    PlayerTimer    -1,{
OnPCLoginEvent:
   set @PlayerTimer, gettimetick(2);
   addtimer 86400-PlayerTimer,strnpcinfo(0)+"::OnFinish";
   end;

OnPCLogoutEvent:
   if (@PlayerTimer) set PlayerTimer, PlayerTimer+gettimetick(2)-@PlayerTimer;
   end;

OnFinish:
   dispbottom "Your time has run out.";
   set @PlayerTimer,0;
   set PlayerTimer,0;
   end;
}

  • Upvote 1
Link to comment
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.   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.

×
×
  • Create New...