We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

[Guide] So you want a L2J Server

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
canislupus
Posts: 63
Joined: Tue Dec 24, 2013 1:30 am

[Guide] So you want a L2J Server

Post by canislupus » Sun Nov 23, 2014 12:24 am

This basic guide is meant for testing, and NOT for a Live server.


Briefing


Every L2J server you have played on has 2 main things.

L2J_SERVER files and L2J_DATAPACK files.

L2J_SERVER would be the mechanical part of your server. This part loads the datapack and allows connections.

L2J_DATAPACK would be the content part of your server. This part defines all aspects of the emulation.

A good analogy,
L2J_DATAPACK are the books in a library.
L2J_SERVER is the librarian who handles the books.



Software list



1.-Java



2.-Eclipse



3.-Xampp

NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.



4.-Heidi SQL
If you want any other client like Navicat, you can do so.


Repository Files


The Repository system allows easy simultaneous modification of the files from the developers.

More information about git

The current repository location is in: https://github.com/L2J

The Git system has something called "Branches". And the purpose is to separate different code versions.
Just to name a few there are C4, Gracia, Freya, Hi5 branches.
If you want to set up a Freya server, then you would have to get the Freya branch.
In this example i will be using the Hi5 Stable branch.



So you want a L2J Server?


-> Start Eclipse
-> Select a Workspace, it can be anywhere.
-> Go to Window
-> Show View
-> Project Explorer


Cloning Datapack


-> Copy this : https://github.com/L2J/L2J_DataPack.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select the Branch you want
-> Finish


Cloning Serverpack


- >Copy this : https://github.com/L2J/L2J_Server.git
-> Inside the Project Explorer Window Right-Click
-> Import
-> Git
-> Projects From Git
-> Next
-> Clone URI
-> Paste inside URI
-> Next
-> Select Desired Branch
-> Finish

Compiling Datapack


-> Inside Project Explorer
-> Expand L2J_Datapack
-> Right-Click Build.xml
-> Run As
-> Ant Build


Compiling Serverpack


-> Inside Project Explorer
-> Expand L2J_Server
-> Right-Click Build.xml
-> Run As
-> Ant Build


Setting Up Files


-> Navigate to your L2J_DATAPACK file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into a new folder you can call it how you want.

-> Navigate to your L2J_SERVER file
-> Look for the build folder
-> Inside the build folder extract the compressed file
-> Copy all the content into the folder you created. It will ask to overwrite. This is normal, press yes.



Installing Database



-> Run Xampp Control Panel
-> Press Start in MySQL
-> Run HeidiSQL
-> Log into your local Mysql Server
-> Create Databases: l2jls , l2jgs and l2jcs (use utf8-general_ci encoding)
-> Browse to yourserverfolder/tools
-> Run Dbinst_cs.jar (Community Server)
-> Fill in with your Mysql information.
-> Select Full Install
-> Repeat the process for Dbinst_ls.jar (Login Server) and Dbinst_gs.jar (Game Server), thanks to Unafraid

NOTE: If you have set a root mysql password then write it down. You will have to put it into the LoginServer and GameServer configuration file, so that they can access to the MySql database.


Optional: If you have set a root password for your MySql server then follow these steps:

-> Open yourserverfolder\login\L2J_Configurator.jar
-> Under LoginServer tab find "Password"
-> Type your MySql root password
-> Save and Close

-> Open yourserverfolder\game\L2J_Configurator.jar
-> Under Server tab find "Password"
-> Type your MySql root password
-> Save and Close

Starting the Server

-> Run yourserverfolder\game\StartGameServer ------------------ A Command Prompt Window will open, let it load

-> Run yourserverfolder\login\StartLoginServer ------------------ A Command Prompt Window will open, let it load


Logging in


Now that we have got our server up and running, its time to test it.

To play in the server, from the same pc, you need to edit your hosts file.
Located inside C:\Windows\System32\drivers\etc
Copy the file in your desktop, edit it with notepad adding these lines:

[pastebin]2pL4AN8K[/pastebin]


Save the file, copy from desktop and paste inside the C:\Windows\System32\drivers\etc directory.

I suggest you do it this way because sometimes windows will not allow you to edit and save the files when they are inside the operating system directory. E.g windows/system32/xxxx

Once you have saved the file. Start your Lineage 2 Client and test. (Accounts are auto create by default)


Do not edit the Lineage 2 Client because it is illegal


I hope you enjoyed the guide, if you are a seasoned L2J Developer and found any error or have a suggestion, submit a comment.
Happy testing!

UPDATE 29/12/14 ----> Changed DatabaseInstaller.bat/sh method to Dbinst_(ls,gs,cs) method.
Last edited by canislupus on Tue Dec 30, 2014 5:14 am, edited 8 times in total.
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721

User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: So you want a L2J Server

Post by St3eT » Sun Nov 23, 2014 12:32 am

Awesome, good job!

Sequentiality
Posts: 2
Joined: Wed Aug 13, 2014 7:28 pm

Re: So you want a L2J Server

Post by Sequentiality » Wed Nov 26, 2014 10:28 pm

Thanks for guide. Can't find when wiki will be avaliable?

Chickenmelon
Posts: 1
Joined: Mon Dec 01, 2014 9:06 pm

Re: So you want a L2J Server

Post by Chickenmelon » Wed Dec 03, 2014 5:57 pm

Edit: Nevermind, I downloaded modified system folder of lineage high five and it works now :D
Now, I need to figure out how to invite my friends to play with me...

User avatar
canislupus
Posts: 63
Joined: Tue Dec 24, 2013 1:30 am

Re: So you want a L2J Server

Post by canislupus » Fri Dec 12, 2014 6:01 am

Thank you, will modify it tomorrow.
St3eT wrote:Awesome, good job!
I guess pretty soon viewtopic.php?f=81&t=30493&p=182898&hilit=wiki#p182898
Sequentiality wrote:Thanks for guide. Can't find when wiki will be avaliable?
Updated to eclipse guide.
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721

Ardirion
Posts: 5
Joined: Wed Sep 28, 2011 12:10 am

Re: [Guide] So you want an L2J Server

Post by Ardirion » Sun Dec 28, 2014 5:50 pm

This guide is very useful with the wikis gone and many of the guides elsewhere on the web being dodgy at best.

I have some questions:

Other guides say to copy the L2J_DataPack files into the folder that has the L2J_Server files. This guide says to copy the server files over the DataPack files. Does it make a difference?

Is it no longer necessary to run the login/RegisterGameServer.bat (or .sh) file and copy the resulting hexid.txt file into the game/config folder?

You say this is not a suitable guide for a live server. What would change if that were the case?

User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4198
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: [Guide] So you want a L2J Server

Post by UnAfraid » Sun Dec 28, 2014 7:02 pm

I'd suggest using dbinst_gs.jar, dbinst_ls.jar instead of databaseinstaller.bat/sh
Image

User avatar
canislupus
Posts: 63
Joined: Tue Dec 24, 2013 1:30 am

Re: [Guide] So you want an L2J Server

Post by canislupus » Mon Dec 29, 2014 7:51 pm

Ardirion wrote:This guide is very useful with the wikis gone and many of the guides elsewhere on the web being dodgy at best.

I have some questions:

Other guides say to copy the L2J_DataPack files into the folder that has the L2J_Server files. This guide says to copy the server files over the DataPack files. Does it make a difference?

Is it no longer necessary to run the login/RegisterGameServer.bat (or .sh) file and copy the resulting hexid.txt file into the game/config folder?

You say this is not a suitable guide for a live server. What would change if that were the case?
I believe that merging the files from either L2J_Datapack or L2J_Server to another directory, will have the exact same output.
Datapack and Server have same folders. But they have different components that need to be together.

Yes, you should add the HexId if you want a custom server name, this is usually not necessary for a test server. Because if no HexId file is detected, the system will assign the default name "Bartz". But it is worth mentioning.

I made this guide for newcomers mostly.
This will happen to you if you run a live server as a newb
https://www.youtube.com/watch?v=2m-42ek85G4

Nobody wants to lose their time in a server where the Gm/Admin has less than a week of experience.

What do i think you need to run a live server? I am not an expert, just to name a few..


Standalone sql installation. No apache, No php.

Focus on security
1, secure the sql with a custom user and password.
2, only allow sql access from localhost.
3, create firewall rules to allow only sql access from your IP.
4, create firewall rules and block everything that doesnt use login or game ports.

It also depends if your server runs on Linux or Windows.

Get used to working with Eclipse and Git.
I will try to add more content to the guide so that you dont end like Simba. and more like :
https://www.youtube.com/watch?v=YxFPE8xjzpI
Last edited by canislupus on Tue Dec 30, 2014 5:10 am, edited 2 times in total.
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721

User avatar
canislupus
Posts: 63
Joined: Tue Dec 24, 2013 1:30 am

Re: [Guide] So you want a L2J Server

Post by canislupus » Mon Dec 29, 2014 7:55 pm

UnAfraid wrote:I'd suggest using dbinst_gs.jar, dbinst_ls.jar instead of databaseinstaller.bat/sh
Thanks for the suggestion. Why is it better with the jars?
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721

User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4198
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: [Guide] So you want a L2J Server

Post by UnAfraid » Tue Dec 30, 2014 4:55 am

canislupus wrote:
UnAfraid wrote:I'd suggest using dbinst_gs.jar, dbinst_ls.jar instead of databaseinstaller.bat/sh
Thanks for the suggestion. Why is it better with the jars?
Its really simple to use, small amount of data to type, and it has GUI (and console for linux)
Image

User avatar
canislupus
Posts: 63
Joined: Tue Dec 24, 2013 1:30 am

Re: [Guide] So you want a L2J Server

Post by canislupus » Tue Dec 30, 2014 5:06 am

Updated, thanks Unafraid!
So you want a L2J Server? Check out my guide viewtopic.php?f=81&t=30556&p=182721#p182721

kope93
Posts: 1
Joined: Wed Dec 31, 2014 11:57 am

Re: [Guide] So you want a L2J Server

Post by kope93 » Wed Dec 31, 2014 2:37 pm

a
Last edited by kope93 on Sat Jan 03, 2015 1:53 pm, edited 1 time in total.

User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4198
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: [Guide] So you want a L2J Server

Post by UnAfraid » Wed Dec 31, 2014 2:54 pm

Are you sure you used the correct branch.
If u haven't builded login server from Ertheia branch that can happen.
Image

Attila
Posts: 438
Joined: Mon May 05, 2014 10:15 am

Re: [Guide] So you want a L2J Server

Post by Attila » Thu Jan 01, 2015 11:46 am

All work fine

but i se you changed community bord.
if i click on favorite link it don't work.
how can i make it as it was so you canse who is online ans server info.
And at L2J_Configurator i don't get l2jdp-version and l2jdp-version is that normal ?

sorry for my bad english

thanks

User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4198
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: [Guide] So you want a L2J Server

Post by UnAfraid » Thu Jan 01, 2015 2:42 pm

Attila wrote:All work fine

but i se you changed community bord.
if i click on favorite link it don't work.
how can i make it as it was so you canse who is online ans server info.
And at L2J_Configurator i don't get l2jdp-version and l2jdp-version is that normal ?

sorry for my bad english

thanks
Yes since we use git there is no revision numbers anymore so we don't have *-version files anymore.
Community board is not entirely implemented yet.
Image

Post Reply