Jump to content

Recommended Posts

Posted

Hello Mxc forum,

 

In my attempt to correct l2jattackers and other packet flooding sh***s i tried to rework the mmocore, i didn't find the way so i made a code for packethandler debug,

Anyway here we are:

 

 

Index: java/config/server.properties

===================================================================

--- java/config/server.properties (revision 3695)

+++ java/config/server.properties (working copy)

@@ -64,6 +64,8 @@

# Define how many players are allowed to play simultaneously on your server.

MaximumOnlineUsers=100

 

+# Packet Handler Debug

+PacketHandlerDebug = False

 

# Minimum and maximum protocol revision that server allow to connect.

# You must keep MinProtocolRevision <= MaxProtocolRevision.

Index: java/net/sf/l2j/Config.java

===================================================================

--- java/net/sf/l2j/Config.java (revision 3695)

+++ java/net/sf/l2j/Config.java (working copy)

@@ -728,7 +728,8 @@

    public static int        SELECTED_NODE_ID;

    public static int        LINKED_NODE_ID;

    public static String     NEW_NODE_TYPE;

-

+    public static boolean PACKET_HANDLER_DEBUG;

+    

    /** Show "data/html/servnews.htm" whenever a character enters world.*/

    public static boolean SERVER_NEWS;

    /** Show L2Monster level and aggro ? */

@@ -1185,7 +1186,7 @@

 

                EXTERNAL_HOSTNAME       = serverSettings.getProperty("ExternalHostname", "*");

                INTERNAL_HOSTNAME       = serverSettings.getProperty("InternalHostname", "*");

-

+                PACKET_HANDLER_DEBUG = Boolean.parseBoolean(serverSettings.getProperty("PacketHandlerDebug", "False"));

                GAME_SERVER_LOGIN_PORT  = Integer.parseInt(serverSettings.getProperty("LoginPort","9014"));

                GAME_SERVER_LOGIN_HOST  = serverSettings.getProperty("LoginHost","127.0.0.1");

 

Index: java/net/sf/l2j/gameserver/clientpackets/L2GameClientPacket.java

===================================================================

--- java/net/sf/l2j/gameserver/clientpackets/L2GameClientPacket.java (revision 3695)

+++ java/net/sf/l2j/gameserver/clientpackets/L2GameClientPacket.java (working copy)

@@ -46,6 +46,9 @@

}

catch (Throwable t)

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return;

+

_log.severe("Client: "+getClient().toString()+" - Failed reading: "+getType()+" - L2J Server Version: "+Config.SERVER_VERSION+" - DP Revision: "+Config.DATAPACK_VERSION);

t.printStackTrace();

}

@@ -90,6 +93,9 @@

}

catch (Throwable t)

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return false;

+

_log.severe("Client: "+getClient().toString()+" - Failed running: "+getType()+" - L2J Server Version: "+Config.SERVER_VERSION+" - DP Revision: "+Config.DATAPACK_VERSION);

t.printStackTrace();

}

Index: java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java

===================================================================

--- java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java (revision 3695)

+++ java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java (working copy)

@@ -813,6 +813,9 @@

 

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

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return false;

+

int size = buf.remaining();

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

      byte[] array = new byte;

@@ -822,6 +825,9 @@

 

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

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return false;

+

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;

Index: java/net/sf/l2j/gameserver/serverpackets/L2GameServerPacket.java

===================================================================

--- java/net/sf/l2j/gameserver/serverpackets/L2GameServerPacket.java (revision 3695)

+++ java/net/sf/l2j/gameserver/serverpackets/L2GameServerPacket.java (working copy)

@@ -44,6 +44,9 @@

}

catch (Throwable t)

{

+ if (Config.PACKET_HANDLER_DEBUG)

+ return false;

+

_log.severe("Client: "+getClient().toString()+" - Failed writing: "+getType()+" - L2J Server Version: "+Config.SERVER_VERSION+" - DP Revision: "+Config.DATAPACK_VERSION);

t.printStackTrace();

}

Index: java/net/sf/l2j/loginserver/L2LoginPacketHandler.java

===================================================================

--- java/net/sf/l2j/loginserver/L2LoginPacketHandler.java (revision 3695)

+++ java/net/sf/l2j/loginserver/L2LoginPacketHandler.java (working copy)

@@ -19,6 +19,7 @@

 

import java.nio.ByteBuffer;

 

+import net.sf.l2j.Config;

import net.sf.l2j.loginserver.L2LoginClient.LoginClientState;

import net.sf.l2j.loginserver.clientpackets.AuthGameGuard;

import net.sf.l2j.loginserver.clientpackets.RequestAuthLogin;

@@ -87,6 +88,9 @@

 

private void debugOpcode(int opcode, LoginClientState state)

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return false;

+

System.out.println("Unknown Opcode: "+opcode+" for state: "+state.name());

}

}

Index: java/net/sf/l2j/loginserver/clientpackets/L2LoginClientPacket.java

===================================================================

--- java/net/sf/l2j/loginserver/clientpackets/L2LoginClientPacket.java (revision 3695)

+++ java/net/sf/l2j/loginserver/clientpackets/L2LoginClientPacket.java (working copy)

@@ -19,6 +19,7 @@

 

import java.util.logging.Logger;

 

+import net.sf.l2j.Config;

import net.sf.l2j.loginserver.L2LoginClient;

 

import com.l2jserver.mmocore.network.ReceivablePacket;

@@ -43,6 +44,8 @@

}

catch (Exception e)

{

+ if (!Config.PACKET_HANDLER_DEBUG)

+ return;

_log.severe("ERROR READING: "+this.getClass().getSimpleName());

e.printStackTrace();

return false;

 

Credits: me,

 

Hope you enjoy this.

  • 4 weeks later...
Posted

are u kidding me? DS commited that on l2js timeline 1 year ago >.> at least when u copy someone change ur variable name >.>

Also what u did is a boolean check, which is not such a big deal to acct so lame and point out credits xD

Posted

are u kidding me? DS commited that on l2js timeline 1 year ago >.> at least when u copy someone change ur variable name >.>

Also what u did is a boolean check, which is not such a big deal to acct so lame and point out credits xD

 

I knew it :P!!! Already fixed :)!

Posted

you must be VIP or Donator member to see it

 

lol, just lol. I wonder how long this forum will exist with this kind of attitude.

 

And especially for a simple copied fix I guess.

Posted

[Hidden post: This post has been hidden by a moderator.]

 

For his government which appears here in this house is!

 

So do not question me saw Scuttle

  • 4 weeks later...
Posted

That is fixet thill  in all interlude server so that dont work sry cuz i say it but you dont deserve Karma FOr 1thing what dont work!!

 

Karma Fixet!

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
Reply to this topic...

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



  • Posts

    • If you're using a public database and there's nothing you haven't done there, then of course there's nothing that won't work there. And if the base is normal, work is being done on it, then everything is working fine.
    • the race system works for lucera classic?
    • Hello. Tried, but after that game crashes because of engine.dll. Can't even start the game.
    • Good evening, gentlemen. After many requests and after seeing half a dozen people using the project name with buggy acis sources that make no sense, I decided to bring some content that is truly worthy of carrying the name of our project L2JDREAM. I come through this topic to share the source code of our old L2JDream 2.0 revision This project was active from December/2012 to December/2019, being discontinued in 2019 as we now use alucera based source-code in L2JDream V3.0   That said, there is also the content of our VIP customer review, already embedded in this source, fully functional, and FREE.. WITH THE ONLY EXCEPTION OF ANTIBOT PROTECTION, which requires a valid license to work, THAT IS, a 100% free project with open source, but my protection will only work for customers who had a project license. I found this to be a fair way for customers of the private project.       The VIP revision has all the features of the free revision , plus other exclusive features. Check out more complete information about it below. Project Information: BASE: A High Five project was downgraded to Interlude. Features: Quests - All Interlude Quests working according to [L2OFF]. Raid & Grand Bosses - Working perfectly with their proper videos according to [L2OFF]. Olympiads - Fully functional according to [L2OFF]. Sieges - Fully functional and with all Castle functions according to [L2OFF]. Fortress Sieges - Working perfectly with all its functions according to [L2OFF]. Siege Hall - All working perfectly according to [L2OFF]. Lottery - Working perfectly according to [L2OFF]. Fishing - Working perfectly according to [L2OFF]. Skills - All skills in the revision are balanced for standard servers with all working perfectly according to [L2OFF]. Gameplay - All game components have been tested by several servers, both for low rate and high rate servers. Events: Death Match: Classic deathmatch between registered players. Capture The Flag: Event where teams must steal the enemy flag to score points. Team Vs Team: PvP combat event between two teams, where each enemy killed scores 1 point for your team. TvT, CTF and DM: Instanced events with configurable automatic start. Standard Mods from L2JDream FREE revision : Complete Offline Trade/Craft. NPC Crest recreated to consume less memory and run lighter with cleaner and more efficient codes. PvP/PK Color System. Voiced Commands (.menu, .help, .offline, .classmaster) Among others... Exclusive Mods - These were included in the VIP revision (all configurable to enable/disable/etc): AIO System (AIO Seller included) VIP System Buffer Vip AIO, VIP and Noblesse item Siege Date Archievement Engine BuffShop System Npc Ranking  Protected Password WareHouse Npc Raid Info  Permanent Nobless, meaning the player does not lose buffs when dying. Automatic Nobless when killing Barakiel. Register Siege Advanced Pvp & Pk Announce System PvP & Pk Reward System Chaotic Zones RaidBoss Defeated Message Announcement Respawn Boss Donator Enchant Scroll (Unique Enchant Scroll for all Grades with configurable chance...) PrivateStore Sell/Buy by Item (changes the currency of the character shops) Equipment Restriction Disable Weapons For Classes System Custom Cancellation War Legend System Quake System Dressme Arena Duel 1x1 (With Arena Ranking) *** THIS MOD HAS BEEN REFORMULATED *** Spartan Guard 3.0 - L2JDream Protection System (only works with a valid license) System locked in gameserver. Protects against L2Adrenaline, L2Net, L2phx, L2Tower, L2Walker and others. It is not possible to log into your server without the system. You must have an active license for the server and system to work. NOTE: If you test a bot and are able to use it, just contact me sending the program that it will be blocked and you will receive the fix to implement in your system.   I would like to take this moment and thank to @Bian @LucasDante @karlos @apollo @Denky @Wolgan @Nattan Felipe and the entire team that helped create and maintain the L2JDream V2 project.   You can find the full source on My GitHub  https://github.com/Wallz/L2jDreamV2_Source/ Fork and collaborate with the crowd   
  • Topics

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