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

    • L2 Kings    Stage 1 – The Awakening Dynasty and Moirai Level Cap: 83 Gear: Dynasty -Moirai & Weapons (Shop for Adena + Drop from mobs/instances ) Masterwork System: Available (Neolithics S required with neolithics u can do armor parts foundation aswell) Class Cloaks: Level 1 - Masterwork sets such us moirai/dynasty stats are boosted also vesper(stage 2) Olf T-Shirt: +6 (fails don’t reset) safe is +2 Dolls: Level 1 Belts: Low & Medium Enchant: Safe +3 / Max +8 / Attribution Easy in Moirai-Dynasty . Main Zones: Varka Outpost: Easy farm, Adena, EXP for new players = > 80- 100kk hour Dragon Valley: Main farm zone — , 100–120kk/hour Weapon Weakness System active (all classes can farm efficiently) Archers get vampiric auto-hits vs mobs Dragon Valley Center: Main Party Zone — boosted drops (Blessed enchants, Neolithics chance) => farm like 150-200kk per hour. Dragon Valley North: Spoil Zone (Asofe + crafting materials for MW) Primeval Isle: Safe autofarm zone (low adena for casual players) ==> 50kk per hour Forge of the Gods & Imperial Tomb: Available from Stage 1 (lower Adena reward in compare with Dragon Valley) Hellbound also avaliable from stage 1 In few words all zones opened but MAIN farm zone with boosted adena and drops is Dragon valley also has more mobs Instances: Zaken (24h Reuse) → Instead of Vespers drop Moirai , 100% chance to drop 1 of 9 dolls lvl 1, Zaken 7-Day Jewelry Raid Bosses (7 RBs): Drop Moirai Parts + Neolithic S grade instead of Vespers parts that has 7 Rb Quest give Icarus Weapons Special Feature 7rb bosses level up soul crystals aswell. Closed Areas : Monaster of SIlence, LOA, ( It wont have mobs) / Mahum Quest/Lizardmen off) Grand Epics: Unlocked on Day 4 of Stage 1 → Antharas, Valakas, Baium, AQ, etc ================================================================================= Stage 2 – Rise of Vespers Level Cap: 85 Gear: Moirai Armors (Adena GM SHOP / Craft/ Drop) Weapons: Icarus Cloaks: Level 2 Olf: +8 Dolls: Level 2 Belts: High & Top Enchant: Safe +3 / Max +8 Masterwork can be with Neolithics S84 aswell but higher so craft will be usefull aswell. 7 Raid Boss Quest Updated: Now works retail give vesper weapons 7rb Bosses Drops : Vespers Instances: Zaken : Drops to retail vespers + the dolls and the extra items that we added on stage 1 New Freya Instance: Added — drops vespers and instead of mid s84 weapons will drop vespers . Extra drops Blessed Bottle of Freya - drops 100% chance 1 of 9 dolls. Farm Areas Dragon Valley remains main farm New Zone : Lair of Antharas (mobs nerfed and added drop Noble stone so solo players can farm too) New Party Zone : LOA Circle   ============================================================================   Stage 3 – The Vorpal ERA Gear: Vorpal Unclock Cloaks: Level 3 Olf: +10 (max cap) Dolls: Level 3 Enchant: Safe +3 / Max +12 Farm Zones : Dragon Valley Center Scorpions becomes a normal solo zone (no longer party zone) Drops:   LOA & Knorik → Mid Weapons avaliable in drop New Party Zone Kariks Instances: Easy Freya Drops Mid Weapons Frintezza Release =================================================================================     Stage 4 – Elegia Era (Final Stage) Elegia Unlock Gear: Elegia Weapons: Elegia TOP s84 ( farmed via H-Freya/ Drops ) Cloaks: Level 5 Dolls: Level 3 (final bonuses) Enchant: Safe +6 / Max +16 Instances: Hard Freya → Drops Elegia Weapons + => The Instance will drop 2-3 parts for sure and also will be able to Join with 7 people . Party Zone will have also drop chances for elegia armor parts and weapons but small   Events (Hourly): Win: 50 Event Medals + 3 GCM + morewards Lose: 25 Medals + 1 GCM + more rewards Tie: 30 Medals + 2 GCM + more rewards   ================================================================================ Epic Fragments Currency Participating in Daily Bosses mass rewarding all players Participating in Instances (zaken freya frintezza etc) all players get reward ================================================================================ Adena - Main server currency (all items in gm shop require adena ) Event Medals (Festival Adena) - Event shop currency Donation coins you can buy with them dressme,cosmetics and premium account Epic Fragments you can buy with them fake epic jewels Olympiad Tokens you can buy many items from olympiad shop (Hero Coin even items that are on next stages) Olympiad Win = 1000 Tokens / Lose = 500 Tokens ================================================================================= Offline Autofarm Allows limited Offline farming requires offline autofarm ticket that you get by voting etc ================================================================================= Grand Epics have Specific Custom NPC that can spawn Epics EU/LATIN TIME ZONE ================================================================================= First Olympiad Day 19 December First Heroes 22 December ( 21 December Last day of 1st Period) After that olympiad will be weekly. ================================================================================= Item price and economy Since adena is main coin of server and NOT donation coins we will always add new items in gm shop with adena in order to burn the adena of server and not be inflation . =================================================================================        
    • Hello, I'd like to change a title color for custom npc.  I created custom NPC, cloned existing. I put unique id for it in npcname-e, npcgrp and database. I have "0" to serverSideName in db, so that it would use npcname-e, but instead it has "NoNameNPC"and no title color change.
    • Trusted Guy 100% ,  I asked him for some work and he did it right away.
  • 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