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

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

 

 

  • 0
Posted

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

lol Yea you are right.

But how i can send xml files?

  • 0
Posted

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

  • 0
Posted

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 )

  • 0
Posted

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>

  • 0
Posted

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
  • 0
Posted

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?

  • 0
Posted

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

  • 0
Posted

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?

  • 0
Posted

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>

  • 0
Posted

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

  • 0
Posted

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

Guest
This topic is now closed to further replies.


×
×
  • Create New...