Severus Posted April 13, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 04/04/12 Last Seen: June 30, 2012 Share Posted April 13, 2012 Hello rAthena Community, I have a small problem and I think it's easy to solve but I don't want to make a mistake. I have this script for War of Emperium times. OnClock1900: //start time for Wend,Sun(0,3), Wend,Sun(0,3) OnClock2000: //end time for Wend,Sun(0,3), Wend,Sun(0,3) // starting time checks if((gettime(4)==0) && (gettime(3)>=19 && gettime(3)<20) || (gettime(4)==3) && (gettime(3)>=19 && gettime(3)<20)) { But I want Wednesday and Sunday: 19:00 - 20:30 o'clock Can I just edit it to: OnClock1900: //start time for Wend,Sun(0,3), Wend,Sun(0,3) OnClock2030: //end time for Wend,Sun(0,3), Wend,Sun(0,3) // starting time checks if((gettime(4)==0) && (gettime(3)>=19 && gettime(3)<20) || (gettime(4)==3) && (gettime(3)>=19 && gettime(3)<20)) { or OnClock1900: //start time for Wend,Sun(0,3), Wend,Sun(0,3) OnClock2030: //end time for Wend,Sun(0,3), Wend,Sun(0,3) // starting time checks if((gettime(4)==0) && (gettime(3)>=19 && gettime(3)<2030) || (gettime(4)==3) && (gettime(3)>=19 && gettime(3)<2030)) { Thanks for your help! Quote Link to comment Share on other sites More sharing options...
plankt Posted April 14, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted April 14, 2012 The function gettime() returns only what you specify. gettime(3) will give you the hour only. Since you can only arrive at the if check at two possible times, 19:00 and 20:30, you only need to check for the days and that specific hour. OnClock1900: // Start time OnClock2030: // End time // Check for Sunday or Wednesday AND that it is starttime if((gettime(4) == 0 || gettime(4) == 3) && gettime(3) == 19) { I'm guessing you have an "end time check" at the end of that if. Make sure to change that check to something like this: // Check for Sunday or Wednesday AND that it is endtime if((gettime(4) == 0 || gettime(4) == 3) && gettime(3) == 20) { *gettime(<type>)This function will return specified information about the current system time. ... 3 - Hour (of a day) ... Quote Link to comment Share on other sites More sharing options...
Severus Posted April 14, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 04/04/12 Last Seen: June 30, 2012 Author Share Posted April 14, 2012 Thanks for your help! I'm using this script: Random WoE by Brian http://www.eathena.ws/board/index.php?act=attach&type=post&id=5615 Forgot to write the end time. Greetings, Serverus Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted April 14, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted April 14, 2012 it seems that scrip can't be settled on minute 30 why not use this it was working for me http://rathena.org/board/topic/57377-toastys-woe-controller/ Quote Link to comment Share on other sites More sharing options...
Severus Posted April 14, 2012 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 8 Reputation: 0 Joined: 04/04/12 Last Seen: June 30, 2012 Author Share Posted April 14, 2012 Because I'm looking for a random War of Emperium and I don't want to change the castles manually. The script by Brian announces every War of Emperium which castle is open this season. Quote Link to comment Share on other sites More sharing options...
Question
Severus
Hello rAthena Community,
I have a small problem and I think it's easy to solve but I don't want to make a mistake.
I have this script for War of Emperium times.
But I want Wednesday and Sunday: 19:00 - 20:30 o'clock
Can I just edit it to:
or
Thanks for your help!
Link to comment
Share on other sites
4 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.