Jump to content
  • 0

Question

Posted

Hi Friends. I am learning a little how to edit jar files from the Core, i Need to modify the engine.jar to add some lines in donatemanager class for the classes changer but i got an error when i import the jar file to my proyecto,for example error in imports Like log4j.

Could you explain the Steps to modify and import this files to our project?.

3 answers to this question

Recommended Posts

  • 0
Posted

If you need change any class from JAR package then you need:

 

  • Decompile the target class;
  • Create new Java project in IDE as container of target class (project can includes only "dead code");
  • Normalize all fields and methods;
  • Restore all imports with external dependencies;
  • Compile as new project;
  • Replace new class from new JAR package to old.

For all you need any IDE (Eclipse, IntelliJ IDEA) and any Jva decompile (e.g. Java Decompiler)

  • Like 2
  • 0
Posted
11 hours ago, Rootware said:

If you need change any class from JAR package then you need:

 

  • Decompile the target class;
  • Create new Java project in IDE as container of target class (project can includes only "dead code");
  • Normalize all fields and methods;
  • Restore all imports with external dependencies;
  • Compile as new project;
  • Replace new class from new JAR package to old.

For all you need any IDE (Eclipse, IntelliJ IDEA) and any Jva decompile (e.g. Java Decompiler)

 

}

Thanks Root, i have exported source from engine.jar, i have created a Java Project with java 11 because Sunrise use that. then i copy the files to the project and imported a library of l24j. That error has been resolved, but tha source has an error because cant find de l2r.DatabaseFactory and L2PCInstance. i share the images.

If i export that source i think that it wouldnt work.

 

https://ibb.co/z28XxKg

https://ibb.co/TvZbYf8

  • 0
Posted

You need restore all dependencies. It means you need:

 

  • reproduce classes irerarchy and package location (e.g. if target class locates by path "l2j.net.sf.gameserver" you need create this package path in your new project and put there target class);
  • if target class calls some methods from classes from this package then you need create this classes as DUMMIES and reproduce them empty methods/fields for exclude logical errors while compilation. This names as "make a dead code";
  • compile result and take modified class for replacing.

That's all steps i meant by phrase "Restore all imports with external dependencies".

 

Sometimes recompilation the target class requeres a lot of time and new project can includes few hundreds "depended" classes. You must be ready for this.

  • Like 1

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

    • Added FloodProtector utility to prevent packet flooding for actions like item use and dice rolling. Integrated flood protection checks in relevant client packet handlers and registered/removal hooks in player lifecycle. Updated movement logic in L2PcInstance for improved position synchronization and geodata handling. Minor fixes and refactoring in attack logic, private store handling, and admin NPC editing. Refactored AI classes to enhance movement, attack, and skill usage logic for characters and mobs. Improved distance checks, attack range calculations, and skill casting conditions. Removed unused intention command logic from L2CharacterAI. Updated configuration to enable CellPathFinding. Minor code cleanups and bug fixes for more reliable AI behavior. Enhanced GeoPathFinding with detailed debug and error messages for region loading, including success/failure counts and file checks. Refactored L2AttackableAI and L2CharacterAI to improve attack range tolerance, immediate attack behavior, and added safety checks for missing targets. Updated configuration to disable CellPathFinding by default and added a new ShowRedName option for aggressive mobs. Minor config and log updates included. Applied TCP socket optimizations (e.g., TCP_NODELAY, buffer sizes, keepalive) in ClientThread, Connection, and SelectorThread to reduce latency and improve throughput. Enhanced L2AttackableAI with better random walk, aggro, and attack logic, including silent move checks, quest monster handling, and improved faction/raid/minion behavior. Added silent move support to L2PlayableInstance and quest monster flag to L2NpcTemplate/L2NpcInstance. These changes aim to improve server responsiveness, AI realism, and overall stability.
    • I’ve been using this Escape from Tarkov Hack for about a week now with no issues at all. ESP works great without any lag, and the aimbot is smooth and doesn't feel obvious. Had a quick setup with the loader, and support answered my questions right away. The HWID spoofer also did its job without messing with my system. So far, the cheat's staying undetected on my side.
    • Hello everyone, this is ADENA L2REBORN / LU4 / MASTERWORK We also have items, epics, etc. discord - adver745645 Our prices are reasonable, so have a nice shopping and a nice day.
  • 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