Before we start,
you need to download these things:
1) TortoiseSVN - [
DOWNLOAD LINK ]
2) Visual C++ Express - [
DOWNLOAD LINK ]
3) MySQL - [
DOWNLOAD LINK ]
4) MySQL Workbench 5.2.47 - [
DOWNLOAD LINK ]
After you've downloaded finish,follow these steps:
Install TortoiseSVN
Install Visual C++ Express
Install MySQL - Remember your root password.(Recommend you to use default password "root")
Install MySQL Workbench 5.2.47
Okay,here we start!
rAthena Settings
1) Create a new folder for rAthena files.
2) Right Click on the folder and click "SVN Checkout...".
3) Fill in this url [
http://svn.rathena.org/svn/rathena/trunk/] into the "URL of Repository"
and click ok, it will start to download all files from the url. Wait until it complete then click ok.
4) Open the folder "\trunk\conf" then rename 'import-tmp' folder into 'import'
5) Open (char_athena.conf,map_athena.conf) file in your "\trunk\conf" and edit this:
Char_athena.conf
/ Server Communication username and password.
userid: s1 (change ‘s1’ to whatever you want but here I use ‘username’ as userid for tutorial only)
passwd: p1 (change ‘p1’ to whatever you want but here I used ‘password’ as password)
//login_ip: 127.0.0.1 (REMOVE THE ‘//’ IN FRONT OF login_ip: 127.0.0.1 so it will look like this login_ip: 127.0.0.1)
//char_ip: 127.0.0.1 (REMOVE THE ‘//’ IN FRONT OF char_ip: 127.0.0.1 so it will look like this char_ip: 127.0.0.1)
Map_athena.conf
// Interserver communication passwords, set in account.txt (or equiv.)
userid: s1 (Change ‘s1’ into ‘username’ because as I explain on up there before)
passwd: p1 (Change ‘p1’ into ‘password’ because as I explain on up there before)
// Character Server IP
// The map server connects to the character server using this IP address.
// NOTE: This is useful when you are running behind a firewall or are on
// a machine with multiple interfaces.
//char_ip: 127.0.0.1 (Remove the ‘//’)
// Map Server IP
// The IP address which clients will use to connect.
// Set this to what your server's public IP address is.
//map_ip: 127.0.0.1 (Remove the ‘//’)
Save it when you've done.
6) Open "subnet_athena.conf" and edit this:
subnet: 255.0.0.0:127.0.0.1:127.0.0.1 (change your subnet mask)
Here is the way to find your subnet address:
Start>All Programs>Accessories>Command Prompt
Open Command Prompt type ipconfig then press enter.
You will find your subnet mask.
Save it when you've done.
7) Open "inter_athena.conf" and edit these things:
sql.db_username: ragnarok (change ‘ragnarok’ into your MySQL username which is I use default ‘root’)
sql.db_password: ragnarok (change ‘ragnarok’ into your MySQL password which is I use default ‘root’)
sql.db_database: ragnarok
char_server_id: ragnarok (change ‘ragnarok’ into ‘root’)
char_server_pw: ragnarok (change ‘ragnarok’ into ‘root’)
char_server_db: ragnarok
map_server_id: ragnarok (change ‘ragnarok’ into ‘root’)
map_server_pw: ragnarok (change ‘ragnarok’ into ‘root’)
map_server_db: ragnarok
log_db_id: ragnarok (change ‘ragnarok’ into ‘root’)
log_db_pw: ragnarok (change ‘ragnarok’ into ‘root’)
log_db_db: ragnarok (THIS ONE YOU CHANGE INTO ‘logs’ because later we make database ‘logs’
Save it when you've done.
8) Open folder ''trunk\src\common'' find mmo.h then right click it and click edit.
Find this line:
#define PACKETEVER YYYYMMDD
Change it to your client version
Example:
#define PACKETEVER 20130807
9) Go to ''trunk\db'' and open ''packet_db.txt'' with notepad.
Find this line:
packet_db_ver: 45
Change the 'packet_db_ver' to your packet version.
You can find your packet version below there.
(Tips: Press Ctrl + F then input your Ragexe version EX: 2013-08-07Ragexe)
Note: If you can't find your packet version below there, you can download it from
HERE and paste it at bottom.(Remember to change the 'packet_db_ver')
Save it when you've done.
MySQL Settings
- Open your MySQL Workbench that you've downloaded and double click on 'Local Instance MySQL' then enter your password. (which i used is ''root'')
- We need to install a new "Schema", this is like a folder where all the database tables are stored. Click the yellow cylinder looking thing in the upper left to create a new Schema. Name it "ragnarok" - NOTE! Lower case is important here, make sure it is exactly "ragnarok". The server collation should be "Server Default".
- Click "Apply" to create the Schema. A window will pop up with the actual commands that are going to take place; click "Apply" again to finalize your order.
- Now right click 'ragnarok' under "Object Browser" and click "Set as default schema", a line will appear through it telling the browser that any commands you make now will be ordered to that Schema.
- Next, click the button directly to the left of the one you just did,it says "SQL" with a tiny folder. Navigate to your rAthena/sql-files/ folder, and open the sql script file "main.sql".
- You'll see a bunch of code appear, these are commands that will tell the browser to create plain databases for your rAthena server. Click the yellow lightning bolt in the upper left hand corner to execute it and allow it to finish (ensure you click the first lightning bolt, the one without a cursor symbol or a magnifying glass over it).
- After it finishes, a bunch of executed commands will appear on the bottom of the screen. You can now expand the ragnarok schema to see a bunch of tables. (Image)
- Now, do the same thing for a schema called "logs", but open and execute logs.sql. Ensure the tables are there as well.
- Close the existing query tabs by hitting the "X" in the upper right of the tab. With the ragnarok tables still open, scroll down to the "login" table and RIGHT click it, then select "Edit Table Data".
- Here you'll see existing account information that players can log in with to make characters. If you remember, the first account is the server communication account and it has the default password that you were asked to reset earlier. For our example we chose "username" and "password". Enter these in the "username" and "password" field. And then create your first GM account by clicking where the word "null" is on the row with a ' * ' and enter "2000000" for the "account_id" field, with a username and password that you like. For this guide we chose a username of "AthenaGM" and a password of "12345" and a sex of "M". To enable full administrator GM, just set the "group_id" to "99". Zero out everything else. When you are finished it should look like THIS.
- Hit the "Apply" button in the corner and then again when the code prompt appears. This should modify your tables. After it is done, you may close the SQL Editor by clicking the "X" on the tab at upper left corner. Hitting the "X" in the upper right closes the whole workbench. If you accidentally close it, just open it again.
Compiling Your Server
- Open rAthena-10.sln in your rAthena folder. (Open with Microsoft Visual C++ Express 2010)
- Select the desired compile configuration (marked red). Use Release when you compile the server, where players will be playing on.Debug compiles the server without optimizations and with debugging information.
- Right-click the solution node (marked blue) and select Build solution. If you have compiled the server before, it is recommended to use Rebuild solution, as it forces the compiling of all components, not just those, which seem to have changed since last compile.
- If the compilation was successful, the resulting executables are in the same folder as the solution named login-server_sql.exe, char-server_sql.exe, map-server_sql.exe and mapcache.exe.
Congratulations! You are ready to run your server now. :D
For full information please refer to HERE.