Jump to content
  • 0

Can anyone help with timestamp?


Question

Posted

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

2 answers to this question

Recommended Posts

Posted
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 )

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