Jump to content
  • 0

RequestBypassToServer.java


SkySkase

Question

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 !!! ?

Link to comment
Share on other sites

Recommended Posts

  • 0

I completely don't know if can you send a .xml with the method used to send .html, could be that?

 

Option 1.Change the .xml for a .html and test

Option 2.Give us more info... "context" of the code...

Option 3.Add "print" debug messages to know where the code is stucking

 

 

Link to comment
Share on other sites

  • 0

I completely don't know if can you send a .xml with the method used to send .html, could be that?

ofc no

 

there should be already a ByPass about that

Link to comment
Share on other sites

  • 0

I completely don't know if can you send a .xml with the method used to send .html, could be that?

 

Option 1.Change the .xml for a .html and test

Option 2.Give us more info... "context" of the code...

Option 3.Add "print" debug messages to know where the code is stucking

i tryed Option 1 = dont work

Option 2 = i am not sure what you mean. So i mad one . aio command and i did it like aio npc and i press .aio and i have the menu gk,gmshop,etc,etc, i pres gm-shop, after weapons, after if i press s80 weapon dont do anything (  its the xml files )

option 3 i dont know how ( its my first work on l2java code )

Link to comment
Share on other sites

  • 0

ofc no

 

there should be already a ByPass about that

can you mabe explane me how?

make a html.in that html make a button with dat multisell..:D

i already have that if you meen this

 

955.html

i have inside

<td align=center><button value="Cloacs" action="bypass -h aio_Cloacs" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

Link to comment
Share on other sites

  • 0

make the button like this

 

<td align=center><button value="Cloacs" action="bypass -h npc_%objectId%_multisell 90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

test and reply
Link to comment
Share on other sites

  • 0

make the button like thistest and reply

<td align=center><button value="Cloacs" action="bypass -h npc_%objectId%_multisell 90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

 

Dont work :(

 

 

 

i must delete this ? or change it?

 

				    else if (_command.startsWith("aio_Cloacs"))
			     {
			    	 if (Config.ENABLE_Aio_Cloacs)
			    	 {
			    		 String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/multisell/90041.htm");
					     if (htmContent != null)
					      {
					     NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
					     infoHtml.setHtml(htmContent);
					     activeChar.sendPacket(infoHtml);

 

Edit: i changed that bypass -h npc_%objectId%_multisell 90041 and steal dont work

Edit: Changed the

 wrong c/p
But steal dont work :/ any new Idea?

Link to comment
Share on other sites

  • 0

<td align=center><button value="Cloacs" action="bypass -h npc_%objectId%_multisell 90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

 

Dont work :(

 

 

 

i must delete this ? or change it?

 

				    else if (_command.startsWith("aio_Cloacs"))
			     {
			    	 if (Config.ENABLE_Aio_Cloacs)
			    	 {
			    		 String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/multisell/90041.htm");
					     if (htmContent != null)
					      {
					     NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
					     infoHtml.setHtml(htmContent);
					     activeChar.sendPacket(infoHtml);

 

Edit: i changed that bypass -h npc_%objectId%_multisell 90041 and steal dont work

Edit: Changed the

 wrong c/p
But steal dont work :/ any new Idea?

first of all , there is no reason to make a new ByPass for every button that goes you to a multisell ,

 

check this :

 


+		else if (command.startsWith("shop"))
+		{
+			int val = Integer.valueOf(subCommand[1]);
+			showBuyWindow(player, val);
+		}

+	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);
+	}

 

Vazodas auto to code 8a mporeis na xrisimopieis to

 

 

<td align=center><button value="Cloacs" action="bypass -h shop_90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

Link to comment
Share on other sites

  • 0

first of all , there is no reason to make a new ByPass for every button that goes you to a multisell ,

 

check this :

 


+		else if (command.startsWith("shop"))
+		{
+			int val = Integer.valueOf(subCommand[1]);
+			showBuyWindow(player, val);
+		}

+	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);
+	}

 

Vazodas auto to code 8a mporeis na xrisimopieis to

 

 

<td align=center><button value="Cloacs" action="bypass -h shop 90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

opote na ta kanw ola delete? kai na valw mono afto?

Link to comment
Share on other sites

  • 0

opote na ta kanw ola delete? kai na valw mono afto?

just delete the "aio_Cloacs" bypass and add what i gave you !

 

also Dont forget to add the Void at the end of RequestByPassToServer.java file !

 

Then use as action for your button smth like this

 

<td align=center><button value="Cloacs" action="bypass -h shop_90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

Link to comment
Share on other sites

  • 0

just delete the "aio_Cloacs" bypass and add what i gave you !

 

also Dont forget to add the Void at the end of RequestByPassToServer.java file !

 

Then use as action for your button smth like this

 

<td align=center><button value="Cloacs" action="bypass -h shop 90041" width=85 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

i have 2 small errors that i cant solve

 

else if (_command.startsWith("shop"))

    {

    int val = Integer.valueOf(subCommand[1]);

    showBuyWindow(activeChar, val);

    }

    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);

    }

 

also "also Dont forget to add the Void at the end of RequestByPassToServer.java file !" = ? its my 1st code i an nothing more than Newbie

Link to comment
Share on other sites

  • 0

i forgot

 

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

 

also add the Void at the end of the file , not here !

Link to comment
Share on other sites

  • 0

i have 2 small errors that i cant solve

 

also "also Dont forget to add the Void at the end of RequestByPassToServer.java file !" = ? its my 1st code i an nothing more than Newbie

clientpackets.requestbypasstoserver.java
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • 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