Jump to content
  • 0

Olympiad bug


Question

Posted

Ok here's the deal, I was testing some stuff inside olys for the first time on my server (last h5 files) and i did 10 matches.

 

After like 2 hours i went back online and did /olympiadstat on my char and it only had 3 matches done. Any1 clue on what's going on?

 

Thanks in advance

Recommended Posts

  • 0
Posted

Ok here's the deal, I was testing some stuff inside olys for the first time on my server (last h5 files) and i did 10 matches.

 

After like 2 hours i went back online and did /olympiadstat on my char and it only had 3 matches done. Any1 clue on what's going on?

 

Thanks in advance

Did you add any custom patch related with olympiads? Did u try to report it in l2jserver forum?

U should test it again btw. I guess there isn't a config to setup a maximum number of combats per day, isn't it?

  • 0
Posted

Verify if the different values are correctly setuped on /olympiadstat usercommand. It probably showed you losses or winning instead of total, etc. The position of parameters in a SystemMessage is important. And in few cases, you can have s2 s1 instead of regular s1 s2.

  • 0
Posted

It says i have 3matches, 2 won, 1 lost.

The thing is, when i open navicat, inside olympiad_data i see all the matches there... and yesterday when i did /olympaidstat it showed all the 10 matches, it only changed after a while for some weird reason.

And yeah i was trying to change the period from 1 month to 2 weeks, and i believe i failed... >.<

 

Btw, talkin' about it, can any of u redirect me to a post on "how to change it to 2 weeks", cuz all the ones i saw i dont believe that they are for h5, atleast the files they ask to change i dont even have them, i mean the lines...

 

  • 0
Posted

Ye...

 

Olympiad.java

Calendar currentTime = Calendar.getInstance();
+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();		
-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();

Calendar nextChange = Calendar.getInstance();
_nextWeeklyChange = nextChange.getTimeInMillis() + WEEKLY_PERIOD;
scheduleWeeklyChange();

 

Config.java

 

public static int[] ALT_OLY_END_DATE;

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]);
}

 

olympiad.properties

# 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)
# CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>
# Default: 1
AltOlyEndDate = 1

I guess it's all there, I don't find the patch.

Credits:Zoey76

  • 0
Posted

Just one thing, where do I add the lines in config.java

 

ty very much anyway and I hope it works :)

the "public static int[] ALT_OLY_END_DATE;" just... CNTRL + F "ALT_OLY_ENCHANT_LIMIT" for example...

and the rest just...CNTRL + F "ALT_OLY_ENCHANT_LIMIT" again and put it there...

  • 0
Posted

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\Config.java:2877: error: variable propertySplit is already defined in method load()

    [javac] String[] propertySplit = Olympiad.getProperty("AltOlyEndDate","1").split(",");

    [javac]         ^

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:608: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.HOUR_OF_DAY, Config.ALT_OLY_END_HOUR[0]);

    [javac]                                               ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:609: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.MINUTE, Config.ALT_OLY_END_HOUR[1]);

    [javac]                                         ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:610: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.SECOND, Config.ALT_OLY_END_HOUR[2]);

    [javac]                                         ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] 4 errors

 

BUILD FAILED

  • 0
Posted

change

String[] propertySplit = Olympiad.getProperty("AltOlyEndDate","1").split(",");

for

propertySplit = Olympiad.getProperty("AltOlyEndDate","1").split(",");

 

and from Olympiad.java your void should look like this:

 

protected void setNewOlympiadEnd()
{
	SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);
	sm.addNumber(_currentCycle);		
	Announcements.getInstance().announceToAll(sm);		
	Calendar currentTime = Calendar.getInstance();

	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();
}

  • 0
Posted

compile:

    [javac] Compiling 1662 source files to C:\Users\Paps\Desktop\L2J Server\workspace\L2J_Server\build\bin

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\Config.java:2878: error: cannot assign a value to final variable propertySplit

    [javac] propertySplit = Olympiad.getProperty("AltOlyEndDate","1").split(",");

    [javac] ^

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:608: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.HOUR_OF_DAY, Config.ALT_OLY_END_HOUR[0]);

    [javac]                                               ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:609: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.MINUTE, Config.ALT_OLY_END_HOUR[1]);

    [javac]                                         ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] L2J Server\workspace\L2J_Server\java\com\l2jserver\gameserver\model\olympiad\Olympiad.java:610: error: cannot find symbol

    [javac] cals[nearest].set(Calendar.SECOND, Config.ALT_OLY_END_HOUR[2]);

    [javac]                                         ^

    [javac]  symbol:  variable ALT_OLY_END_HOUR

    [javac]  location: class Config

    [javac] 4 errors

 

BUILD FAILED

 

Still having these 4 errors :s

  • 0
Posted

Well dunno what the hack are u doing but i think that i gave you all to add it ok. I'm sleeping now, hope u can find out whats wrong in ur workspace.

  • 0
Posted

Ok, Config.java is wrong, use this

 

### Eclipse Workspace Patch 1.0
#P L2J_Server
Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java
===================================================================
--- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java	(revision 6193)
+++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java	(working copy)
@@ -586,18 +586,30 @@
	{
		SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.OLYMPIAD_PERIOD_S1_HAS_STARTED);
		sm.addNumber(_currentCycle);
-		
		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/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 6193)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -563,6 +563,8 @@
	public static String CHAT_FILTER_CHARS;
	public static int[] BAN_CHAT_CHANNELS;
	public static int ALT_OLY_START_TIME;
+	public static int[] ALT_OLY_END_DATE;
+	public static int[] ALT_OLY_END_HOUR = new int[3];
	public static int ALT_OLY_MIN;
	public static long ALT_OLY_CPERIOD;
	public static long ALT_OLY_BATTLE;
@@ -2832,6 +2834,17 @@
			}

			ALT_OLY_START_TIME = Integer.parseInt(Olympiad.getProperty("AltOlyStartTime", "18"));
+			String[] Split = Olympiad.getProperty("AltOlyEndDate", "1").split(",");
+			ALT_OLY_END_DATE = new int[split.length];
+			for (int i = 0; i < Split.length; i++)
+			{
+				ALT_OLY_END_DATE[i] = Integer.parseInt(Split[i]);
+			}
+			Split = Olympiad.getProperty("AltOlyEndHour", "12:00:00").split(":");
+			for (int i = 0; i < 3; i++)
+			{
+				ALT_OLY_END_HOUR[i] = Integer.parseInt(Split[i]);
+			}
			ALT_OLY_MIN = Integer.parseInt(Olympiad.getProperty("AltOlyMin", "00"));
			ALT_OLY_CPERIOD = Long.parseLong(Olympiad.getProperty("AltOlyCPeriod", "21600000"));
			ALT_OLY_BATTLE = Long.parseLong(Olympiad.getProperty("AltOlyBattle", "300000"));

 

and olympiad.properties:

 

# 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)
# CAUTION: You should set the AltOlyWPeriod and AltOlyVPeriod according to the changes done here!</font></b>
# Default: 1
AltOlyEndDate = 1

# Olympiad End Period Time - in format hh:mm:ss (24 hours format)
# Default: 12:00:00
AltOlyEndHour = 12:00:00

  • 0
Posted

BUILD SUCCESSFULL

 

atleast no errors doing that :P

 

Btw, it's suppose to get new heros every 1st and 15th of the month now, right?

  • 0
Posted

BUILD SUCCESSFULL

 

atleast no errors doing that :P

 

Btw, it's suppose to get new heros every 1st and 15th of the month now, right?

Depends, if you set the config = 1,15      yes

Guest
This topic is now closed to further replies.


  • Posts

    • L2Lusty 50x Essence High Version Open day 27/06  12:00 GMT London WebSite: https://l2lusty.com/ General Information If you are looking for a High Five retail server, this project is not for you, our gameplay and farming system is based on the Essence version. If you are looking for something new and different to play, this server is for you. Our server is using its own version that mixes High Five and the latest Essence version. With this, we have a good part of the items from the Lineage2 Essence version, with classes and bosses from High Five. An auto-balance system in onlympiad games, which will bring greater equality in combats. We added the Chaos Zone and Peace Zone events, for a better LCoin farm, these events are 24h and can be accessed with the commands .chaos or .peace. All essence items are purchased in our alt+b and cost an average of 300k LCoins. LCoins are obtained by killing any mob, with better drops in the Chaos zone and the Peace Zone. Server Version High Five + Essence Game Play Experience 50x Spoil 8x Drop 8x Adena 8x Normal Enchant 50% (+3 to +12) (40% 12 to 20) Blessed Enchant 50% (+3 to +12) (40% 12 to 20) Safe Enchant +3 Max Enchant +20 Max Windows / IP 6 Accounts Anti-Bot system ON Champions System ON TerritoryWar Saturday 20:00 Siege Every Sunday Olympiads 18:00 / 23:50 Oly End Days 1, 11 and 22 Max Register 1 For IP Minimum Players for Start 4 Players Subclass FREE MAX LVL 85 SHOP GRADE-S Party Diff 30 Level 55/85   Essence Items Price   Items Lvl 1 300k / 1.200kk LCoins Upgrade to Lvl 2 2 items Lvl 1 + 2b Adenas Upgrade to Lvl 3 2 items Lvl 2 + 2b Adenas Upgrade to Lvl 4 2 items Lvl 3 + 2b Adenas Upgrade Chance 25%   Exchange Items   As in other MMORPGs, we have a system of exchanging items for better items.       GrandBoss All Grand Boss Time Fixed Raids Status 50% Change Drop Queen Ant / Core / Orfen / Baium Queen ant Level: 80 Every day 18:30 / Drop Jewel 40% Core Level: 80 Every day 18:40 / Drop Jewel 90% Orfem Level: 80 Every day 18:50 / Drop Jewel 90% Baium Level: 80 Every Friday 18:00 / Drop Jewel 100% Beleth Every Friday 22:00 / Drop Jewel 100% Valakas Every Saturday 18:00 / Drop Jewel 100% Antharas Every Sunday 17:00 / Drop Jewel 100% Max Character in Zone Boss 1 For IP   Instances Party All Intances 5 Players Raids Status 50% Zaken Day 61 5 Players / Jewel Chance 10% Zaken Day Hard 83 5 Players / Jewel Chance Normal / 10% / Blessed 1.9% Zaken Nightmare 61 5 Players / Jewel Chance 90% Frintezza 5 Players / Jewel Chance 40% Freya Normal 5 Players / Jewel Chance 40% Freya Hard 5 Players / Jewel Chance 40% Tiat 5 Players / Weapon Chance 10%   Instances Solo   All Intances Drop S84 Up Crystal Level 10 / 17 Baylor Solo Drop Moirai Set / Vesper Weapons Darion Solo Weapon Chance 1% Tiat Solo Weapon Chance 1% Frintezza Solo Jewel Chance 2% Freya Solo Jewel Chance 2% Zaken Solo Jewel Chance 2% Core Solo Jewel Chance 2% Orfen Solo Jewel Chance 2% Beleth Solo Jewel Chance 1%   Special Events Event Boss Lindvior Every day 16:40 - 22:40 Event Pig Invazion Every day 15:40 - 23:40 Event Dragon Invazion Every day 18:40 - 01:40 Event City War Every day 19:40 - 02:40   Commands .ach .achievements Opens the achievements interface .buffshield (anti-buff) .away .back (stay away / back) .menu .cfg (Character control panel) .combine .talisman (Combine all Talismans) .dressme (Visual Armor Added +1000 HP) .party .invite .partylist Our custom party creation system .offline (off line shop) .repair (repair character) .siege (See the siege time or register your clan) .stats (character status)   .offbuff (Open store buffs) .autofarm (Open Auto Farm Interface) .report (Report a suspicious bot player) .buffshop (Invoke a summon to sell your buffs.) .vote (Opens our vote system.) .aa (Exchange your seal stones for AA automatically.) .oly (Shows all players who are first in the oly ranking.) .status (See a player's status, he has to be in your target) .seeres (Look at a player's resistance, he has to be in his target) .equip (See all of a player's items, they have to be in their target) .regoly (Register with oly wherever you are.) .bagclean Delete all items from your inventory, use it knowing that you will lose everything that is not equipped!   WebSite: https://l2lusty.com/
    • Our sales are ongoing. Bump. 22 June 2025 Telegram: ContactDiscordAccS
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock