change olympiads

Limited support for the previous versions of L2jServer. All new work and bug fixes will be on the current release.
Forum rules
READ NOW: L2j Forums Rules of Conduct

change olympiads

Postby crazyshock » Sun Nov 21, 2010 5:59 pm

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!
crazyshock
 
Posts: 121
Joined: Thu Mar 26, 2009 10:53 pm

Re: change olympiads

Postby Flashy » Sun Nov 21, 2010 6:33 pm

  1.  
  2. Index: java/com/l2jserver/Config.java
  3. ===================================================================
  4. --- java/com/l2jserver/Config.java (revision 3799)
  5. +++ java/com/l2jserver/Config.java (working copy)
  6. @@ -469,6 +469,8 @@
  7. public static long ALT_OLY_BATTLE;
  8. public static long ALT_OLY_WPERIOD;
  9. public static long ALT_OLY_VPERIOD;
  10. + public static int[] ALT_OLY_END_DATE;
  11. + public static int[] ALT_OLY_END_HOUR = new int[3];
  12. public static int ALT_OLY_CLASSED;
  13. public static int ALT_OLY_NONCLASSED;
  14. public static int ALT_OLY_REG_DISPLAY;
  15. @@ -2197,6 +2199,17 @@
  16. ALT_OLY_BATTLE = Long.parseLong(olympiad.getProperty("AltOlyBattle","360000"));
  17. ALT_OLY_WPERIOD = Long.parseLong(olympiad.getProperty("AltOlyWPeriod","604800000"));
  18. ALT_OLY_VPERIOD = Long.parseLong(olympiad.getProperty("AltOlyVPeriod","86400000"));
  19. + String[] propertySplit = olympiad.getProperty("AltOlyEndDate","1").split(",");
  20. + ALT_OLY_END_DATE = new int[propertySplit.length];
  21. + for (int i = 0; i < propertySplit.length; i++)
  22. + {
  23. + ALT_OLY_END_DATE[i] = Integer.parseInt(propertySplit[i]);
  24. + }
  25. + propertySplit = olympiad.getProperty("AltOlyEndHour","12:00:00").split(":");
  26. + for (int i = 0; i < 3; i++)
  27. + {
  28. + ALT_OLY_END_HOUR[i] = Integer.parseInt(propertySplit[i]);
  29. + }
  30. ALT_OLY_CLASSED = Integer.parseInt(olympiad.getProperty("AltOlyClassedParticipants","5"));
  31. ALT_OLY_NONCLASSED = Integer.parseInt(olympiad.getProperty("AltOlyNonClassedParticipants","9"));
  32. ALT_OLY_REG_DISPLAY = Integer.parseInt(olympiad.getProperty("AltOlyRegistrationDisplayNumber","100"));
  33. Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java
  34. ===================================================================
  35. --- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (revision 3799)
  36. +++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (working copy)
  37. @@ -872,14 +872,25 @@
  38. Announcements.getInstance().announceToAll(sm);
  39. Calendar currentTime = Calendar.getInstance();
  40. - currentTime.add(Calendar.MONTH, 1);
  41. - currentTime.set(Calendar.DAY_OF_MONTH, 1);
  42. - currentTime.set(Calendar.AM_PM, Calendar.AM);
  43. - currentTime.set(Calendar.HOUR, 12);
  44. - currentTime.set(Calendar.MINUTE, 0);
  45. - currentTime.set(Calendar.SECOND, 0);
  46. - _olympiadEnd = currentTime.getTimeInMillis();
  47. + int nearest = 0;
  48. + Calendar[] cals = new Calendar[Config.ALT_OLY_END_DATE.length];
  49. + for (int i = 0; i < cals.length; i++)
  50. + {
  51. + cals[i] = Calendar.getInstance();
  52. + cals[i].set(Calendar.DAY_OF_MONTH, Config.ALT_OLY_END_DATE[i]);
  53. + if (cals[i].before(currentTime))
  54. + cals[i].add(Calendar.MONTH, 1);
  55. +
  56. + if (cals[i].before(cals[nearest]))
  57. + nearest = i;
  58. + }
  59. +
  60. + cals[nearest].set(Calendar.HOUR_OF_DAY, Config.ALT_OLY_END_HOUR[0]);
  61. + cals[nearest].set(Calendar.MINUTE, Config.ALT_OLY_END_HOUR[1]);
  62. + cals[nearest].set(Calendar.SECOND, Config.ALT_OLY_END_HOUR[2]);
  63. + _olympiadEnd = cals[nearest].getTimeInMillis();
  64. +
  65. Calendar nextChange = Calendar.getInstance();
  66. _nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
  67. scheduleWeeklyChange();
  68. Index: java/config/olympiad.properties
  69. ===================================================================
  70. --- java/config/olympiad.properties (revision 3799)
  71. +++ java/config/olympiad.properties (working copy)
  72. @@ -33,6 +33,17 @@
  73. # Default: 86400000
  74. AltOlyVPeriod = 86400000
  75. +# Olympiad End Period Date - day(s) of month
  76. +# (e.g. 1 would mean oly period ends every 1st day of month)
  77. +# (e.g. 1,15 would mean oly period ends every 1st and 15th day of month)
  78. +# <b><font color=red>CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>
  79. +# Default: 1
  80. +AltOlyEndDate = 1 <------------- // Sakretsu - So there you should write 1,15 (days of every month)
  81. +
  82. +# Olympiad End Period Time - in format hh:mm:ss (24 hours format)
  83. +# Default: 12:00:00
  84. +AltOlyEndHour = 12:00:00
  85. +
  86. # Required number of participants for Classed and Non-Classed matches, Default 5 & 9
  87. # Default: 5
  88. AltOlyClassedParticipants = 5
  89.  
  90.  


Credits to someone in this forum JIV / DS.. I don't know it anymore :-)
User avatar
Flashy
 
Posts: 325
Joined: Mon Sep 29, 2008 12:49 pm
Location: Germany

Re: change olympiads

Postby crazyshock » Sun Nov 21, 2010 6:59 pm

Great... very thanks.
100% work?

Thanks +1
crazyshock
 
Posts: 121
Joined: Thu Mar 26, 2009 10:53 pm

Re: change olympiads

Postby SolidSnake » Sun Nov 21, 2010 8:29 pm

Credits to janiii
Image
User avatar
SolidSnake
 
Posts: 872
Joined: Wed Jan 20, 2010 7:54 pm
Location: Italy

Re: change olympiads

Postby janiii » Sun Nov 21, 2010 9:36 pm

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
janiii
L2j Veteran
L2j Veteran
 
Posts: 4346
Joined: Wed May 28, 2008 4:15 pm
Location: Slovakia

Re: change olympiads

Postby SolidSnake » Sun Nov 21, 2010 9:42 pm

Image
User avatar
SolidSnake
 
Posts: 872
Joined: Wed Jan 20, 2010 7:54 pm
Location: Italy

Re: change olympiads

Postby aris1009 » Sun Oct 23, 2011 11:52 pm

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>
aris1009
 
Posts: 2
Joined: Sun Oct 16, 2011 10:15 am

Re: change olympiads

Postby tukune » Tue Oct 25, 2011 7:58 am

Cannot run program "svn":


install SlikSVN
http://trac.l2jserver.com/wiki/Eclipse
I can NOT speak english. Sorry for my bad english.
User avatar
tukune
 
Posts: 359
Joined: Sun Mar 29, 2009 3:35 pm
Location: Japan

Re: change olympiads

Postby aris1009 » Wed Oct 26, 2011 12:29 pm

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?
aris1009
 
Posts: 2
Joined: Sun Oct 16, 2011 10:15 am


Return to Legacy Server Support

Who is online

Users browsing this forum: No registered users and 1 guest