Jump to content
  • 0

help pls !!!


Question

Posted

I have a server l2 brick freya rev 1586.

I have problem olympiad stadiums not working i push stadium :

screenshottpt.png

look error :

Exception in null

java.lang.NullPointerException
at handlers.bypasshandlers.OlympiadObservation.useBypass(OlympiadObservation.java:260)
at l2.brick.gameserver.model.actor.L2Npc.onBypassFeedback(L2Npc.java:1030)
at l2.brick.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:129)
at l2.brick.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at l2.brick.gameserver.network.L2GameClient.run(L2GameClient.java:1027)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

 

How the fix pls....?

Recommended Posts

  • 0
Posted

look friend : Observation.java

/*

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

* 

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

* 

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package handlers.bypasshandlers;



import java.util.StringTokenizer;



import l2.brick.gameserver.handler.IBypassHandler;

import l2.brick.gameserver.instancemanager.SiegeManager;

import l2.brick.gameserver.model.actor.L2Character;

import l2.brick.gameserver.model.actor.L2Npc;

import l2.brick.gameserver.model.actor.instance.L2PcInstance;

import l2.brick.gameserver.network.SystemMessageId;

import l2.brick.gameserver.network.serverpackets.ActionFailed;

import l2.brick.gameserver.network.serverpackets.ItemList;

import l2.brick.gameserver.network.serverpackets.SystemMessage;



public class Observation implements IBypassHandler

{

private static final String[] COMMANDS =

{

	"observesiege",

	"observeoracle",

	"observe"

};



public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)

{

	if (!(target instanceof L2Npc))

		return false;



	try

	{

		if (command.toLowerCase().startsWith(COMMANDS[0])) // siege

		{

			String val = command.substring(13);

			StringTokenizer st = new StringTokenizer(val);

			st.nextToken(); // Bypass cost



			if (SiegeManager.getInstance().getSiege(Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken()), Integer.parseInt(st.nextToken())) != null)

				doObserve(activeChar, (L2Npc)target, val);

			else

				activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ONLY_VIEW_SIEGE));

			return true;

		}

		else if (command.toLowerCase().startsWith(COMMANDS[1])) // oracle

		{

			String val = command.substring(13);

			StringTokenizer st = new StringTokenizer(val);

			st.nextToken(); // Bypass cost

			doObserve(activeChar, (L2Npc)target, val);

			return true;

		}

		else if (command.toLowerCase().startsWith(COMMANDS[2])) // observe

		{

			doObserve(activeChar, (L2Npc)target, command.substring(8));

			return true;

		}



		return false;

	}

	catch (Exception e)

	{

		_log.info("Exception in " + getClass().getSimpleName());

	}

	return false;

}



private static final void doObserve(L2PcInstance player, L2Npc npc, String val)

{

	StringTokenizer st = new StringTokenizer(val);

	long cost = Long.parseLong(st.nextToken());

	int x = Integer.parseInt(st.nextToken());

	int y = Integer.parseInt(st.nextToken());

	int z = Integer.parseInt(st.nextToken());



	if (player.reduceAdena("Broadcast", cost, npc, true))

	{

		// enter mode

		player.enterObserverMode(x, y, z);

		player.sendPacket(new ItemList(player, false));

	}

	player.sendPacket(ActionFailed.STATIC_PACKET);

}



public String[] getBypassList()

{

	return COMMANDS;

}

}

you see a mistake;

  • 0
Posted

sorry my friend now i see i have mistake here :

OlympiadObservation.java

/*

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

* 

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

* 

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package handlers.bypasshandlers;



import java.util.logging.Level;



import l2.brick.gameserver.handler.IBypassHandler;

import l2.brick.gameserver.model.actor.L2Character;

import l2.brick.gameserver.model.actor.instance.L2OlympiadManagerInstance;

import l2.brick.gameserver.model.actor.instance.L2PcInstance;

import l2.brick.gameserver.model.entity.DM;

import l2.brick.gameserver.model.entity.LMEvent;

import l2.brick.gameserver.model.entity.TvTEvent;

import l2.brick.gameserver.model.entity.TvTRoundEvent;

import l2.brick.gameserver.model.olympiad.Olympiad;

import l2.brick.gameserver.model.olympiad.OlympiadGameManager;

import l2.brick.gameserver.model.olympiad.OlympiadGameTask;

import l2.brick.gameserver.model.olympiad.OlympiadManager;

import l2.brick.gameserver.network.SystemMessageId;

import l2.brick.gameserver.network.serverpackets.NpcHtmlMessage;

import l2.brick.gameserver.network.serverpackets.SystemMessage;

import l2.brick.util.StringUtil;



/**

* 

* @author DS

*

*/

public class OlympiadObservation implements IBypassHandler

{

private static final String[] COMMANDS =

{

	"arenalist",

	"arenachange"

};



public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)

{

	try

	{

		final boolean isManager = target instanceof L2OlympiadManagerInstance;

		if (!isManager)

		{

			// without npc command can be used only in observer mode on arena

			if (!activeChar.inObserverMode()

					|| activeChar.isInOlympiadMode()

					|| activeChar.getOlympiadGameId() < 0)

				return false;

		}



		if (command.startsWith(COMMANDS[0])) //list

		{

			NpcHtmlMessage message = new NpcHtmlMessage(0);

			if (command.length() < 10)

			{

				if (isManager)

				{

					message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_observe.htm");

					message.replace("%objectId%", String.valueOf(target.getObjectId()));

				}

				else

					message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_arena_observe.htm");



				activeChar.sendPacket(message);

				return true;

			}



			final int firstArena, lastArena;

			switch (Integer.parseInt(command.substring(10).trim()))

			{

				case 1:

					firstArena = 0;

					lastArena = 21;

					break;

				case 2:

					firstArena = 22;

					lastArena = 43;

					break;

				case 3:

					firstArena = 44;

					lastArena = 65;

					break;

				case 4:

					firstArena = 66;

					lastArena = 87;

					break;

				default:

					return false;

			}



			StringBuilder list = new StringBuilder(3500);

			OlympiadGameTask task;



			if (isManager)

			{

				message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_observe_list.htm");

				for (int i = firstArena; i <= lastArena; i++)

				{

					task = OlympiadGameManager.getInstance().getOlympiadTask(i);

					if (task != null)

					{

						StringUtil.append(list,

								"<a action=\"bypass -h npc_%objectId%_arenachange ",

								String.valueOf(i),

								"\">Arena ",

								String.valueOf(i + 1),

								"   ");



						if (task.isGameStarted())

						{

							if (task.isBattleStarted())

								StringUtil.append(list, "&$1719;"); // Playing

							else

								StringUtil.append(list, "&$1718;"); // Standby



							StringUtil.append(list,

									"   ",

									task.getGame().getPlayerNames()[0],

									"  :  ",

									task.getGame().getPlayerNames()[1]);

						}

						else

						{

							StringUtil.append(list, "&$906;", // Initial State

									"</td><td> ");

						}



						StringUtil.append(list, "</a><br>");

					}

				}

				message.replace("%list%", list.toString());

				message.replace("%objectId%", String.valueOf(target.getObjectId()));

			}

			else

			{

				message.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "olympiad_arena_observe_list.htm");					

				for (int i = firstArena; i <= lastArena; i++)

				{

					task = OlympiadGameManager.getInstance().getOlympiadTask(i);

					if (task != null)

					{

						StringUtil.append(list,

								"<tr><td fixwidth=30><a action=\"bypass arenachange ",

								String.valueOf(i),

								"\">",

								String.valueOf(i + 1),

								"</a></td><td fixwidth=60>");



						if (task.isGameStarted())

						{

							if (task.isBattleStarted())

								StringUtil.append(list, "&$1719;"); // Playing

							else

								StringUtil.append(list, "&$1718;"); // Standby



							StringUtil.append(list,

									"</td><td>",

									task.getGame().getPlayerNames()[0],

									" ",

									task.getGame().getPlayerNames()[1]);

						}

						else

						{

							StringUtil.append(list, "&$906;", // Initial State

									"</td><td> ");

						}



						StringUtil.append(list, "</td><td><font color=\"aaccff\"></font></td></tr>");

					}

				}

			}



			for (int i = firstArena; i <= lastArena; i++)

			{

				task = OlympiadGameManager.getInstance().getOlympiadTask(i);

				if (task != null)

				{

					StringUtil.append(list,

							"<tr><td fixwidth=30><a action=\"bypass arenachange ",

							String.valueOf(i),

							"\">",

							String.valueOf(i + 1),

							"</a></td><td fixwidth=60>");



					if (task.isGameStarted())

					{

						if (task.isBattleStarted())

							StringUtil.append(list, "&$1719;"); // Playing

						else

							StringUtil.append(list, "&$1718;"); // Standby



						StringUtil.append(list,

								"</td><td>",

								task.getGame().getPlayerNames()[0],

								" ",

								task.getGame().getPlayerNames()[1]);

					}

					else

					{

						StringUtil.append(list, "&$906;", // Initial State

								"</td><td> ");

					}



					StringUtil.append(list,

							"</td><td><font color=\"aaccff\"></font></td></tr>");

				}

				message.replace("%list%", list.toString());

			}



			activeChar.sendPacket(message);

			return true;

		}

		else //change

		{

			if (isManager)

			{

				if (OlympiadManager.getInstance().isRegisteredInComp(activeChar))

				{

					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.WHILE_YOU_ARE_ON_THE_WAITING_LIST_YOU_ARE_NOT_ALLOWED_TO_WATCH_THE_GAME));

					return false;

				}

				if (!TvTEvent.isInactive() && TvTEvent.isPlayerParticipant(activeChar.getObjectId()))

				{

					activeChar.sendMessage("You can not observe games while registered for TvT");

					return false;

				}

				if (!LMEvent.isInactive() && LMEvent.isPlayerParticipant(activeChar.getObjectId()))

				{

					activeChar.sendMessage("You can not observe games while registered for LM");

					return false;

				}

				if (!DM.isInactive() && DM.isPlayerParticipant(activeChar.getObjectId()))

				{

					activeChar.sendMessage("You can not observe games while registered for DM");

					return false;

				}

				if (!TvTRoundEvent.isInactive() && TvTRoundEvent.isPlayerParticipant(activeChar.getObjectId()))

				{

					activeChar.sendMessage("You can not observe games while registered for TvT Round");

					return false;

				}

			}



			final int arenaId = Integer.parseInt(command.substring(12).trim());

			final OlympiadGameTask nextArena = OlympiadGameManager.getInstance().getOlympiadTask(arenaId);

			if (nextArena != null)

			{

				activeChar.enterOlympiadObserverMode(nextArena.getZone().getSpawns().get(0), arenaId);

				return true;

			}

		}

	}

	catch (Exception e)

	{

		_log.log(Level.INFO, "Exception in " + e.getMessage(), e);

	}

	return false;

}



public final String[] getBypassList()

{

	return COMMANDS;

}

}

  • 0
Posted

i dont find something about updates.

i have find only H5 update but they dont working in freya error game console.

the problem is here when i click arena :

screenshottpt.png

 

error:

Exception in null

java.lang.NullPointerException
at handlers.bypasshandlers.OlympiadObservation.useBypass(OlympiadObservation.java:260)
at l2.brick.gameserver.model.actor.L2Npc.onBypassFeedback(L2Npc.java:1030)
at l2.brick.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:129)
at l2.brick.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at l2.brick.gameserver.network.L2GameClient.run(L2GameClient.java:1027)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

:P

  • 0
Posted

I told you already you have some corrupted XML, it could be an outdated XML or one with typos or incomplete...

 

I know where the error is I read the code, it gets a null zone, that happens when it fails to find it, meaning is not properly loaded from XML files.

  • 0
Posted

I ask to l2 brick forum and he tell me fixed in H5 but i dont know what files i take...

They dont have support for freya client :p

Can you help me what files i take?

  • 0
Posted

you mean this? olympiad_stadium_zones.xml

 

Yes, that zone XML files.

 

Try to find the file from their SVN that worked, you may need to test a few...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • https://vpslab.cloud/ Premium DDoS Protection now included with every server.
    • # Changelog - Public Updates   This changelog tracks user-facing updates and improvements to Top.MaxCheaters.com.   ---   ## [1.2.0] - 2026-01-XX   ### ⚡ Performance Improvements - **Faster Page Loads**: Implemented intelligent caching system that makes pages load significantly faster - **My Servers Page**: Now loads instantly when revisiting (no more loading delays) - **Main Page**: Server listings and filters now load faster on repeat visits - **Premium Ads**: Pricing information loads instantly - **Overall Performance**: Site now loads 60-80% faster with reduced server load   ### 🔄 Improvements - Pages now remember recent data, reducing wait times when navigating - Automatic cache refresh ensures you always see up-to-date information - Better user experience with instant page loads on repeat visits   ---   ## [1.1.1] - 2026-01-XX   ### 🐛 Bug Fixes - **VIP Server Filter**: Fixed "VIP L2 Servers" filter to correctly show all premium tier servers (VIP, Gold VIP, and Pinned) - **Ad Pricing Display**: Fixed ad pricing on Premium Ads page to automatically update when changed in admin panel   ### 🔄 Improvements - Ad pricing now syncs automatically across all pages - More accurate server filtering by tier   ---   ## [1.1.0] - 2026-01-XX   ### ✨ New Features - **Complete Chronicle List**: All chronicle options are now available in server forms and filters, including the latest Lineage 2 chronicles - **Improved Chronicle Display**: Server rows now show cleaner, shorter chronicle names for better readability   ### 🐛 Bug Fixes - **Chronicle Filter**: Fixed issue where "Infinite Odyssey" chronicle filter was not working correctly - **Missing Chronicles**: Fixed missing chronicle options in server creation and editing forms   ### 🔄 Improvements - Chronicle filters and dropdowns now stay in sync with the latest available chronicles - Better chronicle name formatting in server listings for improved visual clarity   ---   ## [1.0.0] - Initial Release   ### Features - 🎮 Server listings with multiple tiers (Normal, VIP, Gold VIP, Pinned) - 📊 Click tracking and server statistics - 🌍 Multi-language support (English, Spanish, Portuguese, Greek, Russian) - 💳 Payment system for premium server features - 🔐 Secure authentication system - 👑 Admin panel for server management - 📱 Fully responsive design for all devices - 🔍 Advanced filtering system (by chronicle, rate, server type, date) - 📅 Server opening date tracking - 🎯 Two viewing modes: By Date and By Votes (coming soon for all users)   ---   ## About This Changelog   This changelog focuses on updates that directly impact the user experience. Internal development changes and technical improvements are not included here.   For questions or feedback, please contact support.v
    • Now Acc Registration open. Create your account and get ready 🙂
  • 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..