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

    • I’ve played around with similar growth setups, and what usually makes the whole thing smoother is pairing them with something steady on the side. For example, I once used famoid.com for a small boost so the main profile didn’t look empty while the Mother/Child flow warmed up. Your themed accounts idea can work nicely as long as the profiles stay active and feel human enough to spark replies.
    • I never said that, can you read? Are you going to start an argument when that isn't the main goal of this post? Or are you just used to the same old discussion mechanics?     Thank you very much for your recommendation. A few months ago, I worked on a project called 'L2Avalon' using a compiled Lucera2 (it was the only thing the project leader provided me), and based on my 20 years of experience playing Lineage 2, I feel like it's broken everywhere, unless the specific version of Lucera I was using was just old. I don't have a problem coding and fixing things, but I am looking for a solid base so I don't do unnecessary work.   Replying to the first guy: I would never discredit paid work; obviously, any paid work will be better than a free one for obvious reasons. But my reality is that I don't want to throw money away, mainly because saving up a large sum of money is a matter of several months in my current situation here in Argentina.
    • I was not expecting either system to be mentioned but to update this information  itopz is a topsite VDSystem is a server vote system   as the creator i gave the vote system free but made mandatory to use my topsite https://github.com/nightw0lv/VDSystem download free, needs an extensive configuration and all java versions to be installed so it can befully be build, but only if you plan to maintain the full solution for all projects in case you want to use only 1 project you just copy the files for example frozen https://github.com/nightw0lv/VDSystem/tree/master/Interlude/Frozen copy paste inside your project, apply the patch of call the main class to gameserver.java and done.   note for active projects minor changes will probably be required   about the latest version hopzone.eu my other topsite is also required to have a server and get an api key same reason system is free, appriciate it. there is a huge difference that also extends as example in l2j Note to the topic owner @zambog420 lucera is also an option specially if you feel coding ready with intellij  
    • good service...recommend.
    • NEW SEASON GRAND OPENING FROM - 23 JANUARY 2026, FRIDAY, 20:00 +2 GMT !
  • 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..

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