Jump to content
  • 0

RequestBypassToServer.java


Question

Posted

So 2 problems solved. now

 

The big Question

 

How i will make bypass read xml Files

i have .aioitem command

this .aioitem is like aio npc

when i press on shop everything goes good until i press on s80 weapons for example that sends me on XML file. When i press there nothing happens.

 

So how i will make that posible !!! ?

Recommended Posts

  • 0
Posted

The whole code on how to mak a bypass that will open open you a multisell :

 

### Eclipse Workspace Patch 1.0
#P L2J_Server 2 latest
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(revision 5537)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(working copy)
@@ -18,6 +18,7 @@
import java.util.logging.Level;

import com.l2jserver.Config;
+import com.l2jserver.gameserver.TradeController;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.communitybbs.CommunityBoard;
import com.l2jserver.gameserver.datatables.AdminTable;
@@ -27,6 +28,7 @@
import com.l2jserver.gameserver.handler.IBypassHandler;
import com.l2jserver.gameserver.model.L2CharPosition;
import com.l2jserver.gameserver.model.L2Object;
+import com.l2jserver.gameserver.model.L2TradeList;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance;
@@ -36,6 +38,7 @@
import com.l2jserver.gameserver.network.communityserver.CommunityServerThread;
import com.l2jserver.gameserver.network.communityserver.writepackets.RequestShowCommunityBoard;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
+import com.l2jserver.gameserver.network.serverpackets.BuyList;
import com.l2jserver.gameserver.network.serverpackets.ConfirmDlg;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.util.GMAudit;
@@ -51,6 +54,7 @@

	// S
	private String _command;
+	String[] subCommand = _command.split("_");

	@Override
	protected void readImpl()
@@ -265,6 +269,11 @@
					Hero.getInstance().showHeroDiary(activeChar, heroclass, heroid, heropage);
				}
			}
+			else if (_command.startsWith("shop"))
+			{
+				int val = Integer.valueOf(subCommand[1]);
+				showBuyWindow(activeChar, val);
+			}
			else
			{
				final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
@@ -321,4 +330,17 @@
	{
		return _C__23_REQUESTBYPASSTOSERVER;
	}
+	
+    private static void showBuyWindow(L2PcInstance player, int val)
+    {
+       player.tempInventoryDisable();
+       L2TradeList list = TradeController.getInstance().getBuyList(val);
+ 
+       if (list != null)
+       {
+          player.sendPacket(new BuyList(list, player.getAdena(), 0));
+       }
+ 
+       player.sendPacket(ActionFailed.STATIC_PACKET);
+    }
}

 

 

Be sure you added it right !

 

Also i did not ask you , what cronicle are you using ?

  • 0
Posted

The whole code on how to mak a bupass that will open open you a multisell :

 

### Eclipse Workspace Patch 1.0
#P L2J_Server 2 latest
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(revision 5537)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java	(working copy)
@@ -18,6 +18,7 @@
import java.util.logging.Level;

import com.l2jserver.Config;
+import com.l2jserver.gameserver.TradeController;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.communitybbs.CommunityBoard;
import com.l2jserver.gameserver.datatables.AdminTable;
@@ -27,6 +28,7 @@
import com.l2jserver.gameserver.handler.IBypassHandler;
import com.l2jserver.gameserver.model.L2CharPosition;
import com.l2jserver.gameserver.model.L2Object;
+import com.l2jserver.gameserver.model.L2TradeList;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance;
@@ -36,6 +38,7 @@
import com.l2jserver.gameserver.network.communityserver.CommunityServerThread;
import com.l2jserver.gameserver.network.communityserver.writepackets.RequestShowCommunityBoard;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
+import com.l2jserver.gameserver.network.serverpackets.BuyList;
import com.l2jserver.gameserver.network.serverpackets.ConfirmDlg;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.util.GMAudit;
@@ -51,6 +54,7 @@

	// S
	private String _command;
+	String[] subCommand = _command.split("_");

	@Override
	protected void readImpl()
@@ -265,6 +269,11 @@
					Hero.getInstance().showHeroDiary(activeChar, heroclass, heroid, heropage);
				}
			}
+			else if (_command.startsWith("shop"))
+			{
+				int val = Integer.valueOf(subCommand[1]);
+				showBuyWindow(activeChar, val);
+			}
			else
			{
				final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
@@ -321,4 +330,17 @@
	{
		return _C__23_REQUESTBYPASSTOSERVER;
	}
+	
+    private static void showBuyWindow(L2PcInstance player, int val)
+    {
+       player.tempInventoryDisable();
+       L2TradeList list = TradeController.getInstance().getBuyList(val);
+ 
+       if (list != null)
+       {
+          player.sendPacket(new BuyList(list, player.getAdena(), 0));
+       }
+ 
+       player.sendPacket(ActionFailed.STATIC_PACKET);
+    }
}

 

 

Be sure you added it right !

 

Also i did not ask you , what cronicle are you using ?

 

i will add the Code.

all Code its same like yours

 

 

Edit: When i press klik on shop button everything stucks

Gracia Epilogue

  • 0
Posted

Exception in thread "SelectorThread-216" java.lang.NullPointerException
        at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.
<init>(RequestBypassToServer.java:65)
        at com.l2jserver.gameserver.network.L2GamePacketHandler.handlePacket(L2G
amePacketHandler.java:205)
        at com.l2jserver.gameserver.network.L2GamePacketHandler.handlePacket(L2G
amePacketHandler.java:43)
        at org.mmocore.network.SelectorThread.parseClientPacket(SelectorThread.j
ava:419)
        at org.mmocore.network.SelectorThread.tryReadPacket(SelectorThread.java:
360)
        at org.mmocore.network.SelectorThread.readPacket(SelectorThread.java:294
)
        at org.mmocore.network.SelectorThread.run(SelectorThread.java:176)

 

gameserver errror

 

Player stucked.

its npe.

you'll need a null check.

Guest
This topic is now closed to further replies.


  • Posts

    • [New Server] L2Aquila — Gracia Final x9300 No Wipe | Custom Farming Zones Hi all, Rolling a fresh Gracia Final x9300 server — stable core, dedicated box, no wipe, no close, 24/7. WHAT TO EXPECT • 9300x EXP / 3000x SP / 5500x Adena / Safe +3 / Max +25 • Custom Shop + Custom Farming Zones • Free Starter Pack with 20 Custom Coins • Accounts auto-created on first login — no registration • Olympiads, TvT, CTF, offline trading, buff shop LINKS • Website & downloads: https://l2aquila.com/downloads/ • Forum: https://l2aquila.com/forum/ • Discord: https://discord.gg/5ZyBRvG4k • Gameplay tour: https://youtu.be/5QS8qpDG_wc • Install guide: https://youtu.be/F_BfBeiof-s Happy to answer any questions here. Feedback welcome!
    • [New Server] L2Aquila — Gracia Final x9300 No Wipe | Custom Farming Zones Hi all, Rolling a fresh Gracia Final x9300 server — stable core, dedicated box, no wipe, no close, 24/7. WHAT TO EXPECT • 9300x EXP / 3000x SP / 5500x Adena / Safe +3 / Max +25 • Custom Shop + Custom Farming Zones • Free Starter Pack with 20 Custom Coins • Accounts auto-created on first login — no registration • Olympiads, TvT, CTF, offline trading, buff shop LINKS • Website & downloads: https://l2aquila.com/downloads/ • Forum: https://l2aquila.com/forum/ • Discord: https://discord.gg/5ZyBRvG4k • Gameplay tour: https://youtu.be/5QS8qpDG_wc • Install guide: https://youtu.be/F_BfBeiof-s Happy to answer any questions here. Feedback welcome!
    • Hey everyone! A few of us are currently brainstorming and designing a new Lineage 2 private server. Our goal is to capture that classic L2 atmosphere we all fell in love with back in the day, but with a modern, refined feel. We’re aiming for a community-driven, dynamic server where good PvP, meaningful progression, clan life, and that nostalgic L2 vibe take center stage—a place where it just feels good to log in and play. Instead of deciding everything on our own behind closed doors, we want to build something the community actually wants to play on. We’ve put together a short survey to gather your thoughts: What did you love most about older/classic servers? What burnout factors or mechanics are you tired of? What systems or QoL (quality of life) features would you like to see? What red flags make you avoid a server entirely? It only takes a few minutes to fill out, and every single response helps us shape the vision for this project. We can't promise every single idea will be implemented, but we promise to read and consider all of your feedback.   https://docs.google.com/forms/d/e/1FAIpQLScKXptLs9ci_y8PfSmfy9dr2iSvZ9KI9dF3qDaKeFgg9RAaMQ/viewform?pli=1   Thanks a lot for your time and help in bringing this project to life! Let us know your thoughts in the comments as well.
    • Standard Google accounts added in login:password format; aged 7–14 days on average after registration; high quality, manually registered!
  • 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..