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

    • TP Data: X=150148 Y=203643 Z=-3634
    • Hello everyone, this is ADENA L2REBORN / LU4 / MASTERWORK We also have items, epics, etc. discord - adver745645 Our prices are reasonable, so have a nice shopping and a nice day.
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear friends, we are pleased to announce great news — we are launching our new bot for purchasing and renting virtual numbers for receiving SMS from any services! Are you tired of reused or resold numbers from other platforms? Try our solution! Our service allows you to receive SMS from any major popular services. The list includes more than 200 services! SMS receiving country: USA (+1). Real physical US numbers are used — never previously used on other platforms! Currently, only short-term rental is available. The rental duration for each phone number is shown when purchasing. The cost of each number is also shown next to the service before purchase. You can also receive an additional SMS for your number for the selected service (no extra charge for receiving one more SMS). To quickly find the service you need, you can use the convenient search — just type the name of the service you need and get a number for activation. Available payment methods: cryptocurrencies, bank cards, and balance transfer from our other bots. Thank you for your trust! Active links: Virtual Number Service: Go Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store through Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing goods and services from our platform: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) during October! You can also use the promo code for your first purchase: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply post your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • 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