Jump to content
  • 0

[Help] Please ! help with script


Question

Posted

My friend preconfigured this unknow packet script, and it works, but have one problem with one packet, when gs drop this packet (only this):

 

Unknown Packet: d on State: IN_GAME Client: [Character: pow - Account: gadas000

- IP: 91.187.181.123]

0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

0010: 00 00

 

And i get 48-thread pool error...       

 

Server momentaly down. Other packets will working and protecting, with other packet 2 floods and you get dc...

Please say me how i can fix it, and what need to change in this script, or what need to add. ;(

 

 

My UnknowPacket protection script (witch preconfigured): --->

 

 

 

[table][tr][td]  private void printDebug(int opcode, ByteBuffer buf, GameClientState state, L2GameClient client)

  {

      int size = buf.remaining();

        _log.warning("Unknown Packet: "+Integer.toHexString(opcode)+" on State: "+state.name()+" Client: "+client.toString());

        byte[] array = new byte;

        buf.get(array);

        _log.warning(Util.printData(array, size));

        if (client.activeChar == null)

          return;

        if (!FloodProtector.getInstance().tryPerformAction(client.activeChar.getObjectId(), FloodProtector.PROTECTED_UNKNOWNPACKET))

        {

          client.activeChar.logout();

          return;

        }

  }

 

 

  private void printDebugDoubleOpcode(int opcode, int id2, ByteBuffer buf, GameClientState state, L2GameClient client)

  {

      int size = buf.remaining();

        _log.warning("Unknown Packet: "+Integer.toHexString(opcode)+":" + Integer.toHexString(id2)+" on State: "+state.name()+" Client: "+client.toString());

        byte[] array = new byte;

        buf.get(array);

        _log.warning(Util.printData(array, size));

        if (client.activeChar == null)

          return;

        if (!FloodProtector.getInstance().tryPerformAction(client.activeChar.getObjectId(), FloodProtector.PROTECTED_UNKNOWNPACKET))

        {

          client.activeChar.logout();

          return;

        }

  }

 

  // impl

  public L2GameClient create(MMOConnection<L2GameClient> con)

  {

      return new L2GameClient(con);

  }

 

  public void execute(ReceivablePacket<L2GameClient> rp)

  {

      try

      {

        if (rp.getClient().getState() == GameClientState.IN_GAME)

        {

            ThreadPoolManager.getInstance().executePacket(rp);

        }

        else

        {

            ThreadPoolManager.getInstance().executeIOPacket(rp);

        }

      }

      catch (RejectedExecutionException e)

      {

        // if the server is shutdown we ignore

        if (!ThreadPoolManager.getInstance().isShutdown())

        {

            _log.severe("Failed executing: "+rp.getClass().getSimpleName()+" for Client: "+rp.getClient().toString());

        }

      }

  }

}[/table]

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...