change olympiads

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
crazyshock
Posts: 118
Joined: Thu Mar 26, 2009 9:53 pm

change olympiads

Post by crazyshock »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: Freya Revision 1
L2JDP Revision Number:Freya Revision1

Hi .
Possible change olympids, for 15 days?
How change?

Thanks very much!
User avatar
Flashy
Posts: 310
Joined: Mon Sep 29, 2008 11:49 am
Location: Germany

Re: change olympiads

Post by Flashy »

Code: Select all

 Index: java/com/l2jserver/Config.java===================================================================--- java/com/l2jserver/Config.java (revision 3799)+++ java/com/l2jserver/Config.java (working copy)@@ -469,6 +469,8 @@public static long ALT_OLY_BATTLE;public static long ALT_OLY_WPERIOD;public static long ALT_OLY_VPERIOD;+ public static int[] ALT_OLY_END_DATE;+ public static int[] ALT_OLY_END_HOUR = new int[3];public static int ALT_OLY_CLASSED;public static int ALT_OLY_NONCLASSED;public static int ALT_OLY_REG_DISPLAY;@@ -2197,6 +2199,17 @@ALT_OLY_BATTLE = Long.parseLong(olympiad.getProperty("AltOlyBattle","360000"));ALT_OLY_WPERIOD = Long.parseLong(olympiad.getProperty("AltOlyWPeriod","604800000"));ALT_OLY_VPERIOD = Long.parseLong(olympiad.getProperty("AltOlyVPeriod","86400000"));+ String[] propertySplit = olympiad.getProperty("AltOlyEndDate","1").split(",");+ ALT_OLY_END_DATE = new int[propertySplit.length];+ for (int i = 0; i < propertySplit.length; i++)+ {+ ALT_OLY_END_DATE[i] = Integer.parseInt(propertySplit[i]);+ }+ propertySplit = olympiad.getProperty("AltOlyEndHour","12:00:00").split(":");+ for (int i = 0; i < 3; i++)+ {+ ALT_OLY_END_HOUR[i] = Integer.parseInt(propertySplit[i]);+ }ALT_OLY_CLASSED = Integer.parseInt(olympiad.getProperty("AltOlyClassedParticipants","5"));ALT_OLY_NONCLASSED = Integer.parseInt(olympiad.getProperty("AltOlyNonClassedParticipants","9"));ALT_OLY_REG_DISPLAY = Integer.parseInt(olympiad.getProperty("AltOlyRegistrationDisplayNumber","100"));Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java===================================================================--- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (revision 3799)+++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (working copy)@@ -872,14 +872,25 @@Announcements.getInstance().announceToAll(sm);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();+ int nearest = 0;+ Calendar[] cals = new Calendar[Config.ALT_OLY_END_DATE.length];+ for (int i = 0; i < cals.length; i++)+ {+ cals[i] = Calendar.getInstance();+ cals[i].set(Calendar.DAY_OF_MONTH, Config.ALT_OLY_END_DATE[i]);+ if (cals[i].before(currentTime))+ cals[i].add(Calendar.MONTH, 1);+ + if (cals[i].before(cals[nearest]))+ nearest = i;+ }+ + cals[nearest].set(Calendar.HOUR_OF_DAY, Config.ALT_OLY_END_HOUR[0]);+ cals[nearest].set(Calendar.MINUTE, Config.ALT_OLY_END_HOUR[1]);+ cals[nearest].set(Calendar.SECOND, Config.ALT_OLY_END_HOUR[2]);+ _olympiadEnd = cals[nearest].getTimeInMillis();+ Calendar nextChange = Calendar.getInstance();_nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;scheduleWeeklyChange();Index: java/config/olympiad.properties===================================================================--- java/config/olympiad.properties (revision 3799)+++ java/config/olympiad.properties (working copy)@@ -33,6 +33,17 @@# Default: 86400000AltOlyVPeriod = 86400000+# Olympiad End Period Date - day(s) of month+# (e.g. 1 would mean oly period ends every 1st day of month)+# (e.g. 1,15 would mean oly period ends every 1st and 15th day of month)+# <b><font color=red>CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>+# Default: 1+AltOlyEndDate = 1 <------------- // Sakretsu - So there you should write 1,15 (days of every month)++# Olympiad End Period Time - in format hh:mm:ss (24 hours format)+# Default: 12:00:00+AltOlyEndHour = 12:00:00+# Required number of participants for Classed and Non-Classed matches, Default 5 & 9# Default: 5AltOlyClassedParticipants = 5  
Credits to someone in this forum JIV / DS.. I don't know it anymore :-)
crazyshock
Posts: 118
Joined: Thu Mar 26, 2009 9:53 pm

Re: change olympiads

Post by crazyshock »

Great... very thanks.
100% work?

Thanks +1
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: change olympiads

Post by SolidSnake »

Credits to janiii
Image
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: change olympiads

Post by janiii »

SolidSnake wrote:Credits to janiii
i dont remember that code ^^
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: change olympiads

Post by SolidSnake »

Image
aris1009
Posts: 2
Joined: Sun Oct 16, 2011 9:15 am

Re: change olympiads

Post by aris1009 »

Please tell me if this is done correctly, this is what i did:

1.Opened Config.java in eclipse
2.Used code
3.went to build.xml run>ant built 1
4.AND BUILD FAILS

what should i do? iget many errors about syntax. :/ please help a.s.a.p?

this is the lines where the error is.
(BUILD FAILED
C:\workspace\L2J_Server_BETA\build.xml:183: Execute failed: java.io.IOException: Cannot run program "svn": CreateProcess error=2, The system cannot find the file specified
)

<target name="getChangelogDateVersion" description="Get Changelog, Date, Version">
<exec dir="." executable="svn" outputproperty="l2j.changelog">
<arg value="log" />
<arg value="--stop-on-copy" />
</exec>
<tstamp>
<format property="build.tstamp" pattern="dd/MM/yyyy HH:mm" />
</tstamp>
<exec dir="." executable="svnversion" outputproperty="l2j.version" />
</target>
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

Re: change olympiads

Post by tukune »

Cannot run program "svn":
install SlikSVN
http://trac.l2jserver.com/wiki/Eclipse
aris1009
Posts: 2
Joined: Sun Oct 16, 2011 9:15 am

Re: change olympiads

Post by aris1009 »

tukune wrote:
Cannot run program "svn":
install SlikSVN
http://trac.l2jserver.com/wiki/Eclipse
thanks a lot man.
just a question, now that i compiled it.
how am i going to add this to my server?
User avatar
TeNaCiOuS
Posts: 10
Joined: Mon May 23, 2011 12:17 pm
Location: Chile

Re: change olympiads

Post by TeNaCiOuS »

(i dont speak english, sorry)

thank you, i implement this mod in my l2j t2.3, tomorrow i check if it works
Post Reply