Olympiad_end a mistery

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
repxl
Posts: 207
Joined: Wed May 20, 2009 8:29 pm

Olympiad_end a mistery

Post by repxl »

yo im trying to make a olympiad period week .
and i tryed to set olympiad_end in the oly data table
1286786880 = Monday, October 11, 2010 10:48:00 AM
period : 0
i started it and it said in console 8217 minutes when olympiad end . lol ? it should saay in 2 minutes olympiad end becuase i have run it Monday, October 11, 2010 10:46:00 AM

its a big mistery .

also i changed this but no know what it do and what its make . i just need a recipe for 1 week oly ..... a setup . dont have someone it ?
and i need end oly today and the next time it will end at Sunday , 24:00

Code: Select all

    protected void setNewOlympiadEnd()    {        SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);        sm.addNumber(_currentCycle);                Announcements.getInstance().announceToAll(sm);        //tomasko edit        Calendar currentTime = Calendar.getInstance();        currentTime.add(Calendar.WEEK_OF_MONTH, 1);        currentTime.set(Calendar.DAY_OF_WEEK, 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();                Calendar nextChange = Calendar.getInstance();        _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;        scheduleWeeklyChange();    }
Last edited by repxl on Mon Oct 11, 2010 8:57 am, edited 1 time in total.
"Code is exactly like shit - you don't mind cleaning it when its yours, but when it isn't... fuck its annoying." - By the Almighty ZaKaX
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Olympiad_end a mistery

Post by _DS_ »

All timestamps in l2j use milliseconds. Should you look on previous value BEFORE making changes ?
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
repxl
Posts: 207
Joined: Wed May 20, 2009 8:29 pm

Re: Olympiad_end a mistery

Post by repxl »

_DS_ wrote:All timestamps in l2j use milliseconds. Should you look on previous value BEFORE making changes ?
can you give me a link wich you using for convert it in milisecounds ? please .
"Code is exactly like shit - you don't mind cleaning it when its yours, but when it isn't... fuck its annoying." - By the Almighty ZaKaX
surskis
Posts: 101
Joined: Sun Jul 12, 2009 6:24 pm
Location: Lithuania

Re: Olympiad_end a mistery

Post by surskis »

_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: Olympiad_end a mistery

Post by _DS_ »

Did you know how many milliseconds in second ?
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
repxl
Posts: 207
Joined: Wed May 20, 2009 8:29 pm

Re: Olympiad_end a mistery

Post by repxl »

_DS_ wrote:Did you know how many milliseconds in second ?
1000
so the date 1286786880 x 1000 ???
"Code is exactly like shit - you don't mind cleaning it when its yours, but when it isn't... fuck its annoying." - By the Almighty ZaKaX
repxl
Posts: 207
Joined: Wed May 20, 2009 8:29 pm

Re: Olympiad_end a mistery

Post by repxl »

"Code is exactly like shit - you don't mind cleaning it when its yours, but when it isn't... fuck its annoying." - By the Almighty ZaKaX
repxl
Posts: 207
Joined: Wed May 20, 2009 8:29 pm

Re: Olympiad_end a mistery

Post by repxl »

okey it,s working now i have need just do x1000 now it write correct
1 answer so i now make oly end in 3 min,s and then next period start i make Sun : 24:00 and it will then automatically make 1 week ??? or i have to change it all time .


im using also this :

Code: Select all

    protected void setNewOlympiadEnd()    {        SystemMessage sm = new SystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);        sm.addNumber(_currentCycle);                Announcements.getInstance().announceToAll(sm);        //tomasko edit        Calendar currentTime = Calendar.getInstance();        currentTime.add(Calendar.WEEK_OF_MONTH, 1);        currentTime.set(Calendar.DAY_OF_WEEK, 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();                Calendar nextChange = Calendar.getInstance();        _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;        scheduleWeeklyChange();    }
"Code is exactly like shit - you don't mind cleaning it when its yours, but when it isn't... fuck its annoying." - By the Almighty ZaKaX
Post Reply