Jump to content

Question

5 answers to this question

Recommended Posts

Posted
// Check Value Against Stored Value
if (gettimestr("%Y-%m/%d") == lastTimeTalked$) {
 mes "You have already talked to me today";
 close;
}

// Do NPC Dialog

// Store as a String (YearMonthDay)
set lastTimeTalked$, gettimestr("%Y-%m/%d");

// Do Whatever Else Dialog

// You do not need to worry about time changing, because it's already dependent on the year/month/day
// when the date changes, the variable changes

// If you would like this be a PER ACCOUNT, instead of PER CHAR, simply change the lastTimeTalked$ to #lastTimeTalked$

// Enjoy

Posted

I'm having errors on ("%Y-%m/%d")

Can you also include the minute? So I can test it if the minute changes, then if its working, i'll remove the minute and stick with the days.

Thanks

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