Why use L2J?

  • Alternatives

    L2J is the main project with over 10 years of development, the other projects are either private, cost money, custom or need a lot of extra work before being ready for production.

  • Ready to Use

    Set-up a server in a few minutes, ready to play with friends!

  • Fully Customizable

    Gain control of the game-play by customizing the server settings, add events, quests or games created by others and develop the features you want!

Commits

Downloads

Ertheia

File Description Version Date
Core Ertheia Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Ertheia 11-29-2014
Datapack Ertheia Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Ertheia 11-29-2014
Ertheia Geodata Complete premium Geodata by NosBit. Ertheia 01-05-2015

High Five

File Description Version Date
Core Master Build Contains zero-day fixes and unfinished features, recommended for advanced users only. High Five 11-29-2014
Datapack Master Build Contains zero-day fixes and unfinished features, recommended for advanced users only. High Five 11-29-2014
Core Master Source Get the source code and start digging now! High Five 11-29-2014
Datapack Master Source Get the source code and start digging now! High Five 11-29-2014
High Five Geodata Complete premium Geodata by HorridoJoho and NosBit. High Five 8-28-2013

Interlude

File Description Version Date
Core Interlude Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Interlude 11-29-2014
Datapack Interlude Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Interlude 11-29-2014
Interlude Geodata Complete premium Geodata. Interlude 8-28-2013

Getting started basic guide

Follow this steps to get the server running.

  • Get the Apps!

    Get Java JRE, MySQL Server and HeidiSQL (Optional)!

    Let's assume you can download and install these apps all by yourself.

    Installation Guides

    Follow the official guide to install JRE.

    Follow the official guide to install MySQL Server.

    Check the HeidiSQL help for more information on how to use it.

  • Downloads

    Get the server Core, DataPack and Geodata (optional) for the version you want.

    Ertheia

    File Description Version Date
    Core Ertheia Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Ertheia 11-29-2014
    Datapack Ertheia Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Ertheia 11-29-2014
    Ertheia Geodata Complete premium Geodata by HorridoJoho and NosBit. Ertheia 8-28-2013

    High Five

    File Description Version Date
    Core Stable Build This is the core stable build, contains the tested features and bug fixes. High Five 11-29-2014
    Datapack Stable Build This is the datapack stable build, contains the tested features and bug fixes. High Five 11-29-2014
    Core Master Build Contains zero-day fixes and unfinished features, recommended for advanced users only. High Five 11-29-2014
    Datapack Master Build Contains zero-day fixes and unfinished features, recommended for advanced users only. High Five 11-29-2014
    Core Master Source Get the source code and start digging now! High Five 11-29-2014
    Datapack Master Source Get the source code and start digging now! High Five 11-29-2014
    High Five Geodata Complete premium Geodata by HorridoJoho and NosBit. High Five 8-28-2013

    Interlude

    File Description Version Date
    Core Interlude Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Interlude 11-29-2014
    Datapack Interlude Build Contains zero-day fixes and unfinished features, recommended for advanced users only. Interlude 11-29-2014
    Interlude Geodata Complete premium Geodata. Interlude 8-28-2013
  • Deploy the Server

    Get both Server and DataPack ZIPs into the same folder and unzip them.

    The directory where you deploy the server is not important.

    Advanced

    You can deploy the DataPack on another directory and change DataPackRoot in config options.

  • Configure the Server

  • Install the Database

    You are required to install Login, Game and Community databases.

    To install the database you must go to tools folder and there you have three options:

    .jar

    Cross-platform GUI installer, one per database.

    .bat

    Windows only batch installer, install all three databases.

    .sh

    Unix only shell installer, install all three databases.

    Settings

    Settings

    Fill user, password and database name for each database.

    Backup

    Backup

    If it's not your first install, it's recommended to make a backup.

    ...

    Type: Login Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Type: Community Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Type: Game Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Customs

    In order to use L2J customs you must install this tables.

    ...

    Mods

    In order to use L2J mods you must install this tables.

    ...

    Good bye

    Here finish the installer.

  • Register the Game Server

    You need to register game server server, this will prevent other game servers to register and appear on your server list.

  • Run the Server

    Once you have the server configured you need run both Login and Game servers.

  • Connect to the Server

    In order to connect to the server you have this options:

    HOSTS file

    Edit C:\Windows\System32\drivers\etc\hosts and add this line:

    # IP DNS
    127.0.0.1 l2authd.lineage2.com
    								

    BAT file

    Create a .bat file with the following content:

    @start l2.bin IP=127.0.0.1
    								

    Custom exe

    Here is a C++ Win32 exe example:

    #define _WIN32_WINNT _WIN32_WINNT_WINXP
    #define NOMINMAX
    #include <windows.h>
    #include <cstdlib>
    
    // Start L2 as .bin with IP as parameter.
    // You can use IP or DNS as IP parameter.
    // You could include other parameters.
    // You can change the path to the .bin file to avoid including the L2.exe inside the System folder.
    // Author: Zoey76
    int _stdcall wWinMain(HINSTANCE hInst, HINSTANCE prevInst, LPWSTR szCmdLine, int nCmdShow)
    {
    	ShellExecute(0, L"open", L"cmd.exe", L"/C start l2.bin IP=127.0.0.1", 0, SW_HIDE);
    }
    								

    More information here.

Getting started advanced guide

Follow this steps to get the server running.

  • Get the Apps!

    Get Eclipse, Java JDK, MySQL Server, HeidiSQL (Optional) and make an account at GitHub!

    Let's assume you can download and install these apps all by yourself.

    Configure the JDK correctly

    Follow the official guide to install JDK and JRE.

    To set up JAVA_HOME environment variable correctly, official guide.

    Additional software

    Source code editor Notepad++ 6.6.9

    Alternative software

    As an alternative to Eclipse you can use IntelliJ IDEA 14

    As an alternative to MySQL Server you can use MariaDB 10.0.15

    As an alternative to HeidiSQL you can use DBeaver 3.0.2

  • Get the Source Code

    To display the Git Repositories in Eclipse, Window->Show View->Other...->Git->Git Repositories.

  • Let's Clone

    Now it's required to clone the L2J repository.

  • Adding the Git URL

    Add the following Git https://github.com/L2J/L2J_Server.git URL.

  • Select the branches

    Select the branches you will be using.

    For this example, only master will be cloned.

    We have renamed them to be more user friendly.

    Both master and stable branches are High Five and require High Five part 5 client.

    Our master is the former beta branch and stable our former trunk.

  • Well done!

    Finishing the repository clone.

    Now you can start working on the code, making changes adding new content.

    Once you are happy with those changes you can commit them to your local repository, so you won't have to worry about erasing them.

  • Customize the Server

    This will be added later.

  • Configure the Server

    This will be added later.

  • Build the Source

    To build, expand the project in the Package Explorer, find build.xml and right-click it:

    The Console output will be similar to:

    Buildfile: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build.xml
    checkRequirements:
    init:
       [delete] Deleting directory C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\bin
        [mkdir] Created dir: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\bin
    dist:
         [sync] Copying 84 files to C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist
         [sync] Removed 1 dangling directory from C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist
         [sync] Removed 7 dangling files from C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist
    compile:
        [javac] Compiling 1797 source files to C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\bin
    jar:
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\login\l2jlogin.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\login\L2J_Configurator.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\game\l2jserver.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\game\L2J_Configurator.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\tools\dbinst_cs.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\tools\dbinst_gs.jar
          [jar] Building jar: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\dist\tools\dbinst_ls.jar
    build:
          [zip] Building zip: C:\Users\Zoey76\git\L2J_Server\L2J_Server\build\L2J_Server_BETA.zip
    BUILD SUCCESSFUL
    Total time: 40 seconds
    							

    The last line before BUILD SUCCESSFUL shows where the build ZIP has been created.

    For the next step get both Server and DataPack ZIPs at hand.

  • Deploy the Server

    Follow this steps to deploy the server.

  • Install the Database

    You are required to install Login, Game and Community databases.

    To install the database you must go to tools folder and there you have three options:

    .jar

    Cross-platform GUI installer, one per database.

    .bat

    Windows only batch installer, install all three databases.

    .sh

    Unix only shell installer, install all three databases.

    Settings

    Settings

    Fill user, password and database name for each database.

    Backup

    Backup

    If it's not your first install, it's recommended to make a backup.

    ...

    Type: Login Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Type: Community Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Type: Game Server

    Full Install, clean database, wipes your data!

    Upgrade attempts to apply required changes to the existing database, keeps your data!

    ...

    Customs

    In order to use L2J customs you must install this tables.

    ...

    Mods

    In order to use L2J mods you must install this tables.

    ...

    Good bye

    Here finish the installer.

  • Register the Game Server

    You need to register game server server, this will prevent other game servers to register and appear on your server list.

  • Run the Server

    Once you have the server configured you need run both Login and Game servers.

  • Connect to the Server

    In order to connect to the server you have this options:

    HOSTS file

    Edit C:\Windows\System32\drivers\etc\hosts and add this line:

    # IP DNS
    127.0.0.1 l2authd.lineage2.com
    								

    BAT file

    Create a .bat file with the following content:

    @start l2.bin IP=127.0.0.1
    								

    Custom exe

    Here is a C++ Win32 exe example:

    #define _WIN32_WINNT _WIN32_WINNT_WINXP
    #define NOMINMAX
    #include <windows.h>
    #include <cstdlib>
    
    // Start L2 as .bin with IP as parameter.
    // You can use IP or DNS as IP parameter.
    // You could include other parameters.
    // You can change the path to the .bin file to avoid including the L2.exe inside the System folder.
    // Author: Zoey76
    int _stdcall wWinMain(HINSTANCE hInst, HINSTANCE prevInst, LPWSTR szCmdLine, int nCmdShow)
    {
    	ShellExecute(0, L"open", L"cmd.exe", L"/C start l2.bin IP=127.0.0.1", 0, SW_HIDE);
    }
    								

    More information here.