Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

L2O Tutorial to Set Up Lineage2 Server

Initiate Mage
Joined
Aug 8, 2005
Messages
31
Reaction score
0
Here you got a tutorial to set up Lineage 2 Server.
It comes original from Klop's Guide.
Modified by me so it would be easier and faster to understand.



Enjoy.
Regards,
Russian :icon6: :thumbup:
 
Initiate Mage
Joined
Aug 8, 2005
Messages
31
Reaction score
0
Tutorial Forum Edition

Lineage 2 Server Setup


<<Changing INI Files>>

* If you dont have a router replace 192.168.0.100 with 127.0.0.1 in the lines below, if you do have a router replace 192.168.0.100 with your internal IP, to get your internal IP go:
Start->Run->cmd.exe then type ipconfig, the IP Address listed is your internal IP.

* If you are playing on the internet replace 24.68.124.198 with your external IP address, to get this go to (and forward the appropriate ports if you have a router/firewall so people can access).
Always save your edited files (even if it is not mentioned.)

- Change the following lines in config.txt under NewAuth\etc folder:
DevServerIP="24.68.124.198"
logdip="192.168.0.100"

- Change the following lines in l2cache.ini under CacheD folder:
address="192.168.0.100"

- Change the following lines in l2logd.ini under L2LogD folder:
address=192.168.0.100

- Change the following lines in L2NPC.ini under L2NPC folder:
address="192.168.0.100"
address="192.168.0.100"
address="192.168.0.100"
address="192.168.0.100"
user="gamma" -> MSSQL LOGIN
password="l2online" -> MSSQL PASSWORD

- Change the following lines in l2server.ini under L2Server folder:
address="192.168.0.100"
address="192.168.0.100"
address="192.168.0.100"
address="192.168.0.100"
WorldId=1 *This should be the digits of your internal IP after the last . (In my case
WorldId=100)

- Change the following lines in config.txt under PetitionD\etc folder:
webAuthServer="192.168.0.100"


<<Setting up Database Scripts>>

Open lin2comm_new.sql under DBScript

- Find
set @conn_str = '127.0.0.' + @world_id + ''';''sa'';''l2online'
change 127.0.0. to the first 3 sets of numbers of your internal IP (If your internal IP is 192.168.0.100 then enter 192.168.0.)
change sa as your SQL database account
change l2online as your SQL database password
There are 3 lines you have to change. ( That means you need to do it 3 times, just press Find again.)

- Find
'SQLOLEDB', '127.0.0.1';'sa';'l2online'
change 127.0.0.1 to your internal IP
change sa as your SQL database account
change l2online as your SQL database password
There is only 1 line you have to change. (Means that’s it you are done.)

Save and close the file.


Open lin2world_20040609_all.sql under DBScript

- Find
set @conn_str = '127.0.0.' + @world_id + ''';''sa'';''l2online'
change 127.0.0. to the first 3 sets of numbers of your internal IP (If your internal IP is 192.168.0.100 then enter 192.168.0.)
change sa as your SQL database account
change l2online as your SQL database password
There are 3 lines you have to change. ( That means you need to do it 3 times, just press Find again.)

- Find
'SQLOLEDB', '127.0.0.1';'sa';'l2online'
change 127.0.0.1 to your internal IP
change sa as your SQL database account
change l2online as your SQL database password
there are 2 lines you have to change

Save and close the file.


<<Setting up Databases>>

* Make sure the SQL server is running, Open Service Manager and look if its running to be sure.

* Open SQL Server Enterprise Manager (start menu again), double click SQL Server Group, double click (local) the click OK. Double click on databases folder, to make a database right click and select New Database.
- Make the following databases:
lin2world
lin2comm
lin2log
lin2report
lin2db
petition

- Go to the tools menu, then click SQL Query Analyser.

Change the database drop down menu on the top bar to lin2world.
# Then click the Load SQL Script button (Also on the top bar). Choose lin2world_20040609_all.sql (Located in the DBScript folder).
Click the Parse Query button (blue check mark icon) then once that is done click Execute Query (The green triangle icon). After this is complete go file save.
Do this steps the same to the next files…

Change the database drop down menu on the top bar to lin2comm.
# lin2comm_new.sql

Change the database drop down menu on the top bar to lin2log.
# Choose lin2log_20040416.sql

Change the database drop down menu on the top bar to lin2report.
# Choose lin2report_20040416.sql

Change the database drop down menu on the top bar to lin2db.
# Choose lin2db_AuthDBSchema.sql

Change the database drop down menu on the top bar to lin2db.
# Choose lin2db_update.sql

Change the database drop down menu on the top bar to petition.
# Choose petition.sql

- Close SQL Query Analyzer and open SQL Server Enterprise Manager.
Under databases click lin2db then double click the tables icon.
Right click on the server table go open table, then select return all rows.
Add the following information:

id = 1
name = same as the worldname in l2server.ini
ip = your external IP
inner_ip = your internal IP
ageLimit = 0
pk_flag = 0 PK not allow; 1 allow
kind=0
port=7777

Close the SQL Server Enterprise Manager.


<<DSN Configuration>>

- Open control panel, click administrative tools, then double click Data Sources (ODBC).
# Choose the File DSN tab then click the add button.
Select SQL Server and click next, type lin2world, press next again and then
press finish.
Leave description blank and select (local) in the server dropdown menu then
click next.
Leave it on windows NT configuration and click next.
Check the box next to Change Default Database to, then select the
lin2world database and click next, then click finish and ok.
Do all these steps also on these files…

# Type petition.
Select the petition database.

# Type lin2comm.
Select the lin2comm database.

# Type lin2log.
Select the lin2log database.

# Type lin2report.
Select the lin2report database.

# Type lin2db.
Select the lin2db database.


<<Running the Server>>

Open the files in the following order.

L2LogD.exe
File DB = lin2log
login name = your SQL account
password = your SQL password

CacheD.exe
File DB = lin2world
login name = your SQL account
password = your SQL password

L2AuthD.exe
File DSN = lin2db
login name = your SQL account
password = your SQL password

PetitionD.exe
Server = (local)
login name = your SQL account
password = your SQL password
Database = petition

L2Server.exe

L2NPC.exe


<<Client Setup>>

Install your lineage 2 client.
Extract l2j-tools.zip to your computer (doesnt matter where). Run updateIni.bat, when asked type in the location of your lineage client install do so, then press enter. You will be asked for your lineage login server address. If you are running this on your computer you can use your internal IP address, otherwise (if your sending to other people etc) use your external IP address. Press enter and your client will be set to connect to your private server.


<<ASP Account Register System>>

You must have a Webserver that supports ASP.

- Open the conn.asp (from the directory that you just extracted to) with notepad and change the following:
ms_sql_server_host_addr = "127.0.0.1" *This should be set to your internal IP
sql_server_username = "sa" -> Your MSSQL username.
sql_server_password = "l2online" -> Your MSSQL password.

Save and close the file.

- Open control panel, click administrative tools, then double click Internet Information Services.
Click on local computer then click websites.
Right click default websites and go properties.
Click on the documents tab and then the add button.
Under default document name type index.asp then press OK.
Select index.asp and use the up arrow to move it to the top of the list then press OK.

Close IIS and open internet explorer and type
(where 127.0.0.1 is your internal IP)
Once the website comes up click register. Then enter a username and a password and click next.
You have now created an account.


<<Setup Admin>>

For this to work you must have logged into the server with your character before.
Open SQL Server Enterprise Manager (start menu again), double click SQL Server Group, double click (local) the click OK.
Double click on databases folder and select lin2db.
Click on tables then find user_account, right click on it and select Open Table then Return All Rows.
Note the name and uid of the character that you want to make a gm.

Go back to databases and this time select lin2world.
Click tables and select builder_account, right click select Open table then Return All Rows.
Under account name enter the name of your character
(that you noted before in user_account) and under default builder enter 1 and under account_id enter the uid you noted from user_account.

When you make a new character on this account it will have GM powers, the commands are located in script/BuilderCmdAlias.txt and are used //command so to enable invisible mode you would type in: //hide on

To give a current character GM powers, go back to databases and select lin2world. Click tables and select user_data, right click select Open table then Return All Rows. All the character on the server will be listed, you can just change the builder value from 0 to 1 for any character you want to give GM powers.


<<Editing the Server>>

All the things you can edit are in the /scripts folder.
For EXP/SP/Adena rates and drops you can edit: npcdata.txt
For GM Commands you can edit: BuilderCmdAlias.txt
For Item stats you can edit: Itemdata.txt
For Blacksmith sell lists you can edit: multisell.txt
For NPC spawn locations you can edit: npcpos.txt
For Recipe information you can edit: recipe.txt
For Teleporters and store you can edit: ai.obj



Edited by Russian (Tnx to Klop’s Guide)
 
Last edited:
Upvote 0
Watching from above
Legend
Joined
Apr 9, 2004
Messages
3,828
Reaction score
752
Good. Guides are always more welcome than stupid help requests. Hope this prevents a few. But also I hope people don't rewrite perfectly good guides all the time since this will only create confusion and.. a certain amount of spam.
 
Upvote 0
Seraphim
Joined
Jun 27, 2004
Messages
190
Reaction score
1
ill try this guide now! THX! But do i have to put it on D: or sth?
And: do i have to edit this:DevServerIP="24.68.124.198"
if i run on lan???
 
Last edited:
Upvote 0
Initiate Mage
Joined
Jul 5, 2005
Messages
7
Reaction score
0
this guide is so much better then the pinned guide..

thanks alot knight ;)
 
Upvote 0
Initiate Mage
Joined
Sep 23, 2005
Messages
32
Reaction score
0
how do you modify l2.ini to edit the IP adress in it? Dont i need players to have the L2.ini modified with my IP in roder for them to be able to play in my server? Ive tryed lot of things , even l2encdec and i cant get client to start with a modified .ini =S some1 who know who to do it plz post it here or send me PM, Thanks a lot and sorry for requesting =S
 
Upvote 0
Initiate Mage
Joined
Aug 7, 2005
Messages
2
Reaction score
0
Nice tut, but i need some help

I can manage on my own until i get to the databases. I cant get any further here because i don't have the next program:

SQL Server Enterprise Manager.

Can somebody help me with finding this program of telling me there is another way to.
I tried with phpmyadmin and navicat 2005.

Is there somebody who can give me a link to this program or something.

Thanx in advance
 
Upvote 0
Back
Top