The Mu Server basics

Publicar nuevo tema   Responder al tema

Ver el tema anterior Ver el tema siguiente Ir abajo

The Mu Server basics

Mensaje por Admin el Miér Mar 18, 2015 3:15 pm

================================
The Mu Online Server Files Explanation
================================


I am not going to explain how to setup a server or where should you download stuff from - there are countless guides and download centers in this forum on that topic. This guide is about understanding what exactly the mu server files do or more specific what role does each file play in its "cycle".

Contents

The database
The Microsoft SQL database server.
The Mu Online database
The ODBC data source
The Connect Server (CS.exe in most files)
Role of the The Data Servers
The data configuration
Items
Gate
Monsters
Spawns
Shops
Warps
Event bags
Map Server Info
Role of the External DB (ExDB)
Role of the Join Server
A mu web page
Sub-Servers
Creating a limited user server
Conclusion & Credits.
-----------------------------------------------------------------------------------------------------

Chapter 1.1 - The Microsoft SQL database server

SQL Stands for S tructured Q uery L anguage. The MsSQL server is considered as fast/stable/multi-functional and easy to operate and that makes it a perfect place to store our database. However, the server has its security issues thats why i give a bit of an advice to everyone that might use it to make sure that it has all internal access blocked (leave it only access able by the server's address(es)). If you need information on the server queries read the help file which is installed among with the server.


Chapter 1.2 - The Mu Online database

This database is constructed in an rather easy to edit way - also it easy quite easy to understand what is what around there. The basic tables that are required to run normally a mu server are: (AccountCharacter, Character, MEMB_INFO, warehouse, Guild, GuildMember, VI_CURR_INFO) these 7 tables make the server playable and access able error-less by everyone, however if you are using new versions with their databases you should see tables like (MuCastle_*, MuCrywolf_DATA, T_*). Also a table that is not critical but is recommendable to keep user information stored is MEMB_STAT.
What does each table do?

[ AccountCharacter ] -> Stores information about the characters in this account, their order and the last one used.
[ Character ] -> Stores information about the characters in the server such as: Char name, Level, Experience, Current location, PK's, Stats, Items in inventory..etc.. you get the point
[ MEMB_INFO ] -> The account information..name,email,password and other personal data.
[ warehouse ] -> The account personal storage space data. (Items, Cash)
[ Guild ] -> Guild data ( Name, Score, Master, Logo )
[ GuildMember ] -> Character's guild membership and their place in the guild (eg gm/battle master..)
[ VI_CURR_INFO ] -> Used by the payed servers to manage who has his account active and who hasn't.
[ MEMB_STAT ] -> Stores some account info like (Last ip used, last time connected/disconnected, The last accessed server)
I will not comment the new version fields.

Items in the database:
The items (inventory,warehouse) in the muonline database are stored in a var binary valued field. Each item has length of 10bin symbols or 20varchar symbols.
An example item is
-----------------------------
42 52 FF 22222222 84 0000 (Pad gloves+10+8+Reflect)
42 -> Item category (eg boots/swords/staffs/gloves/etc..) and the item id
52 - > Item Level/Option/Luck/Skill
FF -> Item Durability
22222222 -> Item Serial Code (With every new item that drops in the server a mssql procedures is triggered, which increases the values of items dropped in the server by 1(one) and generated a hex value for the item serial. This is useful for preventing item duplications and to specific items.
84 -> Item Excellent option/ Second type (for some items) and value of an option>+16
0000 -> Ancient Item Data
-----------------------------
Editing/adding items "by hand" will be really annoying, thats why people have worked hard to make good editors for this purpose (search to find some).

The developers at webzen have though that it will be best if they make the game server and login server to execute procedures instead of full queries. You can edit them if you know what you are doing to create some fun and/or useful features.


Chapter 1.3 - The ODBC Data Source

The data servers connect to the Microsoft sql server through the ODBC ( O pen D ata B ase C onnectivity). The average 2DB server has only 6 System DNS( D ynamic N ame S ervices) which are: MU_2003_EVENT_DB,MuOnline,MuOnlineJoinDB,Ranking,RANKING_DATA,UseLog. From these your critical one is only "MuOnline". You can set all of these dns to the muonline database and input the required procedures/tables to that database. You can also change the name of the original "MuOnline" db to "SavoysDB" for eg.


Chapter 2 - The Connect Server

WebZen's connect server is really well built. Its purpose: showing the client the current active servers, connecting users to the joinserver, its easy to setup and operate. There are a few alternative connect servers going around the mu community but note that nothing surpasses the original in any point. Just because something is new and fresh, doesn't always means that it is the better choice.


Chapter 3 - Role of the Data Server

The mu data server play the connectivity role in the cycle. It connects to the ODBC and transfers data from it to the JS/GS and visa versa. A mu server requires ONLY 1(one) dataserver to run properly. But people usually run two because they overheard that its important (actually its sort of .. its usually important in case the first one loses connectivity or crashes .. then the members cannot login the game or save their character data (for those who are currently online)).


Chapter 4.1 - The Data Configuration (items)

The items.txt file (Usually stored in data/lang/kor/item(kor).txt) stores every item's data such as (Armor/Damage/Drop able or not/Drop able fro level mobs+?/class(es) usable by/Requirements). This file can be edited and its data will be fetched by the gameserver once it reloads his options from the console. However changing these values will not result in client text modification. Users will still see the same item data in their clients while playing (it will not be correct though). You cannot add items within this file cause of the things you must do to make a certain item defined (In the gameserver.exe,main.exe,data/local/item.bmd,the skin). For now i don't know anyone capable of doing this.


Chapter 4.2 - The Data Configuration (gate)

Gate.txt, a file that is very useful for customizing your server. Its purpose is to transfer a player from one point (one he reaches it) to another destination point. Also it contains the coordinates of the /move,warp locations.
Here is an example of what a gate looks like. This is the warp gate for the lost tower
================================
42 0 4 203 70 213 81 0 0 80
================================
42 - GateID, Must be only one gate line with this id(UNIQUE)
0 - Means that this is a warp gate, This value can be 0,1,2 ( 0 -warp, 1 -move to somewhere with no path where you came from, 2 -return to a specific gate where you came from)
4 - The map Number (In this case 4- lost tower)
203 70 - x1,y1 (warp path)
The server randomizes the location from x1,y1 to x2,y2
203 70 - x2,y2 (warp path)
0 - Destination gate ID
0 - where do we come 4m ? map number
80 - Character Level required to use the gate
================================


Chapter 4.3 - The Data Configuration (Monsters)

The biiiig baaad mobs. Huh.. Monsters.txt is like items(kor).txt. Its values can be modified and accept modifications by the server but still you cannot add any new mobs for the same reason as i explained a few lines above.
Explanation of a monster. Isn't he bad??? This time i won't use colors, excuse me.
0 1 "BullFighter" 6 100 0 16 20 6 0 28 6 3 0 1 5 400 1600 10 2 130 10 6 0 0 0 0 0
0 - The Monster ID
1 - WTF? always is 1
"BullFighter" - Name of the mob, Quotes are required
6 - Monster Level, This indicates the amount of experience the mob will give, the zen drop.
100 - The amount of hp the mob has
0 - The amount of mp the mob has
16 - Minimum damage
20 - Maximum Damage
6 - Defense
0 - Magic Skill
28 - Attack
6 - Attack Success Rate (DSR)
3 - Move range (he doesn't get around does he) - nerd !! -.-
0 - Type Of the attack
1 - Attack Range 0 (melee)
5 - Vision Range ( Will attack you when sees you in _ within it )
400 - Move Speed ( I don't think this is functioning properly )
1600 - Attack Speed
10 - Respawns in (?) seconds
2 - Attribute (Can be 0/1/2)
130 - Item Rate, drops items which level are <= the Item rate lvl
10 - Move rate
6 - Max items it should drop
0 - Uses a skill (0-n,1-y)
0 0 0 0 - Special skill ids
===============================



Chapter 4.4 - The Data Configuration (spawns)

MonsterSetBase.txt - this file requires some attention when editing in order to achieve a success in your results not only some mobs wondering around.
There are 5 types of spawn types.
0 - NPC's and traps
Example: 100 1 0 117 99 1
100 - The Monster ID
1 - The Map ID
0 - Move Distance
117 99 - Coordinates (X, Y)
1 - Monster turn position when spawn
1 - Massive Spawns - Spawn More Than one Mob at the same time
Example: 143 1 60 50 2 50 119 -1 42
100 - The Monster ID
1 - The Map ID
60 - Move Distance
50 2 - Minimum Spawn Coordinates (X1,Y1)
50 119 - Maximum Spawn Coordinates (X2,Y2)
-1 - Monster turn position when spawn (-1 means random)
42 - Number of mobs to spawn within X1,Y1 and X2,Y2 (rand distances)
2 - Normal Spawn - same format as " NPC's and traps "
3 - Event bosses - same format as " Massive Spawns "
4 - BC/CC/DS/Kalima and others - same format as " NPC's and traps "
A typical massive spawn should look like this
1
143 1 60 50 2 50 119 -1 42
end
==============================


Chapter 4.5 - The Data Configuration (Shops)

Shop*.txt, this is how every shop is named.
Here is what every file stands for
shop0.txt -> Hanzo the Blacksmith
shop1.txt -> Lorencia barmaid
shop2.txt -> Pasi the wizard
shop3.txt -> Peddler ( lorencia exit )
shop4.txt -> Peddler ( near the river )
shop5.txt -> Potion Girl
shop6.txt -> dAvias barmaid
shop7.txt -> Davias wizard shop
shop8.txt -> Davias Weapon merchant
shop9.txt -> Yoda aka the weapon shop in noria
shop10.txt -> The other lady shop in noria (wtf was she named ^^)

Here is how a shop record looks like
================
7 5 0 155 0 1 3
7 - Item Category
5 - Item ID
0 - Item Level (0-13)
155 - Durability (0-255)
0 - skill (0-1)
1 - Luck (0-1)
3 - Option (1-7) (3=+12)
================

Chapter 4.6 - The Data Configuration (Warps)

The new server files have the great ability for you to add your own moving gate. Eg /move TheLandOfTheMoronsWhoAreTypingThis
open movereq.txt, add at the bottom
31 "TheLandOfTheMoronsWhoAreTypingThis" TheLandOfTheMoronsWhoAreTypingThis 20000 40 81

Lets define
31 - The Move number ( MUST BE UNIQUE )
TheLandOfTheMoronsWhoAreTypingThis - alias of the entry
20000 - Rob the user XXX Amount of zen
40 - Level required to warp
81 - The gate ID ( Make one in gate.txt )
===========================


Chapter 4.7 - The Data Configuration (Event bags)

If you want the boxes in your server to drop not only the default data, then here is where you edit.
eventitembag.txt -> Box Of Luck
eventitembag2.txt -> Death King And Death Bone drops
eventitembag3.txt -> Box Of Heaven
eventitembag4.txt -> Star Of birth
eventitembag5.txt -> Heart Of Love and Fire Cracker
eventitembag6.txt -> Golden Medal
eventitembag7.txt -> Silver Medal
eventitembag8.txt -> Box Of Kundun +1
eventitembag9.txt -> Box Of Kundun +2
eventitembag10.txt -> Box Of Kundun +3
eventitembag11.txt -> Box Of Kundun +4
eventitembag12.txt -> Box Of Kundun +5
eventitembag17.txt -> The kundun demon in kalima
eventitembag18.txt -> The HuntZone (n/a) event
eventitembag19.txt -> The Senior mix

Editing it
5 11 0 3 1 1 1 0
5 - Item Category
11- Item ID
0 - Min level
3 - Max level
1 - skill (0-1)
1 - Luck (0-1)
1 - Option (1-7) (1=+4)
0 - Excellent (0-1)
==============================


Chapter 4.8 - The Data Configuration (Map Server Info)

The MapServerInfo.dat is a file that is used to redirect users from one sub server to another without requiring the user to relog or anything. The redirect is triggered once the user warps into a map that is in the configuration. Editing the file is confusing but easy.
Lets suppose we enter the following data:
=========================================
0
0 0 1 S xxx.xxx.xxx.xxx 55901
1 0 1 S xxx.xxx.xxx.xxx 55903
end
=========================================
The definition of each value:
=========================================
0 - The sub server list
X[0,1] - The ID (Unique)
0 - The Group ID, while another group is submitted, until the user is within that group he will still go by the rules of the sub servers in that group, once he goes in another group, as followed he goes by that group's rules
1 - This value indicates the initial setting of that sub server. It can be:
-1 -> There is a problem with the connection. Connect to the first server in the group that has a possibility to accept the connection
0 -> There is a problem with the connection. Connect to one random server from the group.
1 -> The connection is perfect, should connect to it with no problem.
xxx.xxx.xxx.xxx - The Sub Server Ip Address
55901/ 55901 - The Sub Server Port
end - Ends the listing
=========================================
=========================================
1
0 0 30 1
1 0 30 1
end
=========================================
1 - Map lists
0/1 - The Server ID (Configured in paragraph #0) - from where the user must be located to use this line
0 - Is it warp able Y/N ?
30 - The Map ID ( In this case Valley Of Loren )
1 - Move to a server ID - destination
=========================================

Chapter 5 - Role Of The ExDB Server

The external database server is used to send to the gameserver information such as (Friend list, Mussenger , Guild Data + player guild memberships).


Chapter 6 - Role Of The Join Server

This server is used to connect members to the gameserver. Its a key program for the mu server, once a user logins in the server the JS indicates him as "online" and a second user cannot use this account. It also has a console (not so nice interfaced) from which you can disconnect servers, reload gameserver data and disconnect online users.


Chapter 7 - A mu web page

These days its easy to find a comfortable web page for your server, however not every page is working with every version of the mu database and not every page suites everyones needs or/and is secure enough. You can improve your page by using my little release over [ here ] - this way you will be sure that no of those little "hacker" can screw your server right in the ass. Right now I am developing my own little web page that i would state without any doubt that would be wonderful for any type of servers. If you want to see how far have i got with the project click the dot ( . ) and the other dot to take a peek into the admin panel ( . ). This is not a server ad. Don't take it as one. This web is not ready for a pub release for now. Sowwy mates. Wish me luck on making it for pubbies ^^.



Chapter 8 - Sub-Servers

The mu sub server is an addition to the original server with the same database BUT with other custom values that can be set by the server administrator. In order to create a sub server you must simple open two more dataservers using two port that is not used (DS1 port = XXXX, DS2 port = XXXX+2). Then you should make a copy of the /gameserver/ and /data/ folders to another folder, then create a shortcut of the gameserver and set its target shortcut to look like (127.0.0.1 55970 127.0.0.1 "DATASERVER PORT -XXXX" "new gameserver port") - DO NOT count the quotes..
After that define your new subserver in the Connect Server config using ur IP:PORT. Now when you have done that goto the /data/ServerInfo.dat and set the new server id( same as you entered in the Connectserver config)..now run the dataservers, and second gamesever and voalla.. Done:)


Chapter 9 - Limited Server

Creating a limited user server is quite easy. Just goto the serverinfo.dat and set ConnectMembLoad =1, Now enter every account you wish to have access to that server in ConnectMember.txt (Separate by new lines)


Chapter 10 - Conclusion and Credits

Thats the basic stuff i think you should know about the mu online server. Hope i helped someone (Anyone at all.) Wish your mu server becomes great.

All credits for this guide goto: me( Savoy )
avatar
Admin
Admin

Mensajes : 315
Fecha de inscripción : 28/08/2013
Edad : 32
Localización : Argentina

Ver perfil de usuario http://mumelon.activo.in

Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba

- Temas similares

Publicar nuevo tema   Responder al tema
 
Permisos de este foro:
Puedes responder a temas en este foro.