Jump to content
  • 0

Can anyone help with timestamp?


Jayzy

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

I'm trying to create a script where player is suppose to click the NPC within 24 hours and if not he wouldn't be able to get from the NPC again. So its like:

 

Player talked to NPC today at 1pm and talked to the NPC again tomorrow at :12:59PM then would still be able to run the script. But if player didn't click the item again on the given time which is 24 hours interval then it won't do anything

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

prontera,150,150,0    script    Sample    100,{
    set .@npc$,strnpcinfo(1);


    if (gettimetick(2) < #timer) {
        mes .@npc$;
        mes "Time left : ";
        mes #timer - gettimetick(2)+ " seconds";
        close;
    }
    mes .@npc$;
    mes "Click me!";
    next;
    mes .@npc$;
    mes "Done!";
    set #timer,gettimetick(2) + 60;
    close;
}
 

like this?

change 60 seconds to 86400 ( 86400sec = 1day )

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