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

 

 

 

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

}

}

}

}

 

 

:'( :'( :'(

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



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