Jump to content

Recommended Posts

Posted (edited)

Works Sure of Intelude C6!

This script is used to modify the login and game server ports inside engine.dll without requiring any changes in l2.ini. The modification happens directly within the binary data of engine.dll, ensuring that the client connects to the new ports.

 

Python Script:

 

import os

#  New Ports
NEW_PORT_2106 = 8888  # Login Server 8888
NEW_PORT_7777 = 9999  # Game Server 9999

#  Μετατροπή σε HEX (Little Endian)
OLD_HEX_2106 = bytes.fromhex("3A 08")  # 2106
NEW_HEX_2106 = NEW_PORT_2106.to_bytes(2, "little")  

OLD_HEX_7777 = bytes.fromhex("61 1E")  # 7777
NEW_HEX_7777 = NEW_PORT_7777.to_bytes(2, "little")  

# DLL
with open("engine.dll", "rb") as f:
    dll_data = f.read()

# Replace
dll_data = dll_data.replace(OLD_HEX_2106, NEW_HEX_2106, 6)
dll_data = dll_data.replace(OLD_HEX_7777, NEW_HEX_7777, 8)

# Save New DLL
with open("engine.dll", "wb") as f:
    f.write(dll_data)

print(" New DDL save as 'engine_patched.dll'")
print(f"   - Login Server Port: {NEW_PORT_2106} (Your New Port)")
print(f"   - Game Server Port: {NEW_PORT_7777} (Your New Port)")
print(" Replace engine.dll with a new!")

What This Script Does

  1. Defines New Ports

    • Login Server: Changes the default port 2106 to 8888.
    • Game Server: Changes the default port 7777 to 9999.
    • You can change these values to any ports you want! 
  2. Converts Ports to HEX Format (Little Endian)

    • 21063A 08 (old) → Converted to 8888 (22 22 in HEX).
    • 777761 1E (old) → Converted to 9999 (0F 27 in HEX).
  3. Reads engine.dll

    • Opens engine.dll in binary mode and loads its content.
  4. Replaces Old Port Values with the New Ones

    • Finds hexadecimal values representing the old ports inside engine.dll and replaces them with the new ones.
    • Replaces 6 occurrences of 2106 and 8 occurrences of 7777.
  5. Saves the Modified DLL

    • Writes the updated data back into engine.dll, effectively patching it.
  6. Prints Confirmation Messages

    • Confirms that engine.dll has been patched successfully.
    • Displays the new port values.
       

No need to modify l2.ini since the changes are applied directly inside engine.dll.
Works automatically without requiring manual editing of the client files.
Ensures correct connection ports for the Lineage 2 client.
 

Run the script to patch engine.dll.

Replace the old engine.dll with the patched one in the Lineage 2 system folder.

Launch the client—it will now connect to the new ports (8888 for login and 9999 for game server).

Edited by lampros1996
  • lampros1996 changed the title to Modify the Loginserver and Gameserver ports! [Interlude c6]
  • 2 months later...
  • 3 months later...
Posted
On 6/3/2025 at 2:23 AM, gaminor said:

Hello.

Tried, but after that game crashes because of engine.dll. Can't even start the game.

This specific modification was tested on a clean L2 C6 client and works perfectly. On ‘modified’ engine.dll I don’t know if it will work — find a clean engine.dll that is Windows 10 ready for C6 and try again!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • LINEAGE2.SK Summer Season is Comming! GRAND OPENING - 14.08.2026 at 20:00 GMT+1  OBT - 07.08.2025 at 20:00 GMT+1   Website :https://lineage2.sk Discord : https://discord.gg/gj7AC5juGP       Server Features and Rates Xp – 20x Sp – 20x Adena – 10x Drop – 15x Spoil - 15x  Epic Raid Boss  - 1x Regular RB - 5x  Quest - 5x Fame - 2x Epaulette - 15x Manor - 15x     Special Features Somik Interface Limited AutoFarm Vote System Champions System Achievement System And more in information below     Enchant Settings  Safe Enchant: +3  Max Enchant: +16 Enchant Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%     NPC Buffer all buffs, songs, dances including 3rd prof + resists Buff Slots: 24 (+4) / 12 Buff Duration: 2 Hours     Epic Bosses & Respawns Queen Ant: 24 hours +/-8h Core: 3 days +/-8h Orfen: 2 days +/-8h Baium: 5 days +/-8h Beleth: 7 days +/-8h Antharas: 7 days +/-8h Valakas: 7 days +/-8h     Instances Zones Zaken: 6 players Normal Freya: 6 players Hard Freya: 12 Players Frintezza: 6 Players Tiat: 6 Players Beleth: 12 Players     GM Shop weapon/armor/jwl (max S grade) shots/spiritshots (max S grade) mana potions (1000 MP, 10s)      Global Gatekeeper all towns including cata/necro ToI Gracia Hellbound ...     Olympiad period 7 days (Monday) no class participants min 6 base class participants min 6 max enchant +6 Start points 20     Class Transfer for Adena     Subclass Quest Not required Max Subclass 3 Subclass Max LvL 85     Events Team vs Team Capture the Flag Death Match Last Hero Korean Style Treasure Hunt      Clans All new clans start with Clan LvL 5! Clan Skills/LvL for Clan Coins     Others  max 3 windows per HWID  BoM/MoM spawned in towns Auto-learn skills Autoloot Retail LvL of Epic Bosses Cancellation return buff system (30sec) Cancellation return buff -  not effect olympiad
    • LINEAGE2.SK Summer Season is Comming! GRAND OPENING - 14.08.2026 at 20:00 GMT+1  OBT - 07.08.2025 at 20:00 GMT+1   Website :https://lineage2.sk Discord : https://discord.gg/gj7AC5juGP       Server Features and Rates Xp – 20x Sp – 20x Adena – 10x Drop – 15x Spoil - 15x  Epic Raid Boss  - 1x Regular RB - 5x  Quest - 5x Fame - 2x Epaulette - 15x Manor - 15x     Special Features Somik Interface Limited AutoFarm Vote System Champions System Achievement System And more in information below     Enchant Settings  Safe Enchant: +3  Max Enchant: +16 Enchant Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%     NPC Buffer all buffs, songs, dances including 3rd prof + resists Buff Slots: 24 (+4) / 12 Buff Duration: 2 Hours     Epic Bosses & Respawns Queen Ant: 24 hours +/-8h Core: 3 days +/-8h Orfen: 2 days +/-8h Baium: 5 days +/-8h Beleth: 7 days +/-8h Antharas: 7 days +/-8h Valakas: 7 days +/-8h     Instances Zones Zaken: 6 players Normal Freya: 6 players Hard Freya: 12 Players Frintezza: 6 Players Tiat: 6 Players Beleth: 12 Players     GM Shop weapon/armor/jwl (max S grade) shots/spiritshots (max S grade) mana potions (1000 MP, 10s)      Global Gatekeeper all towns including cata/necro ToI Gracia Hellbound ...     Olympiad period 7 days (Monday) no class participants min 6 base class participants min 6 max enchant +6 Start points 20     Class Transfer for Adena     Subclass Quest Not required Max Subclass 3 Subclass Max LvL 85     Events Team vs Team Capture the Flag Death Match Last Hero Korean Style Treasure Hunt      Clans All new clans start with Clan LvL 5! Clan Skills/LvL for Clan Coins     Others  max 3 windows per HWID  BoM/MoM spawned in towns Auto-learn skills Autoloot Retail LvL of Epic Bosses Cancellation return buff system (30sec) Cancellation return buff -  not effect olympiad
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..