您当前的位置:首页 > 魔域技术

魔域服务器MSG源码数据库中相应代码详细说明攻略

本文出处:网游动力作者:本站发布时间:2016-07-06阅读次数:

 对于一些具有丰富魔域私服修改经验的gm来说MSG源码数据库并不是一个陌生的东西,因为在这里我们能够收集到大量关于服务器中游戏的相关数据。而数据分析对于任何一个魔域私服gm来说都是最重要的一环,只有通过大量的数据分析我们才能知道玩家喜欢什么不喜欢什么。也只有这样我们才能给玩家提供一个更好的游戏环境,其实开服就是这样的一个简单的东西,知道对方喜欢什么然后我们将对方喜欢的东西分在对方面前。

# attack_user - 0: escape only; 
1: passive; // 被动攻击 
2: active; // 主动攻击 
4: good; // 正义的(卫兵或玩家召唤和控制的怪物) 
8: guard; // 卫兵 
16: pk_killer; // 追杀黑名 
32: jump; // 会跳 
64: fixed // 不会动的 
128: fastback, // 速归 
256: lockuser(auto_die), for task monster // 锁定攻击指定玩家,玩家离开自动消失 
512: lockone, // 锁定攻击首先攻击自己的玩家 
1024: add_life, // 自动加血 
2048: evil_killer, // 白名杀手 
4096: wing, // 飞行状态 
8192: neutral, // 中立的 
16384: roar, // 出生时全地图怒吼 
32768: no escape, // 不会逃跑 
65536: equality, // 不藐视   
# attack_max/attack_min - attack with weapon, or power of magic when magic_type 
# magic_type - send to client type, need not cq_magictype. 
# recruit magic npc - magic_type=1020, magic_hitrate=percent(10 -> 10%) 
# ai_type - for call pet ai, use by client only 
# defence2 - danage = danage * defence2 / 10000 
# Table structure for table 'cq_pet' 
 
DROP TABLE IF EXISTS cq_pet; 
CREATE TABLE cq_pet ( 
id int(4) unsigned zerofill NOT NULL auto_increment, 
ownerid int(4) unsigned zerofill NOT NULL default '0000', 
ownertype tinyint(3) unsigned zerofill NOT NULL default '000', 
generatorid int(4) unsigned zerofill NOT NULL default '0000', 
typeid int(4) unsigned zerofill NOT NULL default '0000', 
name char(15) binary NOT NULL default '无', 
life smallint(2) unsigned zerofill NOT NULL default '0000', 
mana smallint(2) unsigned zerofill NOT NULL default '0000', 
recordmap_id int(4) unsigned NOT NULL default '0000', 
recordx smallint(2) unsigned NOT NULL default '0000', 
recordy smallint(2) unsigned NOT NULL default '0000', 
data int(4) unsigned NOT NULL default '0000', 
PRIMARY KEY (id) 
) TYPE=MyISAM; 
# ownertype - 1: user, 2: syndicate, 3: npc 
# typeid - id of cq_monstertype 
 
 
# Table structure for table 'cq_map' 
 
DROP TABLE IF EXISTS cq_map; 
CREATE TABLE cq_map ( 
id int(4) unsigned NOT NULL default '0', 
name varchar(15) binary NOT NULL default '未命名', 
describe_text varchar(127) binary NOT NULL default '', 
mapdoc int(4) unsigned NOT NULL default '0', 
type int(4) unsigned zerofill NOT NULL default '0', 
owner_id int(4) unsigned NOT NULL default '0', 
mapgroup int(4) unsigned zerofill NOT NULL default '0', 
idxserver int(4) NOT NULL default '-1', 
weather int(4) unsigned zerofill NOT NULL default '0', 
bgmusic int(4) unsigned zerofill NOT NULL default '0', 
bgmusic_show int(4) unsigned zerofill NOT NULL default '0', 
portal0_x int(4) unsigned zerofill NOT NULL default '0000', 
portal0_y int(4) unsigned zerofill NOT NULL default '0000', 
reborn_mapid int(4) unsigned zerofill NOT NULL default '0000', 
reborn_portal int(4) unsigned zerofill NOT NULL default '0000', 
res_lev tinyint(3) unsigned NOT NULL default '0', 
 
 
owner_type tinyint(3) unsigned NOT NULL default '0', 
link_map int(4) unsigned zerofill NOT NULL default '0000', 
link_x smallint(2) unsigned zerofill NOT NULL default '0000', 
link_y smallint(2) unsigned zerofill NOT NULL default '0000', 
del_flag tinyint(1) unsigned NOT NULL default '0', 
PRIMARY KEY (id), 
KEY idx(idxserver,mapgroup) 
) TYPE=MyISAM; 
DROP TABLE IF EXISTS cq_dynamap; 
CREATE TABLE cq_dynamap ( 
id int(4) unsigned NOT NULL default '0' auto_increment, 
name varchar(15) binary NOT NULL default '未命名', 
describe_text varchar(127) binary NOT NULL default '', 
mapdoc smallint(4) unsigned NOT NULL default '0', 
type int(4) unsigned zerofill NOT NULL default '0', 
owner_id int(4) unsigned NOT NULL default '0', 
mapgroup tinyint(4) unsigned zerofill NOT NULL default '0', 
idxserver tinyint(4) NOT NULL default '-1', 
weather tinyint(4) unsigned zerofill NOT NULL default '0', 
bgmusic tinyint(4) unsigned zerofill NOT NULL default '0', 
bgmusic_show tinyint(4) unsigned zerofill NOT NULL default '0', 
portal0_x smallint(4) unsigned zerofill NOT NULL default '0000', 
portal0_y smallint(4) unsigned zerofill NOT NULL default '0000', 
reborn_mapid int(4) unsigned zerofill NOT NULL default '0000', 
reborn_portal tinyint(4) unsigned zerofill NOT NULL default '0000', 
 
 
res_lev smallint(4) unsigned NOT NULL default '0', 
owner_type tinyint(3) unsigned NOT NULL default '0', 
link_map int(4) unsigned zerofill NOT NULL default '0000', 
link_x smallint(2) unsigned zerofill NOT NULL default '0000', 
link_y smallint(2) unsigned zerofill NOT NULL default '0000', 
del_flag tinyint(1) unsigned NOT NULL default '0', 
PRIMARY KEY (id) 
) TYPE=MyISAM; 
INSERT cq_dynamap SET id=1000000,name='RESERVE_ID_SPACE'; 
# enum ENUM_MAPTYPE { 
MAPTYPE_NORMAL = 0x0000, 
MAPTYPE_PKFIELD = 0x0001, 
MAPTYPE_CHGMAP_DISABLE = 0x0002, 
MAPTYPE_RECORD_DISABLE = 0x0004, 
MAPTYPE_PK_DISABLE = 0x0008, 
}; 
 
# Table structure for table 'cq_portal' 
 
DROP TABLE IF EXISTS cq_portal; 
CREATE TABLE cq_portal ( 
id int(4) unsigned zerofill NOT NULL auto_increment, 
mapid int(4) unsigned zerofill NOT NULL default '0000', 
portal_idx int(4) unsigned zerofill NOT NULL default '0000', 
pos_x int(4) unsigned zerofill NOT NULL default '0000', 
pos_y int(4) unsigned zerofill NOT NULL default '0000', 
PRIMARY KEY (id), 
KEY mapid(mapid) 
) TYPE=MyISAM; 
 
 
# Table structure for table 'cq_passway' 
# 内容来自dedecms 
 
DROP TABLE IF EXISTS cq_passway; 
CREATE TABLE cq_passway ( 
id int(4) unsigned zerofill NOT NULL auto_increment, 
mapid int(4) unsigned zerofill NOT NULL default '0000', 
passway_idx int(4) unsigned zerofill NOT NULL default '0000', 
target_mapid int(4) unsigned zerofill NOT NULL default '0000', 
target_mapportal int(4) unsigned zerofill NOT NULL default '0000', 
PRIMARY KEY (id), 
KEY mapid(mapid) 
) TYPE=MyISAM;  
 
 
# Table structure for table 'cq_region' 
#   
 
DROP TABLE IF EXISTS cq_region; 
CREATE TABLE cq_region ( 
id int(4) unsigned zerofill NOT NULL auto_increment, 
mapid int(4) unsigned zerofill NOT NULL default '0000', 
type int(4) unsigned zerofill NOT NULL default '0000', 
bound_x int(4) unsigned zerofill NOT NULL default '0000', 
bound_y int(4) unsigned zerofill NOT NULL default '0000', 
bound_cx int(4) unsigned zerofill NOT NULL default '0000', 
bound_cy int(4) unsigned zerofill NOT NULL default '0000', 
datastr varchar(15) binary NOT NULL default '', 
data0 int(4) unsigned zerofill NOT NULL default '0000', 
data1 int(4) unsigned zerofill NOT NULL default '0000', 
data2 int(4) unsigned zerofill NOT NULL default '0000', 
data3 int(4) unsigned zerofill NOT NULL default '0000', 
PRIMARY KEY (id), 
KEY mapid(mapid) 
) TYPE=MyISAM; 
# mapid - is mapdoc 
# type: 
# 1 - city. record position disable, magic call player disable. 
 
 
# 2 - weather. data0(2): Type, data1(200): Intensity(0-999), data2(10): dir(0-359), data3(0x00ffffff): nColor, data1<0: fast change. 
# type - enum { WEATHER_NONE=0, WEATHER_FINE, 
# WEATHER_RAINY, WEATHER_SNOWY, WEATHER_SANDS, 
# WEATHER_LEAF, WEATHER_BAMBOO, WEATHER_FLOWER, 
# WEATHER_FLYING, WEATHER_DANDELION, WEATHER_WORM, WEATHER_CLOUDY, 
# WEATHER_ALL}; 
 
# Table structure for table 'cq_magictype' 
 
DROP TABLE IF EXISTS cq_magictype; 
CREATE TABLE cq_magictype ( 
id int(4) unsigned zerofill NOT NULL auto_increment, 
type int(4) unsigned zerofill NOT NULL default '0000', 
sort int(4) unsigned zerofill NOT NULL default '0000', 
name varchar(15) binary NOT NULL default '', 
crime tinyint(1) unsigned zerofill NOT NULL default '0', 
ground tinyint(1) unsigned zerofill NOT NULL default '0', 
multi tinyint(1) unsigned zerofill NOT NULL default '0', 
target int(4) unsigned zerofill NOT NULL default '0000', 
level int(4) unsigned zerofill NOT NULL default '0000', 
use_mp int(4) unsigned zerofill NOT NULL default '0000', 
power int(4) NOT NULL default '0000', 
intone_speed int(4) unsigned zerofill NOT NULL default '0000', 
percent int(4) unsigned zerofill NOT NULL default '0000', 
step_secs int(4) unsigned zerofill NOT NULL default '0000', 
range int(4) unsigned zerofill NOT NULL default '0000', 
 
 
distance int(4) unsigned zerofill NOT NULL default '0000', 
status int(4) unsigned zerofill NOT NULL default '0000', 
need_prof int(4) unsigned zerofill NOT NULL default '0000', 
need_exp int(4) NOT NULL default '0000', 
need_level int(4) unsigned zerofill NOT NULL default '0000', 
use_xp tinyint(3) unsigned zerofill NOT NULL default '000', 
weapon_subtype int(4) unsigned zerofill NOT NULL default '0000', 
active_times int(4) unsigned zerofill NOT NULL default '0000', 
auto_active tinyint(3) unsigned zerofill NOT NULL default '000', 
floor_attr int(4) unsigned zerofill NOT NULL default '0000', 
auto_learn tinyint(1) unsigned zerofill NOT NULL default '0', 
learn_level int(4) unsigned zerofill NOT NULL default '0000', 
drop_weapon tinyint(1) unsigned zerofill NOT NULL default '0', 
use_ep int(4) unsigned zerofill NOT NULL default '0000', 
weapon_hit tinyint(1) unsigned zerofill NOT NULL default '0', 
use_item int(4) unsigned zerofill NOT NULL default '0000', 
next_magic int(4) unsigned zerofill NOT NULL default '0000', 
delay_ms int(4) unsigned zerofill NOT NULL default '0000', 
use_item_num int(4) unsigned zerofill NOT NULL default '0001', 
width int(4) unsigned zerofill NOT NULL default '0000', 
durability int(4) unsigned zerofill NOT NULL default '0001', 
PRIMARY KEY (id) 
) TYPE=MyISAM; 
# type: 类型 
# 10000~10255 - 武器魔法,即cq_itemtype中的magic1+10000 
 
# sort: 行为分类。 
# 1 - 攻击单人,对方去血, check floor attr, support drop_weapon in weapon skill。(support xp skill) 
# 2 - 回复,加血。(support auto active), (support team member with multi flag) 
# 3 - 十字型区域目标去血。 
# 4 - 扇形区域目标去血。(support xp skill)(SizeAdd effective)(support auto active of random mode) 
# 5 - 圆形区域目标去血。(support ground type) 
# 6 - 攻击单人,对方加状态。 
# 7 - 回复单人,对方去状态。 
# 8 - range of square, multi target, (support xp skill)(support ground type)(SizeAdd effective) 
# 9 - jump & attack, single target, (support xp skill)(support ground type) 
# 10 - random transmit, power is max distance. 
# 11 - dispatch xp 
# 12 - collide, (support xp skill only) 
# 13 - serial cut, ground type only. (auto active, support xp skill & weapon skill) 
# 14 - line, (support weapon skill, power is number of life expended)(support auto active of random mode) 
# 15 - add attack range, (auto active only, forever effect) 
# 16 - attack with temp status, weapon skill only 
 
 
# support status: attack | defence | be damage with weapon | attack rate | stop | vampire (other status is attack target and attach this status), 
# support auto active of random mode, only for weapon_hit=0 
# 17 - call team member. 
# 18 - record map position to trans spell. 
# 19 - transform to monster, (monster_type == power) 
# 20 - add mana, (power is add number, support self target only) 
# 21 - lay trap, power is trap_type. 
# 22 - dance, (use for client) 
# 23 - call pet, power is monster type. step_secs is alive secs for pet, 0 for keep alive. 
# 24 - VAMPIRE. use for call pet. 
# 25 - INSTEAD. use for call pet. 
# 26 - decrement life. power is data or percent of current life. 
# 27 - ground sting. 
# range: 
# 106 - 表示主方向为6,次方向为1 
 
# power: 
# (-29999)-29999 - add or sub 
# 30000-32767 - add or sub by percent of (num - 30000) 
# -32768 - set to full 
# (-30000)-(-32767) - set to (-1*num - 30000) 
# 0 - mast be zero when detach   
 
# status: 
# 2 - detach badly status.(support detach only) 
# 4 - poison 
# 8 - detach all status of magic.(support detach only) 
# 16 - vampire(only support sort16) 
# 32 - HitRate 
# 64 - defence 
# 128 - attack 
# 512 - magic defence 
# 1024 - bow defence 
# 2048 - attack range 
# 4096 - reflect weapon 
# 8192 - super man status, with half of defence. 
# 16384 - be damage with weapon, detach when move or attack in keep effect 
# 32768 - be damage with magic 
# 65536 - attack rate 
# 131072 - invisible for monster 
# 262144 - TORNADO 
# 1048576 - reflect magic 
# 2097152 - dodge 
# 4194304 - wing 
# 8388608 - keep_bow, add attack, cancel when move 
# 16777216 - stop milli secs in power, have not keep effect. monster valid. (believe: power is add damage, step_secs is keep milli secs.) dedecms.com
其实对于大多数魔域私服gm来说他们并不是很重视相关数据分析的情况,对于他们来说基础数据收集都是一件非常困难的事情,其实遇到这样的情况还是比较无奈的上面一为原创提到的MSG源码数据库中就保存了大量的相关基础数据,对于大多数人来说想要搞定学会这些相关操作这篇攻略还是很重要的。