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

    • L2GOLD - Gold x45 C4 Project   C4 - Scions of Destiny: Protocol 656   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike -Buff shop system on selling buffs with command .buffshop Shift+click dropinfo on mobs. and many more ingame addons.   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/d0000rmt8ym0323/Lineage_2_C4_Client.rar/file   Game Patch: https://www.mediafire.com/file/39sojdex2mgj55k/L2Gold+Patch+C4.rar/file   GM Accounts: ID: root1 pass root1 [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/KSE4kdq   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 200 Euros )
    • Https://lineage2dex.com Discord link : https://discord.com/channels/786506979493281794/814778540893536307/1424434670690504874 ## Dexters! **Our x25 server is celebrating its first week!** 🔥 Online stays strong at peak levels!  New players are joining every day, with 200+ new master accounts registered daily — amazing results! ✨ Tomorrow we launch a new episode along with the first event. Full details will be shared in the morning(October 6). 🎁 And for this little celebration, here’s a bonus code with a small gift for you! ## O05-IIW **Contains: ** * x3 - Training Potion 200% (20 min) * x200 - Mana Potions Loyatly (no weight) *The code will remain active until October 6, 7 AM(server time). And be sure, you have at less 20 slots free on inv before using a code.* **👉 How to redeem:** 1. Log in to your Master Account on site. 2. Click the Redeem Bonus Code button at the top of the panel, type code click redeem. 3. Select the account and character you want to receive the gift.  **Codes work only 1 time for 1 Master Account!** ### Enjoy your adventure, Dexters!
    • Complete Server Pack + Source Files:     C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 70 EUR   C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 90 EUR Screenshots: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl   C6 Interlude: P746 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR The same as C4 but in C6 Client so the Screenshots is the same: https://imgur.com/a/eternal-sin-l2-athena-x45-c4-WYCpbjl     C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 50EUR Screenshots: https://imgur.com/a/9kB3oA9   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 100EUR Screenshots: https://imgur.com/a/Z2kZxuv   Contact me here via PM (only serious buyers). 
    • Where should I modify the IP to be able to put it online for testing?
    • I had issues with Smart Guard to, there is not even support in many cases.
  • 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