Jyabil Posted May 20, 2012 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
Z3R0 Posted May 21, 2012 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
Jyabil Posted May 22, 2012 Author 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
Jyabil Posted June 13, 2012 Author 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
Joseph Posted June 13, 2012 Posted June 13, 2012 mes (test$ != gettimestr("%m",4))?"Minute changes.":"Minute doesn't change."; close2; set test$, gettimestr("%m",4); end; Quote
Jyabil Posted June 13, 2012 Author 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
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 Jyabil5 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.