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?

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

Guest
This topic is now closed to further replies.


  • Posts

    • 🏰 Clan Donations System – Power Through Unity This system allows clan members to support their clan directly through donations, turning contribution into strength.   How it works: Every donation made by a clan member is automatically listed in the clan donation panel. Each donation is permanently linked to the clan — no loss, no reset. The Clan Leader manages rewards manually for full transparency.   🎁 Clan Donation Rewards For every donation: The clan receives 5% Real Money or 10% Donate Coins (Leader chooses how the reward is given)   📌 After the reward is delivered, the donation is marked as PAID in the system. 🧾 Full Transparency Player name Donation amount Reward value (Real / Donate Coins) Date & status (Pending / Paid)   Everything is visible. Everything is tracked. Nothing is forgotten.   ⚔️ Support your clan. Strengthen your alliance. Power is built — not given.   https://www.l2dead.com/ https://discord.gg/TGnATuZmdt
    • up  corrected some retail crashes and hooked some new memory adresses that were missing  fix some missing retail behaviors on some recipes , you can also get the server as c4 with fixed scripts fully retail  what has been done to the c4  ( client is already configured) totally fixed npcposes  totally fixed raidbosses and minions bugged quests are fixed (known) a lot of recipes that were wrong  wrong values in several stats and corrected hero weapons behaviors/atk range
    • ποιο ειναι αρχαιο ακριβως? εκανες τον κοπο να ανοιξεις τα λινκς που εστειλα? 
    • Rates: xp45x / sp50x / adena50x (all adena is divided by 100/all shops prices too) Server: Full Official interlude server  with custom modifications Gameplay: l2Gold weapons - jewels, Buffs 1 hour, rebirth, No class change quests, increased movement speed on all classes   Download patch here: https://mega.nz/file/oZdG2KTa#1uTYSyEkNQV9U0Zxj-KLDE88mLj4pzQJZSYs2k3tpzo   Our server is waiting for all Lineage 2 fans who want to relive the good old days. This server is non-profit and fully dedicated to the community. There is no corruption, no pay-to-win, and no hidden agendas—just pure classic L2 fun.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..