Jump to content
  • 0

Day Countdown?


Question

Posted (edited)

Hello!

 

Well, in simple works, is there a way to make a day counter?

In my script, I have to do a task to be able to proceed in a quest, and then I can speak freely to this NPC, but if 2 days have passed after completing the task, I will need to do it again.

 

I can't think an easy way to do this script :C

 

Please help! Thanks in advance.

Edited by Echoes

2 answers to this question

Recommended Posts

Posted

Save in a char/account permanent variable the time he first spoke with the npc. And add a check too see if (now) > ( first_spoke + 60 * 60 * 24 ) { // repeat quest }

I don't remember the command that return unix time, check the scripts doc.

Posted (edited)

Thanks.

 

Yes, I will check it now. Thanks for the reply.

 

 

And I think that command is gettimetick(2), 2 stands for " The system time in UNIX epoch time, or the number of seconds elapsed since January 1st, 1970. Useful for reliably measuring time intervals."

 

____

EDIT

____

It worked :D, thank you Moriarty !

Edited by Echoes

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