MMORPG сервера

Вс, 19/05/24, 3:43 AM
Приветствую Вас Гость
Главная

Регистрация

Вход

RSS


[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
MMORPG FORUM » MMORPGserver » ROSE Online » All kinds of ROSE Info and Downloads
All kinds of ROSE Info and Downloads
MMORPGserverДата: Пт, 10/08/07, 6:04 PM | Сообщение # 1
Admin
Группа: Администраторы
Сообщений: 22
Репутация: 1
Статус: Offline
Credits to RageZone.

Alright, all of the Rose Online guides in Ragezone are outdated. So I'm making this for people to use and hopefully simplify it so people can understand it better. I'll also try my best to keep it updated. I also will share a launcher I found ages ago, which was designed by nhed (credits to him), its a newer one. So you don't have to use a .bat anymore. This Guide & Files will always be for the latest files! These files work with the latest client ver 133.

Current Version: REV 60 (April 30th, 2007)

-- 1.0: Server Installation
-- 2.0: Running the server
-- 3.0: Client Setup (NO more .bat!)
-- 3.1: Setting up a webserver + Site
-- 4.0: SQL
-- 5.0: GM and Commands
-- 6.0: Compiling
-- 7.0: Multi World
-- 8.0: Extras
-- 9.0: Problems & Errors
-- 10.0: Notes
-- 10.1: Updates

--------1.0----------Server Installation

Step 1: First download this full server I have put together for you.
Link: Full Server ver 60 (Updates: REV 60!)
- 1/29/07 (Emergency Update For GM Commands)
- 1/30/07 (New SQL Update for .sql file, new and improved respawns)
- 2/8/07 (Updated to the new files! Rev 16!)
- 2/11/07 (Updated to the new files Rev 20!)
- 2/20/07 (Updated from Rev 20 to Rev 23)
- 2/24/07 (Updated to Rev 25 files!)
- 2/25/07 (Fixed the STBS, which updated them to ver 137)
- 3/1/07 (Updated to Rev 30 files!)
- 3/1/07 (Included the right database)
- 3/4/07 (Added ver 138 STB!, should fix in-game problems)
- 4/4/07 (Updated to the new files! Rev 41!)
- 4/6/07 (Updated to the new files! Rev 45!)
- 4/18/07 (Updated to the new files! Rev 59!)
- 4/30/07 (Updated to the new files! Rev 60!)

Now, download Navicat. This is used for the Databases (SQL).
Link: Navicat MySQL

Install Navicat. After it's installed, run the program. You should see the connection "localhost" to the left. IF you do not, go to "File > New Connection". In the fields put this:

Connection Name: localhost
Host Name/IP Address: localhost
Port: 3306
Username: root
Password:

(Leave password blank) And click "Test Connection" and you should get a success. If you do, click "OK".

Now, click your connection "localhost" and right click and go to "New Database". Name the database "roseon" and click OK. Right click on the database you just made, and click "Execute batch file". Browse to the folder you extracted the server files, and find the folder named "database" and double click "osrose svn.sql". It will start the process that .sql file, it may take a few minutes. If everything went right, it should tell you it executed it successfully.

You do NOT need to edit the Channels table anymore, so please close out of Navicat.

Now, go to your Server folder where you extracted all those files. In the root folder you should see "charserver.conf" Open that file with Notepad. And you should see this:

Code:

[DATABASE]
mysql_host=localhost
mysql_user=root
mysql_pass=
mysql_database=roseon
mysql_port=3306
AutoQueryTime=600

[SERVERDATA]
serverid=1
servertype=1
serverip=201.160.169.10
serverport=29100
servername=Dark
parentid=0
accesslevel=100
connection=2
lanip=192 .168.0.1
lansubmask=192.168.0

[CHARSErVER]
deletetime=3600
usethreads=0

[PASSWORDS]
loginpass=789456
charpass=456123
worldpass=321654

You first need to change the database settings up top. The host should be "localhost" just like you did in Navicat. Same for the username and password you did for navicat. And for the database name, put the name of the database you created in Navicat. So basically your just filling out the info that you made in Navicat, really easy.

Now you need to change some things. So, on the "serverip=201.160.169.10" change the 201.160.169.10 to your WAN IP. (which you can find here: http://whatismyip.org ). Then find "servername=Dark" Change "Dark" to whatever you want your server name to be. Now, find "lanip=192.168.0.1" you need to change this to your lan IP. You can find out your lan IP by going to "Start>run> and type in "cmd" (without the quotation marks) and once the command prompt comes up, type "ipconfig" (without the quotation marks). It will give you the LAN IP along wit the Lan Sub Mask. So change those two fields in the conf file. Save and close the file.

Next, find the file named "loginserver.conf" and open it with Notepad. And you should see this:

Code:

[DATABASE]
mysql_host=localhost
mysql_user=root
mysql_pass=
mysql_database=roseon
mysql_port=3306

[SERVERDATA]
serverid=0
servertype=0
serverip=201.160.169.10
serverport=29000
servername=LoginServer
connection=0
lanip=192.168.0.1
lansubmask=1 92.168.0

[LOGINSERVER]
accesslevel=100
CreateLoginAccount=1
usethreads=0

[PASSWORDS]
loginpass=789456
charpass=456123
worldpass=321654

Again, change the database settings just like you did in the previous file. After that, find "serverip=201.160.169.10" and change the 201.160.169.10 to your WAN IP (which you can find here: http://whatismyip.org ). Now, find "lanip=192.168.0.1" you need to change this to your lan IP. You can find out your lan IP by going to "Start>run> and type in "cmd" (without the quotation marks) and once the command prompt comes up, type "ipconfig" (without the quotation marks). It will give you the LAN IP along wit the Lan Sub Mask. So change those two fields in the conf file. Here you have a choice, see "CreateLoginAccount=1"? When this is set to 1, it enables a person to make an account on login. What this does is a person will type in their account info in game, and it will tell them "Account does not exisit". Then if they type it again, their account will be created. If you want this disabled, then change the "1" to a "0". Save and close the file.

Lastly, find the file named "worldserver.conf" and open it with Notepad. And you should see this:

Code:

[DATABASE]
mysql_host=localhost
mysql_user=root
mysql_pass=
mysql_database=roseon
mysql_port=3306
AutoQueryTime=600

[SERVERDATA]
serverid=1
servertype=2
serverip=127.0.0.1
serverport=29200
servername=Channel 1
maxconnections=500
parentid=1
connection=2
lanip=192.168.0.1
lansubmask=192.168.0.1

[WORLDSERVER]
accesslevel=100
exp_rate=3
drop_rate=1
drop_type=2
zuly_rate=4
welcome_msg=Welcome to Open Source Rose Online
autosave=1
savetime=120
mapdelay=10
visualdelay=200
worlddelay=700
partygap=10
maxstat=255
fairy=1
fairystay=45
fairywait=3 0
fairytestmode=0
playerdmg=120
monsterdmg=100
cfmode=0

[PASSWORDS]
loginpass=789456
charpass=456123
worldpass=321654

Again, change the database settings just like you did in the previous file. Then find "serverip=201.160.169.10" and change the 201.160.169.10 to your WAN IP (which you can find here: http://whatismyip.org ). Now, find "lanip=192.168.0.1" you need to change this to your lan IP. You can find out your lan IP by going to "Start>run> and type in "cmd" (without the quotation marks) and once the command prompt comes up, type "ipconfig" (without the quotation marks). It will give you the LAN IP along wit the Lan Sub Mask. So change those two fields in the conf file. Then find "servername=Channel 1" and change "Channel 1" to what you want your Server name to be. In this file you can edit the EXP rate, the Drop Rate, Zuly Rate, and the Welcome message and more things. Save and close the file.

You do not need to edit the "config.ini"! You have now setup your server!

--------2.0----------Running the server

So now run the .exe's in this order: Run "loginserver.exe" and let it load, then run "charserver.exe" and let it load, then run "worldserver.exe".

That was short and easy!

--------3.0----------Client Setup

First, download the ver 139 EVO client:
Link: Rose Online NA_EVO ver 139 Client
Then Install the client, after it's installed. Run "ROSEonline.exe" and let it update completely! After it's updated, you MUST run "TriggerDetect.exe" and fill out your Graphic settings, if you do not run TriggerDetect, then the client will not run.

Next, you abosolutely NEED to download this. This will fix your game from thinking you have a Hacking Tool. GameGuard did an update that disabled most private servers (when you logged in it said "Detected Hacking tool" and closes the game). So to fix this, please download this file below and put it inside your Rose Online client folder and double click it (nothing will happen, it runs in the background). Anyone who trys to connect to your server will need this file.
Link: Rose Online Game Guard Patch
- 4/28/07 (Updated to a new working GameGuard patch)

Throughout the forum you've seen how to connect to your server, with the .bat, EW that's so annoying and not pretty, well I'm going to help you out now. Download this launcher (made by nhed57, all credits to him):
Link: Rose Online Launcher
So extract that to your Rose Online folder. (Default should be: C:\Program Files\Triggersoft\Rose Online Evolution). After you extracted the launcher to that folder, go into that folder and find the file named "lconfig.nhd" and open it with Notepad. Inside that file you should see:

Code:

[CFG]
Server=127.0.0.1
HTTPReg=yourwebcms.com/register.php
HTTPNot=yourwebcms.com

The "Server=127.0.0.1" is the IP the client connects to. So change "127.0.0.1" to your WAN IP (which can be found here: http://whatismyip.org ). The "HTTPReg" is the weblink to where your registration is filled out, you don't have to fill that out, you can leave it blank. The "HTTPNot" is your main website link, you don't have to fill this out you can leave it blank. After you have filled it in, save it and close it. You are now done with the client setup.

--------3.1----------Setting up a webserver + Site

Throughout the forum topics tell you to use WAMP, well WAMP sucks so we're aren't going to use it. First, download XAMPP (so much better and easier than WAMP).
Link: Xamplite 1.6.0

(SKIP this next step if you already instead MySQL)
After that, you NEED MySQL. Please download and install it.
Link: MySQL 5.0 Installer

During the installation, it will say something about "singing up", choose "Skip Signup". After MySQL is installed it will ask you to configure it, so keep clicking "Next" untill you get to a part where it asks for a password. Type in a password (such as "root" , this is the password that will be used for configuring your server and Navicat).

After Xampplite is downloaded, install it. Now after it's installed, go to the Xampp folder, the default location is ( C:\xampplite ). Find "xampp_start.exe" and run it, if everything goes well then it should tell you it's a success. So now bring up your web browser and type in "http://localhost and if the xampp page comes up, then you installed it successfully!

Next is to download a Rose Web CMS, lots of them are found on the forums. Here is a new one (Credit to -Element):
Link: Rose CMS v3.2 Lite
- 1/28/07 (Updated)
- 2/2/07 Updated to the new FULL Version
- 4/28/07 (Updated to v3.2 release)

Next, go to your HTDOCS folder, which is found in the Xampp folder. (Default path is C:\xampp\htdocs ). Delete all the files inside the HTDOCS folder except for the folders "forbidden" and "restricted", please leave those. Then extract the Rose CMS v3.2 Lite you just downloaded to the HTDOCS folder. After you have extracted it, make sure xamp_start.exe is running, if not go back to your xampp root folder ( C:\xampp) and start it. If the webserver is running, bring your web browser up and type "http://localhost" and you should see your Rose CMS v3.2 Lite! Now you need to install the website to make it connect to your database (so you can make accounts). So in your "inc" folder, find the file named "config.php" and edit the Database settings inside there. So follow this pattern:

Code:

Database Host: localhost
Database User: root
Database Password (use the password you set in MySQL)
Database Name: roseon

For the rest of the stuff such as a Server Exp, Server Drop, Client Link, Patch link, you don't need to fill that in. If you want to that's fine, but it's not required. If your database settings are correct, then save the file and try and make an account in your CMS. Now your done!

If you cannot see your webserver, go down to "-- 9.0: Problems" to fix it.

--------4.0----------SQL

SQL is really easy if you just look at it. Let's say you want to change a character's name. You would open up the "Characters" table, and find the character's name you want to change, and change it. And your done! It's really easy. Same for many other things. Such as giving someone zuly. Go into the "Characters" table and find the zuly field, and enter the number of zuly you want that character to have. Inside the SQL you can change many things, the character name, zuly, skills, hair style, face, job/class, and much more. So for your sake, I'll post some useful stuff.

Class ID's

To change a character's class, find the field "classid" inside the "Characters" table and change it.

0, Visitor
111, Soldier
121, Knight
122, Champion
211, Muse
221, Mage
222, Cleric
311, Hawker
321, Raider
322, Scout
411, Dealer
421, Bourgeois
422, Artisan

~More SQL things to be added.

--------5.0----------GM and Commands

To make a character a GM, go into the "Accounts" table and find the field "accesslevel", a normal characters accesslevel is 100, for a GM it's 300. So to make an account a GM account, change the accesslevel to 300 and your done!

Next, here the GM commands:

Code:

/tele [map] [x] [y] - teleport
/b - broadcast
/save - save character data
/reload - reload config.ini
/ann [msg] - announcement
/SSPAWN [monid] [min] [max] - startspawn
/SET - setspawnlocation
/ESPAWN [monid] [aggressive] - endspawn
/DSPAWN [id] [monid] [min] [max] [respawn time] [aggressive]- dupespawn
/DELETESPAWN [id] - delete spawn by id
/pak - read packet.txt and send it
/pak2 - read packet2.txt and send it
/level [lvl] - change lvl
/class [id] - change your class, must relog after
/info - show info
/exp [amt] - give yourself exp
/mon [monid] [count] - spawn monsters
/kick [charname] - kick player from game
/job [jobname] - finish first job quest
/set [id] [refine] - set full armor to [id] with [refine]
/cha [slotname] [id] [stats] - cha slot to [id] with [stats]
/item [id] [type] [amt] - get item
/levelup - go to next level
/drop [type] [id] - drop an item
/givezuly [charname] [amt] - give someone zuly
/npc [id] - spawn an npc
/givefairy [charname] [flag] - give/remove fairy (1/0)
/move [charname] [map] [x] [y] - tele someone
/goto [charname] - goto someone
/teletome [charname] - bring someone here
/playerinfo [charname] - get player infor
/give2 [charname] [id] [type] [amt] - give someone item(s)
/ban [charname] - ban a player
/buff [id] - buff yourself
/ani [id] - do animation
/summon [monid] - summon monstor (to help you)
/reloadquest - reload quest info
/shutdown [minutes] - shutdown server in x minutes
/dquest - debug quests
/iquest [id] <amt> - get items for quest (i think)

(Credits to Minoc)

--------6.0----------Compiling

First, I've done you a favor and put all the newest sources together for you.
Link: Newest Sources (Rev 60)
- 1/30/07 (Emergency Update)
- 1/30/07 (SQL Update for .sql file, new and improved respawns)
- 2/8/07 (Rev 16 new files!)
- 2/11/07 (Updated to Rev 20 new files!)
- 2/20/07 (Updated to Rev 23 files!)
- 2/24/07 (Updated to Rev 25 files!)
- 2/25/07 (Fixed the STB for ver 137!)
- 3/1/07 (Updated to Rev 30 files!)
- 3/1/07 (Included the right database)
- 3/4/07 (Added ver 138 STB!, should fix in-game problems)
- 4/4/07 (Updated to Rev 41 files!)
- 4/6/07 (Updated to Rev 45 files!)
- 4/18/07 (Updated to Rev 59 files!)
- 4/30/07 (Updated to Rev 60 files!)

Extract the sources to a new folder somewhere.

Next you need the compiler, DEV C++ 4.
Link: DEV C++ 4.9

After you downloaded DEV C++ 4, install it.

Then, download the pThread packet and install it.
Link: pThread

After that's done, run the program. (Default path is C:\Dev-Cpp ). Now you need the libmysql package. So inside DEV C++, go to the menu "Tools>Check for updates/packages" and select the "devpacks" mirror. Then click "Check for updates" after the list is complete, search through and find "libmysql" and select it and click "Download Selected". After it downloads it will install, so let it install.

After the libmysql package is installed, we need to change a few lib paths. Open up your project (such as worldserver.dev, which can be found in the "worldserver" folder) Go to menu "Project>project option".
2. Go to "parameters" tab and change the "C:/Dev-Cpp/lib/libws2_32.a" and "C:/Dev-Cpp/lib/libmysql.a"
for you correct path.

Open DEV C++ and in the menu go to "Project>Project Option". Then go to the tab "Parameters" and change the "C:/Dev-Cpp/lib/libws2_32.a" and "C:/Dev-Cpp/lib/libmysql.a" to their correct paths, (look for files in the "lib" folder, and just copy and path).

Now, to compile the .exe, open the .dev (loginserver.dev, charserver.dev, worldserver.dev) and click on the menu "Execute>Rebuild All". And you have the .exe inside the sources folder!

--------7.0----------Multi World

This had to be completely redone because the old version of Multi World did not work. This has now been updated. The only way to get this to work is to edit the source. It's strongly recommended that you know what your doing in the source.

Quote:
This will allow you to configure more than one world/char server, while only running on login server, so you can have 2 servers (Maybe a high and low rate) running off one account database, but with seperate character/item/quest/everything else tables.

You can ignore the extra settings in the conf files unless you want the server to be a slave. To set it up as a slave, make sure to set it's id to something unused, set "serverslave" to 1, change the DATABASE section to the new database (It doesn't need to have a channel or accounts table in it), change the PARENTDB to the main database with the account table, and set everything else up how you would normally set up a server.

This will work for splitting up a server, so that the master is on one PC, and there is a slave on a second. Just make sure to set up the IP's in the config right, and set up your routers port forwarding.
Quote:
#
#-----[ OPEN ]---------------------------------
#
Charserver.conf

#
#-----[ FIND ]---------------------------------
#
servertype=1

#
#-----[ AFTER, ADD ]---------------------------
#
serverslave=0

#
#-----[ FIND ]---------------------------------
#
worldpass=321654

#
#-----[ AFTER, ADD ]---------------------------
#
[PARENTDB]
master_host=
master_user=
master_pass=
master_database=
master_post=3306

#
#-----[ OPEN ]---------------------------------
#
WorldServer.conf

#
#-----[ FIND ]---------------------------------
#
servertype=2

#
#-----[ AFTER, ADD ]---------------------------
#
serverslave=0

#
#-----[ FIND ]---------------------------------
#
worldpass=321654

#
#-----[ AFTER, ADD ]---------------------------
#
[PARENTDB]
master_host=
master_user=
master_pass=
master_database=
master_post=3306

#
#-----[ OPEN ]---------------------------------
#
Char Server/CharPackets.cpp

#
#-----[ FIND ]---------------------------------
#
if(!DoSQL("SELECT username,lastsvr,accesslevel,platinum FROM accounts WHERE id=%i AND password='%s'", thisclient->userid, thisclient->password))
return false;
result = mysql_store_result(mysql);

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
if(!DoSQL("SELECT username,lastsvr,accesslevel,platinum FROM accounts WHERE id=%i AND password='%s'", thisclient->userid, thisclient->password))
return false;
result = mysql_store_result(mysql);
} else {
if(!DoSQLMaster("SELECT username,lastsvr,accesslevel,platinum FROM accounts WHERE id=%i AND password='%s'", thisclient->userid, thisclient->password))
return false;
result = mysql_store_result(mysqlmaster);
}

#
#-----[ FIND ]---------------------------------
#
if(!DoSQL( "SELECT online FROM accounts WHERE username='%s'", thisclient->username ))
return false;
result = mysql_store_result( mysql );

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
if(!DoSQL( "SELECT online FROM accounts WHERE username='%s'", thisclient->username ))
return false;
result = mysql_store_result( mysql );
} else {
if(!DoSQLMaster( "SELECT online FROM accounts WHERE username='%s'", thisclient->username ))
return false;
result = mysql_store_result( mysqlmaster );
}

#
#-----[ FIND ]---------------------------------
#
if(!DoSQL( "update accounts set online=1 WHERE username='%s'", thisclient->username ))
return false;

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
if(!DoSQL( "update accounts set online=1 WHERE username='%s'", thisclient->username ))
return false;
} else {
if(!DoSQLMaster( "update accounts set online=1 WHERE username='%s'", thisclient->username ))
return false;
}

#
#-----[ FIND ]---------------------------------
#
if(!DoSQL("UPDATE accounts SET lastchar='%s' WHERE id=%i", thisclient->charname, thisclient->userid))
return false;
if(!DoSQL("SELECT host,port,lanip,lansubmask FROM channels WHERE id=%u and owner=%u and type=2", thisclient->channel, Config.ServerID))
return false;
result = mysql_store_result( mysql );

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
if(!DoSQL("UPDATE accounts SET lastchar='%s' WHERE id=%i", thisclient->charname, thisclient->userid))
return false;
if(!DoSQL("SELECT host,port,lanip,lansubmask FROM channels WHERE id=%u and owner=%u and type=2", thisclient->channel, Config.ServerID))
return false;
result = mysql_store_result( mysql );
} else {
if(!DoSQLMaster("UPDATE accounts SET lastchar='%s' WHERE id=%i", thisclient->charname, thisclient->userid))
return false;
if(!DoSQLMaster("SELECT host,port,lanip,lansubmask FROM channels WHERE id=%u and owner=%u and type=2", thisclient->channel, Config.ServerID))
return false;
result = mysql_store_result( mysqlmaster );
}

 
MMORPGserverДата: Пт, 10/08/07, 6:05 PM | Сообщение # 2
Admin
Группа: Администраторы
Сообщений: 22
Репутация: 1
Статус: Offline
#
#-----[ OPEN ]---------------------------------
#
Char Server/Charserver.cpp

#
#-----[ FIND ]---------------------------------
#
DoSQL( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQL("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%i,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.CharIP, Config.CharPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to CharServer" );
}

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
DoSQL( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQL("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%i,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.CharIP, Config.CharPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to CharServer" );
}
} else {
DoSQLMaster( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQLMaster("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%i,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.CharIP, Config.CharPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to CharServer" );
}
}

#
#-----[ FIND ]---------------------------------
#
DoSQL( "SELECT host,port,lanip FROM channels WHERE id=%u and type=0", Config.ParentID );
result = mysql_store_result(mysql);

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
DoSQL( "SELECT host,port,lanip FROM channels WHERE id=%u and type=0", Config.ParentID );
result = mysql_store_result(mysql);
} else {
DoSQLMaster( "SELECT host,port,lanip FROM channels WHERE id=%u and type=0", Config.ParentID );
result = mysql_store_result(mysqlmaster);
}

#
#-----[ FIND ]---------------------------------
#
DoSQL( "DELETE FROM channels WHERE id=%u and type=2", thischannel->id );

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
DoSQL( "DELETE FROM channels WHERE id=%u and type=2", thischannel->id );
} else {
DoSQLMaster( "DELETE FROM channels WHERE id=%u and type=2", thischannel->id );
}

#
#-----[ FIND ]---------------------------------
#
Config.SQLServer.pcPort = ConfigGetInt ( file, "mysql_port", 3306 );

#
#-----[ AFTER, ADD ]---------------------------
#
//Master Database
Config.isSlave = ConfigGetInt ( file, "serverslave", 0 );
Config.SQLMaster.pcServer = ConfigGetString ( file, "master_host", "localhost" );
Config.SQLMaster.pcDatabase = ConfigGetString ( file, "master_database", "roseon_beta" );
Config.SQLMaster.pcUserName = ConfigGetString ( file, "master_user", "root" );
Config.SQLMaster.pcPassword = ConfigGetString ( file, "master_pass", "" );
Config.SQLMaster.pcPort = ConfigGetInt ( file, "master_port", 3306 );

#
#-----[ OPEN ]---------------------------------
#
Char Server/Main.cpp

#
#-----[ FIND ]---------------------------------
#
MYSQL mysql;

#
#-----[ AFTER, ADD ]---------------------------
#
MYSQL mysqlmaster;

#
#-----[ FIND ]---------------------------------
#
if(server==NULL)
return -1;

#
#-----[ AFTER, ADD ]---------------------------
#
if (server->Config.isSlave) {
mysql_init( &mysqlmaster );
// Connect mysqlmaster
if ( !mysql_real_connect( &mysqlmaster, server->Config.SQLMaster.pcServer,
server->Config.SQLMaster.pcUserName,
server->Config.SQLMaster.pcPassword,
server->Config.SQLMaster.pcD atabase,
server->Config.SQLMaster.pcPort, NULL, 0 ) )
{
Log( MSG_FATALERROR, "Error connecting to MySQL master server: %s\n", mysql_error( &mysqlmaster ) );
system("PAUSE");
return -1;
}
else
{
Log( MSG_INFO, "Connected to MySQL master server" );
}
server->mysqlmaster = &mysqlmaster;
}

#
#-----[ FIND ]---------------------------------
#
// Close server
#
#-----[ AFTER, ADD ]---------------------------
#
if (server->Config.isSlave)
mysql_close( &mysqlmaster );

#
#-----[ OPEN ]---------------------------------
#
World Server/gmcmds.cpp

#
#-----[ FIND ]---------------------------------
#
DoSQL( "UPDATE accounts SET accesslevel='0' WHERE id=%i", otherclient->PlayerSession->userid);

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave)
DoSQL( "UPDATE accounts SET accesslevel='0' WHERE id=%i", otherclient->PlayerSession->userid);
else
DoSQLMaster( "UPDATE accounts SET accesslevel='0' WHERE id=%i", otherclient->PlayerSession->userid);

#
#-----[ OPEN ]---------------------------------
#
World Server/Main.cpp

#
#-----[ FIND ]---------------------------------
#
MYSQL mysql;

#
#-----[ AFTER, ADD ]---------------------------
#
MYSQL mysqlmaster;

#
#-----[ FIND ]---------------------------------
#
// Connect mysql

#
#-----[ AFTER, ADD ]---------------------------
#
if (server->Config.isSlave) {
mysql_init( &mysqlmaster );
// Connect mysqlmaster
if ( !mysql_real_connect( &mysqlmaster, server->Config.SQLMaster.pcServer,
server->Config.SQLMaster.pcUserName,
server->Config.SQLMaster.pcPassword,
server->Config.SQLMaster.pcD atabase,
server->Config.SQLMaster.pcPort, NULL, 0 ) )
{
Log( MSG_FATALERROR, "Error connecting to MySQL master server: %s\n", mysql_error( &mysqlmaster ) );
system("PAUSE");
return -1;
}
else
{
Log( MSG_INFO, "Connected to MySQL master server" );
}
server->mysqlmaster = &mysqlmaster;
}

#
#-----[ FIND ]---------------------------------
#
// Close server

#
#-----[ AFTER, ADD ]---------------------------
#
if (server->Config.isSlave)
mysql_close( &mysqlmaster );

#
#-----[ OPEN ]---------------------------------
#
startup.cpp

#
#-----[ FIND ]---------------------------------
#
DoSQL("UPDATE accounts set online=0");

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave)
DoSQL("UPDATE accounts set online=0");
else
DoSQLMaster("UPDATE accounts set online=0");

#
#-----[ OPEN ]---------------------------------
#
World Server/Worldclient.cpp

#
#-----[ FIND ]---------------------------------
#
GServer->DoSQL("UPDATE accounts SET online=true where id=%u", PlayerSession->userid );

#
#-----[ REPLACE WITH ]-------------------------
#
if (!GServer->Config.isSlave)
GServer->DoSQL("UPDATE accounts SET online=true where id=%u", PlayerSession->userid );
else
GServer->DoSQLMaster("UPDATE accounts SET online=true where id=%u", PlayerSession->userid );

#
#-----[ FIND ]---------------------------------
#
if(!GServer->DoSQL("update accounts set zulystorage = %i where id = %i", PlayerInfo->Storage_Zulies, PlayerSession->userid))
return;

#
#-----[ REPLACE WITH ]-------------------------
#
if (!GServer->Config.isSlave) {
if(!GServer->DoSQL("update accounts set zulystorage = %i where id = %i", PlayerInfo->Storage_Zulies, PlayerSession->userid))
return;
} else {
if(!GServer->DoSQLMaster("update accounts set zulystorage = %i where id = %i", PlayerInfo->Storage_Zulies, PlayerSession->userid))
return;
}

#
#-----[ OPEN ]---------------------------------
#
World Server/WorldPackets.cpp

#
#-----[ FIND ]---------------------------------
#
if(!DoSQL("SELECT username,lastchar,accesslevel,zulystorage FROM accounts WHERE id=%i AND password='%s'", thisclient->PlayerSession->userid, thisclient->PlayerSession->password))
return true;
result = mysql_store_result(mysql);

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
if(!DoSQL("SELECT username,lastchar,accesslevel,zulystorage FROM accounts WHERE id=%i AND password='%s'", thisclient->PlayerSession->userid, thisclient->PlayerSession->password))
return true;
result = mysql_store_result(mysql);
} else {
if(!DoSQLMaster("SELECT username,lastchar,accesslevel,zulystorage FROM accounts WHERE id=%i AND password='%s'", thisclient->PlayerSession->userid, thisclient->PlayerSession->password))
return true;
result = mysql_store_result(mysqlmaster);
}

#
#-----[ OPEN ]---------------------------------
#
/World Server/WorldServer.cpp

#
#-----[ FIND ]---------------------------------
#
CWorldClient* CWorldServer::CreateClientSocket( )
{
DoSQL( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );

#
#-----[ REPLACE WITH ]-------------------------
#
CWorldClient* CWorldServer::CreateClientSocket( )
{
if (!Config.isSlave)
DoSQL( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );
else
DoSQLMaster( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );

#
#-----[ FIND ]---------------------------------
#
void CWorldServer:eleteClientSocket( CClientSocket* thisclient )
{
DoSQL( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );

#
#-----[ REPLACE WITH ]-------------------------
#
void CWorldServer:eleteClientSocket( CClientSocket* thisclient )
{
if (!Config.isSlave)
DoSQL( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );
else
DoSQLMaster( "UPDATE channels SET connected=%i where id=%i and type=2", ConnectedClients, Config.ServerID );

#
#-----[ FIND ]---------------------------------
#
DoSQL( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQL("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%u,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.WorldIP, Config.WorldPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to WorldServer" );
}

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
DoSQL( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQL("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%u,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.WorldIP, Config.WorldPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to WorldServer" );
}
} else {
DoSQLMaster( "DELETE FROM channels WHERE id=%u and type=%i", Config.ServerID, Config.ServerType );
if(!DoSQLMaster("INSERT INTO channels (id,type,name,host,port,lanip,lansubmask,connected ,maxconnections,owner) VALUES (%i,%i,'%s','%s',%u,'%s','%s',0,%i,%i)",
Config.ServerID, Config.ServerType, Config.ServerName, Config.WorldIP, Config.WorldPort, Config.LanIP, Config.LanSubnet, Config.MaxConnections, Config.ParentID))
{
Log(MSG_WARNING, "Error accessing to database, the other server will not connect to WorldServer" );
}
}

#
#-----[ FIND ]---------------------------------
#
DoSQL( "SELECT host,port,lanip FROM channels WHERE id=%u and type=1", Config.ParentID );
result = mysql_store_result(mysql);

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave) {
DoSQL( "SELECT host,port,lanip FROM channels WHERE id=%u and type=1", Config.ParentID );
result = mysql_store_result(mysql);
} else {
DoSQLMaster( "SELECT host,port,lanip FROM channels WHERE id=%u and type=1", Config.ParentID );
result = mysql_store_result(mysqlmaster);
}

#
#-----[ FIND ]---------------------------------
#
DoSQL("UPDATE accounts SET online=false where id=%u", thisclientwc->PlayerSession->userid );

#
#-----[ REPLACE WITH ]-------------------------
#
if (!Config.isSlave)
DoSQL("UPDATE accounts SET online=false where id=%u", thisclientwc->PlayerSession->userid );
else
DoSQLMaster("UPDATE accounts SET online=false where id=%u", thisclientwc->PlayerSession->userid );

#
#-----[ FIND ]---------------------------------
#
Config.SQLServer.pcPort = ConfigGetInt ( file, "mysql_port", 3306 );

#
#-----[ AFTER, ADD ]---------------------------
#
//Master Database
Config.isSlave = ConfigGetInt ( file, "serverslave", 0 );
Config.SQLMaster.pcServer = ConfigGetString ( file, "master_host", "localhost" );
Config.SQLMaster.pcDatabase = ConfigGetString ( file, "master_database", "roseon_beta" );
Config.SQLMaster.pcUserName = ConfigGetString ( file, "master_user", "root" );
Config.SQLMaster.pcPassword = ConfigGetString ( file, "master_pass", "" );
Config.SQLMaster.pcPort = ConfigGetInt ( file, "master_port", 3306 );

#
#-----[ OPEN ]---------------------------------
#
Common/Socket.h

#
#-----[ FIND ]---------------------------------
#
CROSEServerConfigSQL SQLServer; // SQL Information

#
#-----[ AFTER, ADD ]---------------------------
#
CROSEServerConfigSQL SQLMaster; // SQL Server ref for master server, if a slave
bool isSlave; // Is the server a slave?

#
#-----[ FIND ]---------------------------------
#
bool DoSQL(char *Format, ...); // Do SQL Query

#
#-----[ AFTER, ADD ]---------------------------
#
bool DoSQLMaster(char *Format, ...); // Do SQL Query

#
#-----[ FIND ]---------------------------------
#
pthread_mutex_t sqlmutex;

#
#-----[ AFTER, ADD ]---------------------------
#
MYSQL* mysqlmaster;
pthread_mutex_t sqlmutexmaster;

#
#-----[ OPEN ]---------------------------------
#
Common/Socketserver.cpp

#
#-----[ FIND ]---------------------------------
#
pthread_mutex_init( &sqlmutex, NULL );

#
#-----[ AFTER, ADD ]---------------------------
#
pthread_mutex_init( &sqlmutexmaster, NULL);

#
#-----[ FIND ]---------------------------------
#
pthread_mutex_destroy( &sqlmutex );

#
#-----[ AFTER, ADD ]---------------------------
#
pthread_mutex_destroy( &sqlmutexmaster );

#
#-----[ APPEND TO END OF FILE ]----------------
// Do sql query
bool CServerSocket:oSQLMaster(char *Format, ...)
{
pthread_mutex_lock( &sqlmutexmaster );
char Buffer[1000];
memset( &Buffer, '\0', 1000 );
va_list ap; va_start( ap, Format );
vsprintf( Buffer, Format, ap );
va_end ( ap );
int mres = mysql_query( mysqlmaster, Buffer );
if (mres!=0)
{
Log( MSG_SQL, "Could not execute query: %s", mysql_error( mysqlmaster ) );
Log( MSG_SQL, "Query: %s", Buffer );
int pres = mysql_ping( mysqlmaster );
if(pres!=0)
{
Log( MSG_INFO, "Trying to reconnect to Mysql..." );
if ( !mysql_real_connect( mysqlmaster, this->Config.SQLMaster.pcServer,
this->Config.SQLMaster.pcUserName,
this->Config.SQLMaster.pcPassword,
this->Config.SQLMaster.pcDatabase,
0, NULL, 0 ) )
{
Log( MSG_SQL, "Failed to reconnect to Mysql master server" );
pthread_mutex_unlock( &sqlmutexmaster );
return false;// we should close server?
}
else
{
Log( MSG_INFO, "Reconnected to Mysql master server, Trying to do Query Again..." );
for(UINT i=0;i<3;i++)//will try to make the query 3 times
{
int mres = mysql_query( mysqlmaster, Buffer );
if(mres==0)
{
pthread_mutex_unlock( &sqlmutexmaster );
return true;
}
}
Log( MSG_SQL, "Could not Execute query: %s" ,mysql_error( mysqlmaster ) );
Log( MSG_SQL, "Query: %s", Buffer );
pthread_mutex_unlock( &sqlmutexmaster );
return false; // we should close server?
}
}
}
else
{
Log( MSG_QUERY, "Query: %s", Buffer );
pthread_mutex_unlock( &sqlmutexmaster );
return true;
}
}
Credits to drakia for figuring this one out.

--------8.0----------Extras

This is an document that contains the GM Commands.

Link: GM Commands

This is an Excel/Spreadsheet document that contains the Item ID's.

Link: Item ID's

This ia Text Document that contains all the teleport locations and their Map ID's.

Link: Locations and Map ID's

Here is a .VFS editor, where you can edit your .vfs and client graphics. Such as characters, loading screens, weapons, and lots more. (Credit to aurose)

Link: VFSnextgen

Here are the compiled EXE's incase you loose yours (loginserver.exe, charserver.exe, worldserver.exe)
Link: Compiled EXE's (Rev 60)
- 1/29/07 (Emergency Update)
- 2/8/07 (Updated to Rev 16 new files!)
- 2/11/07 (Updated to Rev 20 new files!)
- 2/20/07 (Updated to Rev 23 files!)
- 2/24/07 (Updated to Rev 25 files!)
- 3/1/07 (Updated to Rev 30 files!)
- 4/4/07 (Updated to Rev 41 files!)
- 4/6/07 (Updated to Rev 45 files!)
- 4/18/07 (Updated to Rev 59 files!)
- 4/30/07 (Updated to Rev 60 files!)

Here are some RARE outfits (armors/clothes). Credit to Intro.

Code:

Durable armour: 38,2-5,9,1,1,1

Cedric Armour: 39,2-5,9,1,1,1

Executioner Armour: 40,2-5,9,1,1,1

Pirate Armour: 551,3-5,9,1,1,1

Silent Walker: 561,3-5,9,1,1,1

Captaian Armour: 571,2-5,9,1,1,1

Trigger hat: 661,2,9,1,1,1

Bomber Armour: 661,3-5,9,1,1,1

Bourgoise Armour: 776(hat),676,3-5,9,1,1,1

Fairy armour:445,3-5,9,1,1,1 551,2 (hat)

Joker Armour: 561,2(hat),461,3-5,9,1,1,1

Mistic Armour: 465,3-5,9,1,1,1,565(hat)

Black Cross Backshield: 770,6,9,1,1,1

White School Girl: 187,3&5,9,1,1,1

Black School: 181,3&5,9,1,1,1

Dolphin: 769,6,9,1,1,1

Kerokero Umbrella: 768,6,9,1,1,1

Thor's Bass Drum: 767,6,9,1,1,1

Elementary School Bag: 766,6,9,1,1,1

Astrot Pink Wing: 764,6,9,1,1,1

Astrot White Wing: 763,6,9,1,1,1

Astrot Silver Wing: 762,6,9,1,1,1

Cart Racer Vest: 130,2-5,9,1,1,1

Blue Santa: 180,3-5,9,1,1,1

GM Suit: 151,2-5,9,1,1,1

Nobel Lord: 132,2-5,9,1,1,1

Magic School Hat: 824,2,9,1,1,1

Angel Hat: 825,2,9,1,1,1

Kerokero Hat: 826,2,9,1,1,1

Headband: 827,2,9,1,1,1

Yukata: 188,3,9,1,1,1

Trendy Swim Suit: 182,3,9,1,1,1

pRose soccer: 174,3,9,1,1,1

NArose soccer: 173,3,9,1,1,1

jRose soccer: 172,3,9,1,1,1

kRose soccer: 171,3,9,1,1,1

rose soccer: 170,3,9,1,1,1

Yellow Rubber Boots: 182,5,9,1,1,1

Wooden Shoes: 183,5,9,1,1,1

White Magic School Shoes: 188,5,9,1,1,1

Durable Gloves: 38,4,9,1,1,1

White magic school gloves: 186,4,9,1,1,1

Cherry Blossem Glasses: 166,1,9,1,1,1

Snow Board: 37,9,9,1,1,1

Goblin Hatchet: 150,8,9,1,1,1

Reams Puricator: 182,8,9,1,1,1

Pink Guitar: 462,8,9,1,1,1

Angel Recorder: 463,8,9,1,1,1

Rose Beuque: 464,8,9,1,1,1

blue santa hat: 823,2,9,1,1,1

Pigtail ribbon: 833,2,9,1,1,1

Students cap: 834,2,9,1,1,1

White lion: 835,2,9,1,1,1

Chef hat: 836,2,9,1,1,1

Summer school look: 189,3,9,1,1,1

tiger backshield: 246,6,9,1,1,1

snowball: 326,10,9,1,1,1

firecracker: 930,10,9,1,1,1

(2,376,3rd job helmit,soldier

(3,376,3rd job armour,soldier

(4,376,3rd job gloves,soldier

(5,376,3rd job boots,soldier

(2,476,3rd job helmit,muse

(3,476,3rd job armour,muse

(4,476,3rd job gloves,muse

(5,476,3rd job boots,muse

(2,576,3rd job helmit,Dealer

(3,576,3rd job armour,Dealer

(4,576,3rd job gloves,Dealer

(5,576,3rd job boots,Dealer

(2,676,3rd job helmit,Hawker

(3,676,3rd job armour,Hawker

(4,676,3rd job gloves,Hawker

(5,676,3rd job boots,Hawker

--------9.0----------Problems and Errors

Server Side

1.) How do I change the EXP, DROP, ZULY rate?
Solution: Inside the worldserver.conf are options to change the rates.

2.) How do I change the Welcome Message when I login?
Solution: You can change the Welcome message inside the worldserver.conf

3.) My WorldServer.exe keeps crashing!
Solution: You are missing some files, or you compiled it wrong. Re-extract the files, or if you compiled, check your sources again.

4.) When I try to connect with Navicat, it says it can't connect to MySQL!
Solution: You need to install MySQL. Download here: MySQL 5.0

Client Side

1.) When I launch my client, it just crashes with the error "Send/Don't Send"!
Solution: Run "TriggerDetect.exe" and fill out your graphics settings (only need to do this once)

2.) After I type in my account and password and click login, and stays at "Logging in" forever!
Solution: Make sure you have the launcher file set to your correct IP. And check your .confs and make sure the IP's are correct (your WAN IP).

3.) All my IP's are correct, but I still can't login!
Solution: You need to port forward your Rose Online ports. Go to PortForward.com - Free Help Setting up Your Router or Firewall and find your router, it will instruct you on how to port forward.

The ports you need to forward are: 29000, 29100, 29200
If your using the multi world, you need to forward: 29000, 29100, 29200, 29101, 29201

4.) When I try to login, I get "The Servers are currently undergoing maintenance"
Solution: Make sure your using the latest Rose EVO client and server files, and your ports or forwarded and that you have applied the GameGuard patch (new at 4/28/07) after your last client update.

5.) After I select the server, it says "Loading Avatar Selection.." forever!
Solution: Make sure your have port forwarded.

The ports are: 29000, 29100, 29200.

Web Server Side

1.) When I type "http://localhost" , nothing shows up and xampp_start.exe is running!
Solution: You need to port forward a port. Go to PortForward.com - Free Help Setting up Your Router or Firewall and find your router, it will instruct you on how to port forward.

The ports you need to forward are: 80

2.) I installed PHP, and Xampp, and port forwarded and "http://localhost" still isn't working!
Solution: Restart your computer and your router

3.) On the Rose Online Web, I fill in the details to make my account, and I click "Create" but it doesn't create the account!
Solution: Go back inside the config file and double check to make sure your database settings are absolutely correct.

4.) How can I allow other people to see my website, instead of "http://localhost" ?
Solution: Port forward the port "80" and instead of "http://localhost", use your WAN IP (which you can find here: http://whatismyip.org ).

For example: "http://localhost" http://yourwanip

--------10.0----------Notes

- I believe I have credited anyone that I used information from, if not please PM me and I will add it.

- Please do not add me on MSN or Spam my PM box, I will not help you over an Instant Messaging program. Just post here and I will help you.

- If you have anything you would like to add to this, please PM it to me and I'll be sure to add it in!

- If you find something that is incorrect inside this guide, please post here or PM me and I will fix it right away.

- If any of the links go dead, let me know and I'll re-upload them.

- I will ALWAYS update the links once a new update comes.

All these files are for the newest version which is ver 141, and everything works with the newest 141 client! Even the new drops. Once a new release (client/server) is released, I will update the links and you can check the update information that I will post in every edit below.

If the guide is a bit confusing for you, let me know and I'll try and make it easier. At the moment I'm going through and trying to make the SQL part a bit easier for you to understand.

Thank you, and hope this helps lots of people.
Reply With Quote

 
MMORPG FORUM » MMORPGserver » ROSE Online » All kinds of ROSE Info and Downloads
  • Страница 1 из 1
  • 1
Поиск: