Saturday, May 3, 2008

Running l2j Kamael server - somthing between tutorial and experiment

L2j is an open source server emulator project for the popular MMORPG Lineage2. Despite the fact that it is not the best idea for running a popular private server with over a thousand players it is a very good for home or a small community server.

What do you need to run the server?
Java - http://java.sun.com/javase/downloads/index.jsp
MySQL - http://www.mysql.com/
L2JServer - http://l2jserver.com/
L2JDatapack - http://www.l2jdp.com/

Install the latest Java Runtime Environment and the MySQL server. (I will not spend time on this, because it is not the topic of this article.) Get the L2J Server and Datapack archives and extract them in two separate folders. (For now I'll call them L2JServer and L2JDatapack) Then copy the content of the L2JDatapack/gameserver/data folder to the L2JServer/gameserver - it will override the current data folder. Also copy L2jDatapack/login/servername.xml to the L2JServer/login folder.
Run database_installer.bat or database_installer.sh according to your OS. They are located in the datapack/tools folder. The script is very well documented, so just follow the instructions.

Now is the time for editing the property files.
First the login server properties - L2Jserver/login/config/loginserver.properties - set the correct database, host and port information. Also setting the ForceGGAuth=False will solve some future problems. When it is set to true the login server enforces the gameguard authorization from the client.
Next are the game server properties - gameserver/config/server.properties with again database, host and port information.

Registering game servers. For every gameserver that you want to run start /login/RegisterGameServer.bat (/login/RegisterGameServer.sh) and select the number you wish to assign to the gameserver, then copy the hexid(server-x).txt file to the corresponding /gameserver/config/ directory and rename it to hexid.txt.

It is time to fire it up! To run the login server start /login/startLoginServer.bat(sh). To run the gameserver start startGameServer.bat(sh).
The effect must be something like this: