Jump to content

Recommended Posts

Posted

first you need some program to work with java.

you need:

 

java jdk: http://java.sun.com/javase/downloads/index.jsp

eclipse: http://www.maxcheaters.com/forum/index.php?topic=22102.0 (Guide how to install it and set it up)

maven: http://maven.apache.org/download.html

 

install them.(for easier use copy maven to c:/maven folder)

 

When you finish open the eclipse and start to work:)

Its really simple server maker teams have their own SVN repository thats the url where you download their DP.

Go to window->show window->others...->SVN->SVN repository now a window appear in eclipse.

right click in the window go to new->repository location

in the popup window you need to enter the svn link.The SVN links are:

 

l2jfree: svn://www.l2jfree.com/repo/l2j-free

L2j: http://www.l2jserver.com/svn/ (core svn) http://www.l2jdp.com/svn/ (DP svn)

L2emu: http://svn.assembla.com/svn/L2Emu/

 

I use l2jfree server pack so the guide based on l2jfree!

Now when you press ok you see the server pack in the SVN window.

The newest pack is in the trunk folder.We want the core and datapack right click on it and checkout.

Now its downloaded you see the downloaded pack in the package explorer window.

 

ABOUT COMPILING

Datapack:Really simple right click on Build.xml->Run as->1 Ant build.

Core:l2jfree use maven so you need to compile it with maven.(Other pack use Build.xml to core too)

Compile l2jfree core:

before you compile you need to do 2 things.

1st open control panel->system->special->variables

You need to add new system variable for java jdk.Add these lines to user and system variables.

Variable name:JAVA_HOME

Varible path:C:\Program Files\Java\jdk1.6.0_11

Now restart your PC.

Open maven\bin\mvn.bat with notepad go to line 157 and write this:

old one:%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR%

new one:%MAVEN_JAVA_EXE% %MAVEN_OPTS% "-Xmx1024m" -classpath %CLASSWORLDS_JAR%

Now compile the core:

open a command line(start->run->cmd)

go to your core folder(for example the core is c:\workspace\l2jfree-core)

type cd C:\

type cd workspace

type cd l2jfree-core

Now you need to compile:

type C:\maven\bin\mvn clean:clean

thats delete the excisting compile(Target folder)if you have.

type C:\maven\bin\mvn assembly:assembly -Dmaven.test.skip=true

thats build your core and place it to l2jfree-core\target folder.

HOW TO MAKE JAVA MODIFICATIONS:

VOICED COMMAND:

You have the voiced commands in the com.l2jfree.gameserver.handler.voicedcommand folder

Voiced commands ingame starts with . for example .info

Insert the Info.java for example to voiced commands folder thats the first step.

After that you need to register it.

Open voicedcommandhandler.java

Search for the private VoiceCommandHandler() section there you can register your command

To register the .info command for example type this under the last registered command.

registerVoicedCommandHandler(new info());

Compile your core and you are done.

ITEM HANDLERS:

You have the item handlers in the com.l2jfree.gameserver.handler.itemhandler folder

The itemhandlers ingame works like for example you click on it and it summon your pet.

Same like the voiced commands just insert the java file into the itemhandler folder.

Registering in itemhandler.java

Go to private ItemHandler() section

and register your command under the last command like

registerItemHandler(new example());

Compile your core and you are done.

 

REGISTER NEW SQL COLUMN IN A TABLE AT JAVA:

open the L2PCinstance.java (com.l2jfree.gameserver.model.actor.instance)

to register it you need 2 easy step.

1st you see SQL string definitions named with the name of sql table.

For example look at // Character Character SQL String Definitions:

Lets an example you have a patch for vitality system but you need to register a new column at character table.

You see update and restore you need to insert your colums name into these two line like this:

trust_level=? WHERE charId=?"; thats the end of the update line if you want to insert a new one(example vitality)write this.

trust_level=?, vitality=? WHERE charId=?";

Now look at the restore line

trust_level FROM characters WHERE charId=?"; thats the end of the line to insert vitality column write this.

trust_level,vitality FROM characters WHERE charId=?";

Now thats ok you need to set a statement.

Search for the private void storeCharBase() section at L2PCinstance

you find statement's here go to statement.setInt(52, getObjectId());

Thats the end of it its gat the characters objectid(at which character the tables effect applyes)

Now insert vitality here.Insert above statement.setInt(52, getObjectId()); this:

statement.setInt(52, getvitality()); and rename the statement.setInt(52, getObjectId()); to statement.setInt(53, getObjectId());

compile your core and your done.

 

HOW TO MAKE CONFIG OPTIONS:

You can make config options for everything what you want i show you a simple.

You want to create config Option for a voiced command.

Go to voicedcommandhandler.java where you register the command.

Use this syntax for registering with config option:

		if (Config.ALLOW_EXAMPLE)
	{
		registerVoicedCommandHandler(new yourcommand());

	}

Thats the first step now open the Config.java (com.l2jfree)

You want to register it for example at other.properties.

Search for other.properties the section is ending with this line:

// *******************************************************************************************

// *******************************************************************************************

Above that search for the latest option press enter at the and of the line now you have a new line

For a false/true config you need to use public static boolean so to register the example use this:

public static boolean ALLOW_EXAMPLE;

Now search for public static void loadOtherConfig() (thats load the configuration of the other.properties)

Search for catch (Exception e) above that you see config options in other syntax.

Search for the latest option and press enter.In the new line register the config like this:

ALLOW_EXAMPLE = Integer.parseBoolean(otherSettings.getProperty("Example.properties", "default value false or true"));

Now thats ok lets write the config.

Open the properties file(Other in my example)

go to the end of it and press enter.

Example = false or true

If you want to write about the config option make it like this

# -----------

# Allow example

# -----------

Example = false or true

 

HOW TO CREATE/APPLY DIFF PATCH:

apply diff patch:

right click on the core->team->apply patch than select your destination.

if you get error for a diff dont apply it open it with notepad and with search function add it to the right place.

make diff patch:

right click on the edited file->team->create patch here you can choose copy to clipboard and then paste or save it to a file.

 

Credits to ALEX2008GR for the eclipse guide!And for me to that guide!

 

[move]When i have time i try to keep it updated whit other java basics :)[/move]

Posted

Br0 this is awesome ... ;D i love you  :P also i'm w8ting for the photo :)

 

Keep up m8 !!!!

 

Edit:It will be added at my collection  :)

Posted

updated create and apply diff patches.

 

nice Guide..

 

+1 for that...

 

keep sharing ;)

 

Thanks for karma:)

 

Br0 this is awesome ... ;D i love you  :P also i'm w8ting for the photo :)

 

Keep up m8 !!!!

 

Edit:It will be added at my collection  :)

 

As i said on msn my vista has its own life when he dont want photos i dont make photos:D

Posted

lol 1st time from july (when i register)i see this post...

interpid It's very helpfull omG!

I try to do my best:)

Also i have some very good project i'm working on i think if its ready i share it(like automated 1v1 event engine and others)

Posted

I try to do my best:)

Also i have some very good project i'm working on i think if its ready i share it(like automated 1v1 event engine and others)

hmmm...

at school my pc proffesor say me that many codes of java

want open/close what i mean?

e.g. at html u cant make two path about left/right align

you must open

<div align="left">text

and then close

</div>

and the the right align

the java has this?

and if it easy give via pm your msn :P

Posted

In java it's { }

 

public void NameOfMethidHere()
{
      Code goes here
}

and if u make it at code? like

{ code goes here }

any difference?

Posted

No difference, it's about what you like, but it's easier the way I do it, especially if you have more lines within the { }

i know that..

at html all code i make to another line from text...

it's easily to understand when is the error if u have...

anyway thnx!

 

dont tell me nQQb :D

i'm at first steps with java :D

and if u want to know my age?

you laugh :P

i'm 14 years old...

4 feb i'll become 15

 

  • 2 weeks later...

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

    • You should buy it then I’ll make a discount  
    • Hi everyone,   In 2014, I completely stepped away from developing L2 servers and doing L2J-related work. Since then, I’ve only opened this server about once a year and helped a few servers and individuals for free. I haven’t taken on any paid L2J work since then.   LINEAGE2.GOLD is a project that has reached about Season 6. The first season launched at the end of 2020 and was a fully rebuilt Gold-style server on the Classic client (protocol 110). It featured many custom systems and enhancements. After several seasons, I decided to abandon the Mobius-based project and move to Lucera, as my goal was to get as close as possible to Interlude PTS behavior while still staying on the L2J platform.   The current project was once again completely rebuilt, this time on the Essence client (protocol 306), and is based on Lucera. Because of that, acquiring a license from Deazer is required.   My Lucera extender includes, but is not limited to: Formulas.java Basic anti-bot detection, which proved quite effective, we caught most Adrenaline users using relatively simple server-side logic, logged them, and took staff action. Simple admin account lookup commands based on IP, HWID, and similar identifiers. In-game Captcha via https://lineage2.gold/code, protected by Cloudflare, including admin commands for blacklisting based on aggression levels and whitelisting. Additional admin tools such as Auto-Play status checks, Enchanted Hero Weapon live sync, force add/remove clans from castle sieges, item listeners for live item monitoring, and more. A fully rewritten Auto-Play system with support for ExAutoPlaySetting, while still using the Auto-Play UI wheel, featuring: Debuff Efficiency Party Leader Assist Respectful Hunting Healer AI Target Mode Range Mode Summoner buff support Dwarf mechanics Reworked EffectDispelEffects to restore buffs after Cancellation. Raid Bomb item support. Reworked CronZoneSwitcher. Prime Time Raid Respawn Service. Community Board features such as Top rankings and RB/Epic status. Custom systems for Noblesse, Subclasses, support-class rewards, and much more.   Depending on the deal, the project can include: The lineage2.gold domain The website built on the Laravel PHP framework The server’s Discord Client Interface source Server files and extender source The server database (excluding private data such as emails and passwords)   I’m primarily looking for a serious team to continue the project, as it would be a shame to see this work abandoned. This is not cheap. You can DM me with offers. If you’re wondering why I’m doing this: I’ve felt a clear lack of appreciation from the L2 community, and I’m not interested in doing charity work for people who don’t deserve it. I’m simply not someone who tolerates BS. Server Info: https://lineage2.gold/info Server for test: https://lineage2.gold/download Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113
  • 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..

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