Skacazh Posted August 15, 2018 Share Posted August 15, 2018 How to set on l2jfrozen heroes every sunday 00:00 night? Link to comment Share on other sites More sharing options...
1 tazerman2 Posted September 19, 2018 Share Posted September 19, 2018 52 minutes ago, Skacazh said: This is how looks full code: final SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED); sm.addNumber(_currentCycle); Announcements.getInstance().announceToAll(sm); final Calendar currentTime = Calendar.getInstance(); currentTime.add(Calendar.MONTH, 1); currentTime.set(Calendar.DAY_OF_MONTH, 1); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); _olympiadEnd = currentTime.getTimeInMillis(); final Calendar nextChange = Calendar.getInstance(); _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD; scheduleWeeklyChange(); } how must be? this code say hero period end every 1 month first day = 1 hours 12 = morning min = 0 second = 0 so you remove this currentTime.add(Calendar.MONTH, 1); currentTime.set(Calendar.DAY_OF_MONTH, 1); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); and you put this currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); currentTime.set(Calendar.HOUR_OF_DAY, 00); currentTime.set(Calendar.MINUTE, 00); currentTime.set(Calendar.SECOND, 00); and thats all. Link to comment Share on other sites More sharing options...
0 Solomun Posted August 20, 2018 Share Posted August 20, 2018 Calendar currentTime = Calendar.getInstance(); currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); currentTime.set(Calendar.HOUR_OF_DAY, 00); currentTime.set(Calendar.MINUTE, 00); currentTime.set(Calendar.SECOND, 00); Search all files in olympiad packet with lines such these. Then replace them with the ones i gave you. Link to comment Share on other sites More sharing options...
0 Skacazh Posted September 19, 2018 Author Share Posted September 19, 2018 On 8/20/2018 at 6:56 PM, Solomun said: Calendar currentTime = Calendar.getInstance(); currentTime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); currentTime.set(Calendar.HOUR_OF_DAY, 00); currentTime.set(Calendar.MINUTE, 00); currentTime.set(Calendar.SECOND, 00); Search all files in olympiad packet with lines such these. Then replace them with the ones i gave you. This is how looks full code: final SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED); sm.addNumber(_currentCycle); Announcements.getInstance().announceToAll(sm); final Calendar currentTime = Calendar.getInstance(); currentTime.add(Calendar.MONTH, 1); currentTime.set(Calendar.DAY_OF_MONTH, 1); currentTime.set(Calendar.AM_PM, Calendar.AM); currentTime.set(Calendar.HOUR, 12); currentTime.set(Calendar.MINUTE, 0); currentTime.set(Calendar.SECOND, 0); _olympiadEnd = currentTime.getTimeInMillis(); final Calendar nextChange = Calendar.getInstance(); _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD; scheduleWeeklyChange(); } how must be? Link to comment Share on other sites More sharing options...
0 Solomun Posted September 19, 2018 Share Posted September 19, 2018 Let us know if it worked. :) Link to comment Share on other sites More sharing options...
0 Skacazh Posted September 23, 2018 Author Share Posted September 23, 2018 On 9/20/2018 at 2:29 AM, Solomun said: Let us know if it worked. :) not working :( Link to comment Share on other sites More sharing options...
0 Solomun Posted September 23, 2018 Share Posted September 23, 2018 Did you delete the previous record in database? I think olympiad_data is the table. Link to comment Share on other sites More sharing options...
0 Skacazh Posted September 23, 2018 Author Share Posted September 23, 2018 7 minutes ago, Solomun said: Did you delete the previous record in database? I think olympiad_data is the table. on frozen in navicat only olympiad_nobles and olympiad_nobles_eom. But have i configs Olympiad.cfg file with that: before i don't deleted anything.. Link to comment Share on other sites More sharing options...
0 Skacazh Posted September 24, 2018 Author Share Posted September 24, 2018 Working now! Just neded to delete everything from olympiad.cfg file Link to comment Share on other sites More sharing options...
Question
Skacazh
How to set on l2jfrozen heroes every sunday 00:00 night?
Link to comment
Share on other sites
8 answers to this question
Recommended Posts