Skip to content

How to..?

Featured Replies

How to set on l2jfrozen heroes every sunday 00:00 night?

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.

  • 5 weeks later...
  • Author
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?

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.

  • Author
On 9/20/2018 at 2:29 AM, Solomun said:

Let us know if it worked. :)

not working :(

Did you delete the previous record in database? I think olympiad_data is the table.

  • Author
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:

1d419ce62494e72da12529b9b22b6613837.png

before i don't deleted anything..

  • Author

Working now! Just neded to delete everything from olympiad.cfg file

  • SweeTs locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.