Jyabil Posted May 20, 2012 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 89 Reputation: 7 Joined: 02/27/12 Last Seen: July 22, 2014 Share Posted May 20, 2012 (edited) Based on this topic, http://rathena.org/b...ard-npc-script/ But instead of waiting for 24 hours to get the rewards again from the NPC, It just resets on 00:00 time, so the player can get his reward between 00:01 to 23:59 (Server Time) Thanks and regards, Jyabil Edited May 20, 2012 by Jyabil Quote Link to comment Share on other sites More sharing options...
Z3R0 Posted May 21, 2012 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 618 Reputation: 201 Joined: 11/09/11 Last Seen: June 14, 2024 Share Posted May 21, 2012 // 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 Quote Link to comment Share on other sites More sharing options...
Jyabil Posted May 22, 2012 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 89 Reputation: 7 Joined: 02/27/12 Last Seen: July 22, 2014 Author Share Posted May 22, 2012 Thanks Zero, Will be trying this when I got home. Do you also mind helping me on this topic? http://rathena.org/board/topic/63860-team-deathmatch/ Quote Link to comment Share on other sites More sharing options...
Jyabil Posted June 13, 2012 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 89 Reputation: 7 Joined: 02/27/12 Last Seen: July 22, 2014 Author Share Posted June 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
Joseph Posted June 13, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 341 Reputation: 43 Joined: 01/10/12 Last Seen: June 29, 2020 Share Posted June 13, 2012 mes (test$ != gettimestr("%m",4))?"Minute changes.":"Minute doesn't change."; close2; set test$, gettimestr("%m",4); end; Quote Link to comment Share on other sites More sharing options...
Jyabil Posted June 13, 2012 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 89 Reputation: 7 Joined: 02/27/12 Last Seen: July 22, 2014 Author Share Posted June 13, 2012 I don't get it, not familiar with the gettimestr function. I just wanted it to reset at 00:00 server time. Quote Link to comment Share on other sites More sharing options...
Question
Jyabil
Based on this topic,
http://rathena.org/b...ard-npc-script/
But instead of waiting for 24 hours to get the rewards again from the NPC,
It just resets on 00:00 time, so the player can get his reward between 00:01 to 23:59 (Server Time)
Thanks and regards,
Jyabil
Edited by JyabilLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.