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

    • 12-07-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • Hundreds of players have already jumped into the world of L2Elixir x3, and the server grows bigger every day! A truly international community is forming — EU, NA, LATAM, Asia — all gathering for the same purpose: To relive the L2Elixir era the right way. Join now and be part of the early wave!   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   🎄 Christmas Event Activated! 🎄 Craft your Ordinary or Special Christmas Tree, place it outside of a peace zone, and enjoy festive outfits, boosted EXP/SP, Adena, and Drop Rates, plus the Holiday Festival buff  (more HP/MP/CP, higher P.Def/P.Atk/M.Atk, faster movement, reduced MP cost!) every 12-hours! 🎁 Santa’s Hourly Gifts While you’re actively farming, Santa appears worldwide to drop special rewards such as: Special Christmas Tree Christmas Red Sock Santa’s Weapon Exchange Ticket (12h) Gift from Santa Santa Hats & Rudolph accessories Agathion: Rudolph Chest of Experience Shadow Hats Scrolls Event b.soe / b.rez Loot Crates 🔥 Santa’s Weapon Ticket Gives you a D/C/B-grade weapon based on your level, randomly enchanted +4 to +10!  4-hour expiration time. Celebrate, fight, farm — and let Santa upgrade your holidays! 🎅✨
    • what do u mean i want to change the normal weapons some weapons are working perftect some not getting th effect and the arcana has the effect above the weapons as u see ... i dont what is the probkenm
    • Stop paying for files that are already public and free. Here you can download a fully working Interlude server with C4-like gameplay, including source code so you can compile it yourself and verify everything. People will try to convince you that free releases are “broken”, “full of backdoors”, etc. That’s exactly why I’m also providing the SVN with the full source – so you can: Review the code yourself Remove / modify whatever you don’t like Compile your own binaries What’s included GX-EXT Interlude server (C4-style gameplay) – L2Off Client Interlude tweaked for C4 gameplay Public SVN with source code Downloads: Server GX-EXT: https://www.mediafire.com/file/q5ipkjd36tnhfxv/L2OFF_C4_C4_ACU_GXEXT.rar/file Client Interlude C4 Gameplay: https://www.mediafire.com/file/rdkfc8wwau042oh/Cliente_Interlude_Jugabilidad_C4.rar/file SVN (source code, delayed a couple of months to avoid reselling fresh work): https://svn.l2servers.com.ar/!/#GX-EXT_INTERLUDE User: gx Pass: gx How to compile To compile the source you will need: Visual Studio 2005 (x64 toolset) (Classic L2Off toolchain – yes, it’s old, but that’s what the original server uses.) Use this as you want: learn, test, open your own server, or just audit the code. But please, stop buying the same leaked/resold files over and over when you can get them here for free, with source, and actually know what you’re running.  
    • @GX-Ext Please reupload the pack+web+client because all the links inside that post or in the https://l2servers.com.ar/ are dead
  • 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