研究了一下源代码 发现很多值得参考的东西 特意收集了一下 发出来给大家研究
通过对MSG加载数据库的内容 让我们对数据库的研究不再盲目了!
以下内容不仅包含了数据字段解释 而且 还有相应数据字段的设置内容!
# Host: 192.168.1.200 Database: cq
#--------------------------------------------------------
# Server version 3.23.32
织梦好,好织梦
#
# Table structure for table 'cq_item'
# copyright dedecms
CREATE TABLE cq_item(
id int(4) unsigned NOT NULL auto_increment,
type int(4) unsigned NOT NULL default '0',
owner_id int(4) unsigned NOT NULL default '0',
player_id int(4) unsigned NOT NULL default '0',
amount smallint(2) unsigned NOT NULL default '100',
amount_limit smallint(2) unsigned NOT NULL default '100',
ident tinyint(1) unsigned NOT NULL default '0',
position tinyint(1) unsigned NOT NULL default '0',
gem1 tinyint(1) unsigned NOT NULL default '0',
gem2 tinyint(1) unsigned NOT NULL default '0',
magic1 tinyint(1) unsigned NOT NULL default '0',
dedecms.com
#
# Table structure for table 'cq_itemtype'
# dedecms.com
DROP TABLE IF EXISTS cq_itemtype;
CREATE TABLE cq_itemtype (
id int(4) unsigned NOT NULL default '0',
name varchar(15) binary NOT NULL default '',
req_profession tinyint(1) unsigned NOT NULL default '0',
level tinyint(1) unsigned NOT NULL default '0',
req_level tinyint(1) unsigned NOT NULL default '0',
req_edu tinyint(1) unsigned NOT NULL default '0',
req_force smallint(2) unsigned NOT NULL default '0',
req_speed smallint(2) unsigned NOT NULL default '0',
req_health smallint(2) unsigned NOT NULL default '0',
req_soul smallint(2) unsigned NOT NULL default '0',
内容来自dedecms
##############################################################
# itemtype表针对物品的字段转义:
# req_level:人物等级
# attack_max:貌似是BB原始成长率
# attack_min:貌似是BB升级到下一级需要的经验值
##############################################################
#
# req_weaponskill字段无用,改名为level:物品等级
#
############################################################## 本文来自织梦
#
# Table structure for table 'cq_friend'
# dedecms.com
CREATE TABLE cq_friend (
id int(4) unsigned zerofill NOT NULL auto_increment,
userid int(4) unsigned zerofill NOT NULL default '0000',
friend int(4) unsigned zerofill NOT NULL default '0',
friendname varchar(15) NOT NULL default '无',
PRIMARY KEY (id),
KEY userid(userid)
) TYPE=MyISAM; 织梦好,好织梦
#
# Table structure for table 'cq_enemy'
#
内容来自dedecms
DROP TABLE IF EXISTS cq_enemy;
CREATE TABLE cq_enemy (
id int(4) unsigned zerofill NOT NULL auto_increment,
userid int(4) unsigned zerofill NOT NULL default '0000',
enemy int(4) unsigned zerofill NOT NULL default '0',
enemyname varchar(15) NOT NULL default '无',
time int(4) unsigned zerofill NOT NULL default '0',
PRIMARY KEY (id),
KEY userid(userid,enemy)
) TYPE=MyISAM; copyright dedecms
#
# Table structure for table 'cq_generator'
# dedecms.com
DROP TABLE IF EXISTS cq_generator;
CREATE TABLE cq_generator (
id int(4) unsigned zerofill NOT NULL auto_increment,
mapid 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',
grid int(4) unsigned zerofill NOT NULL default '0009',
rest_secs int(4) unsigned zerofill NOT NULL default '0000',
max_per_gen int(4) unsigned zerofill NOT NULL default '0000',
npctype int(4) unsigned zerofill NOT NULL default '0000',
timer_begin int(4) unsigned zerofill NOT NULL default '0000',
timer_end int(4) unsigned zerofill NOT NULL default '0000',
born_x int(4) unsigned zerofill NOT NULL default '0000',
born_y int(4) unsigned zerofill NOT NULL default '0000',
织梦内容管理系统
#
# Table structure for table 'cq_monstertype'
#
DROP TABLE IF EXISTS cq_monstertype;
CREATE TABLE cq_monstertype (
id INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
name CHAR (15) NOT NULL DEFAULT '无',
type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
lookface INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
length tinyint (4) NOT NULL DEFAULT 0,
fat tinyint (4) NOT NULL DEFAULT 0,
life SMALLINT (2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00,
mana SMALLINT (2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00,
attack_max INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000, 织梦好,好织梦
attack_min INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
defence INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
dexterity INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
dodge INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
helmet_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
armor_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
weaponr_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
weaponl_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000, dedecms.com
attack_range INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
view_range INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
escape_life INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
attack_speed INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
move_speed INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
level INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
attack_user INTEGER (1) UNSIGNED NOT NULL DEFAULT 3,
drop_money_min INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
drop_money_max INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000, 内容来自dedecms
size_add INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
action INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
run_speed INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
drop_armet tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_necklace tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_armor tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_ring tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_weapon tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_shield tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000, 织梦好,好织梦
drop_shoes tinyint (3) UNSIGNED ZEROFILL NOT NULL DEFAULT 000,
drop_money_chance INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
drop_item_chance INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
magic_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
magic_def INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
magic_hitrate INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0100,
atk_hitrate INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
ai_type INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000, dedecms.com
defence2 INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 10000,
explode_item_chance1 INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
explode_item_chance2 INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
explode_item_chance3 INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
drop_item_rule INTEGER (4) UNSIGNED ZEROFILL NOT NULL DEFAULT 0000,
PRIMARY KEY (id)
) TYPE=MyISAM;
# attack_user - 0: escape only;
1: passive; // 被动攻击 内容来自dedecms
2: active; // 主动攻击
4: good; // 正义的(卫兵或玩家召唤和控制的怪物)
8: guard; // 卫兵
16: pk_killer; // 追杀黑名
织梦好,好织梦
本文来自织梦
#
# 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
dedecms.com
#
# 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',
织梦内容管理系统
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',
#
# 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'
#
内容来自dedecms
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', dedecms.com
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', copyright dedecms
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; copyright dedecms
# type: 类型
# 10000~10255 - 武器魔法,即cq_itemtype中的magic1+10000 内容来自dedecms
# 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.)
# need_prof: 有多种职业要求时,值相加即可。最高级填0,表示没有一种职业可以再升级了。
# 1 - 魔法师
# 2 - 魔法师转职
# 4 - 战士
# 8 - 战士转职
# 16 - 弓箭手
# need_exp:
# 0 - 不升级(或通过任务系统升级)
# -1 - 自动升级。
# target:
# 0 - 敌人
# 1 - 允许对自己
# 2 - no target
# use_xp:
# 0 - 法术
# 1 - XP技
# 2 - 武器技(support up level with auto_uplevel & weaponskill_level, do not support up level with need_exp number)
# active_times:
# 0 - once times status class (use for defence/hitrate)
# 1-x - more times status class (use for poison) 本文来自织梦
# auto_active:
# 0 - none auto active
# 1 - active when kill target, enable sort 2, 13
# 2 - active when equipment, enable sort 15
# 4 - active in random, enable sort 4, 5, 14, 16
本文来自织梦
# learn_level:
# 1-99 - automatic learn weapon skill at this level.
# nnmm - automatic learn weapon skill between mm - nn level. copyright dedecms
# drop_weapon:
# 1 - throw weapon_r to target around.
# weapon_hit:
# 0 - hit by weapon
# 1 - hit by magic
# 2 - hit mode by arrow
copyright dedecms
# use_item - use equip item by sub_type, 0 for no use.
# use_item_num - use equip item number, 0 for check item only.
织梦好,好织梦
# delay_ms - 0: for default delay.
# width - width of magic. 0-180 for degree of fan (sort 4), 0 for default.
#
# Table structure for table 'cq_magic'
#
织梦好,好织梦
CREATE TABLE cq_magic (
id int(4) unsigned zerofill NOT NULL auto_increment,
ownerid int(4) unsigned zerofill NOT NULL default '0000',
type smallint(4) unsigned zerofill NOT NULL default '0000',
level smallint(4) unsigned zerofill NOT NULL default '0000',
exp int(4) unsigned zerofill NOT NULL default '0000',
unlearn tinyint(1) unsigned zerofill NOT NULL default '0',
old_level smallint(4) unsigned zerofill NOT NULL default '0000',
PRIMARY KEY (id),
KEY user_magic(ownerid)
) TYPE=MyISAM; 织梦好,好织梦
#
# Table structure for table 'cq_syndicate'
# 织梦好,好织梦
CREATE TABLE cq_syndicate (
id int(4) unsigned zerofill NOT NULL auto_increment,
name varchar(15) binary NOT NULL default '',
announce varchar(255) binary NOT NULL default '',
tenet varchar(255) binary NOT NULL default '',
member_title varchar(15) binary NOT NULL default '弟子',
leader_id int(4) unsigned zerofill NOT NULL default '0000',
leader_name varchar(15) binary NOT NULL default '',
money int(4) zerofill NOT NULL default '0000',
fealty_syn int(4) unsigned zerofill NOT NULL default '0000',
del_flag tinyint(1) unsigned zerofill NOT NULL default '0',
amount int(4) unsigned zerofill NOT NULL default '0000',
enemy0 int(4) unsigned zerofill NOT NULL default '0000',
enemy1 int(4) unsigned zerofill NOT NULL default '0000',
enemy2 int(4) unsigned zerofill NOT NULL default '0000',
enemy3 int(4) unsigned zerofill NOT NULL default '0000',
enemy4 int(4) unsigned zerofill NOT NULL default '0000',
copyright dedecms
#
# Table structure for table 'cq_synattr'
# 本文来自织梦
CREATE TABLE cq_synattr (
id int(4) unsigned zerofill NOT NULL,
syn_id int(4) unsigned zerofill NOT NULL default '0000',
rank int(4) unsigned zerofill NOT NULL default '0000',
proffer int(4) unsigned zerofill NOT NULL default '0000',
title int(4) unsigned zerofill NOT NULL default '0000',
PRIMARY KEY (id)
) TYPE=MyISAM;
#
# Table structure for table 'cq_leaveword'
# copyright dedecms
DROP TABLE IF EXISTS cq_leaveword;
CREATE TABLE cq_leaveword (
id int(4) unsigned zerofill NOT NULL auto_increment,
user_name char(15) binary NOT NULL default '未知',
send_name char(15) binary NOT NULL default '未知',
time char(15) binary NOT NULL default '00000000000000',
words char(255) binary NOT NULL default '未命名',
PRIMARY KEY (id),
KEY user_name(user_name)
) TYPE=MyISAM;
dedecms.com
#
# Table structure for table 'cq_bonus'
# 织梦好,好织梦
CREATE TABLE cq_bonus (
serianumber char(15) binary NOT NULL default '未知',
password char(15) binary NOT NULL default '未知',
action int(4) unsigned zerofill NOT NULL default '0000',
id int(4) unsigned zerofill NOT NULL auto_increment,
PRIMARY KEY (id),
UNIQUE KEY serianumber(serianumber)
) TYPE=MyISAM; copyright dedecms
#
# Table structure for table 'cq_traptype'
#
内容来自dedecms
DROP TABLE IF EXISTS cq_traptype;
CREATE TABLE cq_traptype (
id int(4) unsigned zerofill NOT NULL,
sort tinyint(3) unsigned zerofill NOT NULL default '0',
look int(4) unsigned zerofill NOT NULL default '0000',
action_id int(4) unsigned zerofill NOT NULL default '0000',
level int(4) unsigned zerofill NOT NULL default '0000',
attack_max int(4) unsigned zerofill NOT NULL default '0000',
attack_min int(4) unsigned zerofill NOT NULL default '0000',
dexterity int(4) unsigned zerofill NOT NULL default '0000',
attack_speed int(4) unsigned zerofill NOT NULL default '1000',
active_times int(4) unsigned zerofill NOT NULL default '0000',
magic_type int(4) unsigned zerofill NOT NULL default '0000',
magic_hitrate int(4) unsigned zerofill NOT NULL default '0100',
size int(4) unsigned zerofill NOT NULL default '0000',
atk_mode int(3) unsigned zerofill NOT NULL default '0001',
PRIMARY KEY (id) 织梦内容管理系统
) TYPE=MyISAM;
insert cq_traptype values(1, 1,1091010,0,20,250,250,80,1000,0,1000,50,1,1);
insert cq_traptype values(2,10,1091010,0,20,25,25,80,1000,0,1000,50,7,1);
# sort:
TRAPSORT_SYSTRAP =1, // 系统的陷阱,多次有效
TRAPSORT_FIREWALL =10, // 火墙, 可由系统放置
# look - 0: invisible trap
# action_id - run action when active trap, only effect for TRAPSORT_SYSTRAP
# active_times - 0: forever effect
# magic_type - 0: hit by weapon mode
# atk_mode: 可叠加
ATKMODE_USER = 1,
dedecms.com
CREATE TABLE cq_trap (
id int(4) unsigned zerofill NOT NULL,
type int(4) unsigned zerofill NOT NULL default '0000',
look int(4) unsigned zerofill NOT NULL default '0000',
owner_id int(4) unsigned zerofill NOT NULL default '0000',
map_id 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',
data int(4) unsigned zerofill NOT NULL default '0000',
PRIMARY KEY (id)
) TYPE=MyISAM;
insert cq_trap values(990001,1,1091010,0,1002,404,400,0);
insert cq_trap values(990002,2,1091012,0,1002,439,400,0); 本文来自织梦
# id - 990001 ~ 999999
# look - 0: invisible trap copyright dedecms
#
# Table structure for table 'cq_point_allot'
# 织梦好,好织梦
DROP TABLE IF EXISTS cq_point_allot;
CREATE TABLE cq_point_allot (
id int(4) unsigned zerofill NOT NULL auto_increment,
prof_sort int(4) unsigned zerofill NOT NULL default '0000',
level int(4) unsigned zerofill NOT NULL default '0000',
force int(4) unsigned zerofill NOT NULL default '0000',
Speed int(4) unsigned zerofill NOT NULL default '0000',
health int(4) unsigned zerofill NOT NULL default '0000',
soul int(4) unsigned zerofill NOT NULL default '0000',
PRIMARY KEY (id),
UNIQUE KEY idx(prof_sort,level)
) TYPE=MyISAM;
INSERT cq_point_allot VALUES(0,0,0,0,0,0,0); 本文来自织梦
#
# Table structure for table 'cq_superman'
# 织梦内容管理系统
CREATE TABLE cq_superman (
id int(4) unsigned zerofill NOT NULL,
number int(4) unsigned zerofill NOT NULL default '0000',
name varchar(15) binary NOT NULL default '--',
PRIMARY KEY (id),
KEY number(number)
) TYPE=MyISAM; copyright dedecms
#
# Table structure for table 'cq_config'
#
dedecms.com
CREATE TABLE cq_config (
id int(4) unsigned zerofill NOT NULL,
name varchar(15) binary NOT NULL default '',
data int(4) unsigned zerofill NOT NULL default '0000',
string varchar(255) binary NOT NULL default '',
PRIMARY KEY (id),
KEY name(name)
) TYPE=MyISAM;
#
# Table structure for table 'cq_rebirth'
#
DROP TABLE IF EXISTS cq_rebirth;
CREATE TABLE cq_rebirth (
id int(4) unsigned zerofill NOT NULL,
need_prof int(4) unsigned zerofill NOT NULL default '0000',
new_prof int(4) unsigned zerofill NOT NULL default '0000',
need_level int(4) unsigned zerofill NOT NULL default '0000',
new_level int(4) unsigned zerofill NOT NULL default '0000',
PRIMARY KEY (id)
) TYPE=MyISAM; 织梦内容管理系统
#
# Table structure for table 'cq_dropitemrule'
# 织梦内容管理系统
DROP TABLE IF EXISTS cq_dropitemrule;
CREATE TABLE cq_dropitemrule(
id int unsigned NOT NULL,
RuleId int unsigned NOT NULL default '0',
Chance int unsigned NOT NULL default '0',
Item0 int unsigned NOT NULL default '0',
Item1 int unsigned NOT NULL default '0',
Item2 int unsigned NOT NULL default '0',
Item3 int unsigned NOT NULL default '0',
Item4 int unsigned NOT NULL default '0',
Item5 int unsigned NOT NULL default '0',
Item6 int unsigned NOT NULL default '0',
Item7 int unsigned NOT NULL default '0',
Item8 int unsigned NOT NULL default '0',
copyright dedecms
PRIMARY KEY (id, RuleId)
) TYPE=MyISAM; dedecms.com
#
# Table structure for table 'cq_table'
# 织梦内容管理系统
DROP TABLE IF EXISTS cq_table;
CREATE TABLE cq_table (
id int(4) unsigned zerofill NOT NULL auto_increment,
npc_id int(4) unsigned zerofill NOT NULL default '0000',
type int(4) unsigned zerofill NOT NULL default '0000',
key_id int(4) unsigned zerofill NOT NULL default '0000',
datastr varchar(255) 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),
) TYPE=MyISAM;
#
# Table structure for table 'cq_npc'
#
本文来自织梦
DROP TABLE IF EXISTS cq_npc;
CREATE TABLE cq_npc (
id int(4) unsigned zerofill NOT NULL default '0000',
ownerid int(4) unsigned NOT NULL default '0',
ownertype int(4) unsigned NOT NULL default '0',
name char(15) binary NOT NULL default '未命名',
type int(4) unsigned zerofill NOT NULL default '0',
lookface int(4) unsigned zerofill NOT NULL default '0',
idxserver int(4) NOT NULL default '-1',
mapid int(4) unsigned zerofill NOT NULL default '0',
cellx int(4) unsigned zerofill NOT NULL default '0',
celly int(4) unsigned zerofill NOT NULL default '0',
task0 int(4) unsigned zerofill NOT NULL default '0',
task1 int(4) unsigned zerofill NOT NULL default '0',
task2 int(4) unsigned zerofill NOT NULL default '0',
task3 int(4) unsigned zerofill NOT NULL default '0',
task4 int(4) unsigned zerofill NOT NULL default '0',
task5 int(4) unsigned zerofill NOT NULL default '0', 织梦好,好织梦
task6 int(4) unsigned zerofill NOT NULL default '0',
task7 int(4) unsigned zerofill NOT NULL default '0',
data0 int(4) NOT NULL default '0',
data1 int(4) NOT NULL default '0',
data2 int(4) NOT NULL default '0',
data3 int(4) NOT NULL default '0',
datastr char(15) binary NOT NULL default '无',
linkid int(4) unsigned zerofill NOT NULL default '0',
life int(4) unsigned zerofill NOT NULL default '0',
maxlife int(4) unsigned zerofill NOT NULL default '0',
base int(4) unsigned zerofill NOT NULL default '0',
sort smallint(2) unsigned zerofill NOT NULL default '0',
itemid int(4) unsigned zerofill NOT NULL default '0',
defence smallint(2) unsigned zerofill NOT NULL default '0',
magic_def smallint(2) unsigned zerofill NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT cq_npc VALUES(9999,0,0,'赌场',19,26,-1,1002,404,398,0,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,0,0,0); dedecms.com
CREATE TABLE cq_dynanpc (
id int(4) unsigned zerofill NOT NULL default '0000' auto_increment,
ownerid int(4) unsigned NOT NULL default '0',
ownertype tinyint(3) unsigned NOT NULL default '0',
name varchar(15) binary NOT NULL default '未命名',
type smallint(2) unsigned zerofill NOT NULL default '0',
lookface int(4) unsigned zerofill NOT NULL default '0',
idxserver tinyint(3) NOT NULL default '-1',
mapid int(4) unsigned zerofill NOT NULL default '0',
cellx smallint(2) unsigned zerofill NOT NULL default '0',
celly smallint(2) unsigned zerofill NOT NULL default '0',
task0 int(4) unsigned zerofill NOT NULL default '0',
task1 int(4) unsigned zerofill NOT NULL default '0',
task2 int(4) unsigned zerofill NOT NULL default '0',
task3 int(4) unsigned zerofill NOT NULL default '0',
task4 int(4) unsigned zerofill NOT NULL default '0',
task5 int(4) unsigned zerofill NOT NULL default '0',
内容来自dedecms
copyright dedecms
dedecms.com
dedecms.com
织梦内容管理系统
DROP TABLE IF EXISTS cq_goods;
CREATE TABLE cq_goods (
id int(4) unsigned zerofill NOT NULL default '0000',
ownerid int(4) unsigned NOT NULL default '0',
itemtype int(4) unsigned NOT NULL default '0',
PRIMARY KEY (id),
KEY ownerid(ownerid)
) TYPE=MyISAM; copyright dedecms
#
# Table structure for table 'cq_task'
# 织梦内容管理系统
DROP TABLE IF EXISTS cq_task;
CREATE TABLE cq_task (
id int(4) unsigned zerofill NOT NULL default '0000',
id_next int(4) unsigned zerofill NOT NULL default '0000',
id_nextfail int(4) unsigned zerofill NOT NULL default '0000',
itemname1 char(15) binary NOT NULL default '',
itemname2 char(15) binary NOT NULL default '',
money int(4) unsigned NOT NULL default '0',
profession int(4) unsigned NOT NULL default '0',
edu int(4) unsigned NOT NULL default '0',
min_pk int(4) NOT NULL default '0',
max_pk int(4) NOT NULL default '0',
team int(4) unsigned zerofill NOT NULL default '0',
metempsychosis int(4) unsigned zerofill NOT NULL default '0',
query tinyint(1) unsigned zerofill NOT NULL default '0',
marriage tinyint(1) NOT NULL default '0',
client_active tinyint(1) unsigned zerofill NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
dedecms.com
#
# Table structure for table 'cq_action'
#
本文来自织梦
DROP TABLE IF EXISTS cq_action;
CREATE TABLE cq_action (
id int(4) unsigned zerofill NOT NULL default '0000',
id_next int(4) unsigned zerofill NOT NULL default '0000',
id_nextfail int(4) unsigned zerofill NOT NULL default '0000',
type int(4) unsigned zerofill NOT NULL default '0000',
data int(4) NOT NULL default '0',
param char(127) binary NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
DROP TABLE IF EXISTS cq_user;
CREATE TABLE cq_user (
name varchar(15) binary NOT NULL default '',
mate varchar(15) binary NOT NULL default '',
lookface int(4) unsigned NOT NULL default '0',
hair smallint(2) unsigned NOT NULL default '0',
money int(4) unsigned NOT NULL default '0',
money_saved int(4) unsigned NOT NULL default '0',
task_data int(4) unsigned NOT NULL default '0',
level tinyint(1) unsigned NOT NULL default '0',
exp int(4) NOT NULL default '0',
force smallint(2) unsigned NOT NULL default '0',
physique smallint(2) unsigned NOT NULL default '0', 织梦内容管理系统
Speed smallint(2) unsigned NOT NULL default '0',
health smallint(2) unsigned NOT NULL default '0',
soul smallint(2) unsigned NOT NULL default '0',
additional_point smallint(2) unsigned NOT NULL default '0',
auto_allot tinyint(1) unsigned NOT NULL default '0',
life smallint(2) unsigned NOT NULL default '0',
mana smallint(2) unsigned NOT NULL default '0',
profession tinyint(2) unsigned NOT NULL default '0',
deed int(4) NOT NULL default '0',
pk smallint(2) NOT NULL default '0',
nobility tinyint(1) unsigned NOT NULL default '0000', 内容来自dedecms
medal varchar(64) binary NOT NULL default '',
medal_select tinyint(4) unsigned NOT NULL default '0000',
metempsychosis tinyint(1) unsigned NOT NULL default '0000',
syndicate_id int(4) unsigned 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',
account_id int(4) unsigned NOT NULL default '0000',
id int(4) unsigned NOT NULL auto_increment,
last_login int(8) unsigned NOT NULL default '0',
task_mask int(4) unsigned NOT NULL default '0000', 织梦内容管理系统
time_of_life int(4) unsigned NOT NULL default '0000',
virtue int(4) unsigned NOT NULL default '0000',
home_id int(4) unsigned NOT NULL default '0000',
title varchar(64) binary NOT NULL default '',
title_select tinyint(4) unsigned NOT NULL default '0000',
lock_key int(4) unsigned NOT NULL default '0000',
PRIMARY KEY (id),
KEY index_account_id(account_id),
KEY index_name(name),
KEY index_level(level)
) TYPE=MyISAM;
INSERT cq_user SET id=1000000,name='RESERVE_ID_SPACE',account_id=4111222333; 织梦内容管理系统
DROP TABLE IF EXISTS cq_weapon_skill;
CREATE TABLE cq_weapon_skill (
type int(4) unsigned zerofill NOT NULL default '0000',
level tinyint(2) unsigned zerofill NOT NULL default '0000',
exp int(4) unsigned zerofill NOT NULL default '0000',
old_level tinyint(2) unsigned zerofill NOT NULL default '0000',
owner_id int(4) unsigned zerofill NOT NULL default '0000',
id int(4) unsigned zerofill NOT NULL auto_increment,
unlearn tinyint(1) unsigned zerofill NOT NULL default '0',
PRIMARY KEY (id),
KEY owner_id(owner_id)
) TYPE=MyISAM;
#
# Table structure for table 'cq_levexp'
# copyright dedecms
DROP TABLE IF EXISTS cq_levexp;
CREATE TABLE cq_levexp (
level int(4) unsigned zerofill NOT NULL default '0000',
exp int(4) unsigned NOT NULL default '0',
PRIMARY KEY (level)
) TYPE=MyISAM; 内容来自dedecms
#
# Dumping data for table 'cq_levexp'
#
本文来自织梦
INSERT INTO cq_levexp VALUES (0001,36);
INSERT INTO cq_levexp VALUES (0002,51);
INSERT INTO cq_levexp VALUES (0003,71);
INSERT INTO cq_levexp VALUES (0004,100);
INSERT INTO cq_levexp VALUES (0005,164);
INSERT INTO cq_levexp VALUES (0006,357);
INSERT INTO cq_levexp VALUES (0007,523);
INSERT INTO cq_levexp VALUES (0008,765);
INSERT INTO cq_levexp VALUES (0009,1115);
INSERT INTO cq_levexp VALUES (0010,2705);
INSERT INTO cq_levexp VALUES (0011,2841);
INSERT INTO cq_levexp VALUES (0012,3052);
INSERT INTO cq_levexp VALUES (0013,3275);
INSERT INTO cq_levexp VALUES (0014,3511);
INSERT INTO cq_levexp VALUES (0015,2461);
INSERT INTO cq_levexp VALUES (0016,3156);
INSERT INTO cq_levexp VALUES (0017,4213);
INSERT INTO cq_levexp VALUES (0018,5397);
INSERT INTO cq_levexp VALUES (0019,6396);
INSERT INTO cq_levexp VALUES (0020,4712);
INSERT INTO cq_levexp VALUES (0021,6036);
INSERT INTO cq_levexp VALUES (0022,8049);
INSERT INTO cq_levexp VALUES (0023,10300); 织梦内容管理系统
INSERT INTO cq_levexp VALUES (0024,12200);
INSERT INTO cq_levexp VALUES (0025,7828);
INSERT INTO cq_levexp VALUES (0026,9996);
INSERT INTO cq_levexp VALUES (0027,13291);
INSERT INTO cq_levexp VALUES (0028,16961);
INSERT INTO cq_levexp VALUES (0029,20034);
INSERT INTO cq_levexp VALUES (0030,12703);
INSERT INTO cq_levexp VALUES (0031,16183);
INSERT INTO cq_levexp VALUES (0032,21470);
INSERT INTO cq_levexp VALUES (0033,27338);
INSERT INTO cq_levexp VALUES (0034,32225);
INSERT INTO cq_levexp VALUES (0035,20031);
INSERT INTO cq_levexp VALUES (0036,25475);
INSERT INTO cq_levexp VALUES (0037,33740);
INSERT INTO cq_levexp VALUES (0038,42892);
INSERT INTO cq_levexp VALUES (0039,50478);
INSERT INTO cq_levexp VALUES (0040,37296);
INSERT INTO cq_levexp VALUES (0041,47367);
INSERT INTO cq_levexp VALUES (0042,62654);
INSERT INTO cq_levexp VALUES (0043,79550);
INSERT INTO cq_levexp VALUES (0044,93507);
INSERT INTO cq_levexp VALUES (0045,58310);
INSERT INTO cq_levexp VALUES (0046,73960);
内容来自dedecms
DROP TABLE IF EXISTS cq_dropitemrule;
CREATE TABLE cq_dropitemrule(
id int unsigned NOT NULL, # 规则组ID
RuleId int unsigned NOT NULL default '0', # 规则ID
Chance int unsigned NOT NULL default '0', # 掉物品概率
Item0 int unsigned NOT NULL default '0', # 以下为此概率可能掉的物品类别ID
Item1 int unsigned NOT NULL default '0',
Item2 int unsigned NOT NULL default '0',
Item3 int unsigned NOT NULL default '0',
Item4 int unsigned NOT NULL default '0',
Item5 int unsigned NOT NULL default '0',
Item6 int unsigned NOT NULL default '0',
copyright dedecms
内容来自dedecms
1) 掉物品规则概率改为精度1/10000,不再采用倒数 [ 提交时间:2003-11-28] [ 完成时间:2003-12-01] copyright dedecms
织梦内容管理系统
[ 提交时间:2003-12-10 21:59 ]
dedecms.com
增加物品追加效果支持;
怪物掉物品追加效果概率分布函数需要寻找更合适的; 织梦内容管理系统
关于掉物品/金钱的算法
==========================================================
冷紫龙 2003-11-13 织梦好,好织梦
功能要求:
========
1、每种怪都有可能掉某些特定类型的物品,掉每种物品都有特定的概率;
2、怪物掉物品可以有普通、小爆、中爆、大爆等几种方式,具体的每种方式如何掉物品、掉多少物品需要与策划讨论确认
数据库表要求:
============
1、修改cq_monstertype表
本文来自织梦
1)将drop_money和drop_itemtype字段分别改为:
drop_money_min //所掉金钱的下限
drop_money_max //所掉金钱的上限
★爆怪的时候如果有掉钱,则掉的金钱为正常的1.6倍
dedecms.com
2)增加字段
drop_money_chance //掉钱的概率 ——需要确认是否与掉物品一起处理
drop_item_chance //掉物品的概率 掉1个物品
explode_item_chance1 //小爆的概率 掉2 - 5个物品
explode_item_chance2 //中爆的概率 掉6 - 9个物品 copyright dedecms
explode_item_chance3 //大爆的概率 掉10 - ?个物品
drop_item_rule //掉物品的规则组id
★★掉(爆)物品的数量如何计算?固定值还是某个固定范围内浮动(如上↑) 织梦好,好织梦
用于计算掉金钱的概率以及掉多少钱,避免大量的零碎银子产生
drop_item_chance 用于计算是否掉物品,如果drop_item_rule存在并且计算出来掉物品,才执行掉物品函数
drop_item_rule 指向DropItemRule表中的某个规则组 内容来自dedecms
2、增加cq_dropitemrule表
cq_dropitemrule表结构:
---------------------------------------------------------------------------------------------------------
| 字段名 | 类型 | 说明 |
---------------------------------------------------------------------------------------------------------
| id | INT(4) UNSIGNED zerofill NOT NULL | 规则组ID |
copyright dedecms
本文来自织梦
该表中记录了若干组掉物品的规则,cq_monstertype表中每个记录可以对应最多一个规则组,每组规则由若干条规则(记录)组成,每条记录包括掉宝的概率以及最多15个ItemType(若同一种掉宝几率对应的不止15种物品,可以分多条记录保存,处理的时候统一处理)。 内容来自dedecms
★★可以有一个默认的规则组:规则组id=0,不掉任何物品 dedecms.com
算法设计:
========
本文来自织梦
掉物品概率计算:
1、根据monstertype表的drop_item_chance、explode_item_chance1、explode_item_chance2、explode_item_chance3字段值计算是否掉物品、掉几个物品,如果计算结果不掉,或者drop_item_rule不存在,则退出; copyright dedecms
2、根据dropitemrule表的Probability字段,按照概率从低到高计算是否掉物品,如果计算出来掉落某条规则的物品,则从该规则的物品列表中随机选择一个,重复以上步骤直到找到足够数量的物品(爆的时候物品数大于1)。
★★按照掉物品的概率从低到高计算,会导致降低高概率物品的实际概率值。
例如:某个规则组有10%和50%两个概率的规则,则50%的规则实际概率为(100 - 10)% * 50% = 45%
内容来自dedecms
织梦内容管理系统
内存中规则的存储格式:
应该以规则组id为键存储规则组,每个规则组又分别以规则id存储各自的规则
★★??是否考虑把所有概率相同的规则合并为一条 dedecms.com
本文来自织梦
copyright dedecms
任务日志系统
====================================================
冷紫龙 2003-11-25 织梦内容管理系统
功能:
====
1、记录数据到日志数据库
内容来自dedecms
2、删除指定的日志
织梦好,好织梦
3、根据给定条件查询相应的日志
dingwei、查找日志需要指定两个键:id和time, 织梦好,好织梦
数据结构:
========
1) 需要记录的数据
日志系统需要记录的数据主要有:id、时间、数据、参数串
各种数据类型:
id INT UNSIGNED OBJID
time DATETIME char [20]
data INT int
param VARCHAR(255) char [255]
织梦内容管理系统
2) 数据库结构 内容来自dedecms
CREATE TABLE cq_log (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
logid INT UNSIGNED NOT NULL,
time DATETIME NOT NULL,
data INT NOT NULL,
param VARCHAR(255) NOT NULL, 织梦内容管理系统
PRIMARY KEY(id),
INDEX(logid), INDEX(time),
UNIQUE(logid, time)
); 内容来自dedecms
本文来自织梦
################################################################### copyright dedecms
1) 已经完成的CLogData类完全可以通过继承CGameData来实现
内容来自dedecms
2) 还需要一个CLogMap类来管理CLogData。CLogMap并不在创建的时候一次载入所有的LogData,而仅仅在请求一个LogData找不到时才动态从数据库中创建这个LogData。CLogMap类最好能以双键的形式存储,便于以logid+time组合的方式查找,因为id有可能重复不能单独作为键查找。(或者将logid和time组合起来形成一个键?)
织梦内容管理系统
################################################################### 织梦好,好织梦
织梦好,好织梦
关于任务日志系统的设计
==========================================================
冷紫龙 2003-11-15
功能:
====
1、支持多线任务的功能;
1)每个玩家在中都可以领取到若干个任务,这些任务可以并行进行;
copyright dedecms
2)任务之间可以有依赖关系,如任务B依赖于任务A,则必须完成任务A才可以领取任务B;
cq_task表中增加依赖任务字段(最多可以依赖几个??),可以允许一个任务依赖于多个任务,也允许多个任务依赖于同一个任务,这样整个任务树结构可以分支也可以合并;
copyright dedecms
2、每个任务执行的进度直接记录在数据库中,而不再依靠身上的物品来判断当前任务执行进度;
由于不必依赖于身上的任务物品来判断任务执行进度,任务系统可以更加灵活
织梦好,好织梦
需要解决的问题:
==============
1、玩家完成某个任务后,为了避免重复做任务,或者判断任务的依赖关系,必须保留任务完成的记录,这样导致一个问题是任务记录表的容量会越来越大(不过任务记录表每个记录也仅仅几个int字段而已——如果仅记录任务进度的话,只需要:任务ID、玩家ID、进度三个INT字段) 内容来自dedecms
实现设计:
========
1、在玩家任务记录表cq_usertask中为取得的每个任务记录执行进度 本文来自织梦
物品类型:
const int ITEMTYPE_CHEST = 30000;
本文来自织梦
1) 不允许丢弃
[ 修改CItem::IsDiscardable(); OK ] 本文来自织梦
2) 不允许放入另外一个百宝囊
[ CMsgPackage消息中处理 OK ]
3) 允许存入仓库
4) 不允许交易
[ 修改CItem::IsExchangeEnable(); OK ]
本文来自织梦
6) 不允许放入摆摊交易
[ 修改CBooth::AddItem OK ]
7) 死亡的时候不会掉
[ 掉物品必须调用CUser:ropItem,根据CItem::IsDiscardable()判断此物品是否能丢弃,因此这里无需修改,因为第一步已经保证了物品不会丢弃。是否还有必要修改CUser::BeKill? ]
织梦好,好织梦
1.76精品传奇_1.76天下毁灭_1.76复古传奇_英雄合击_中变靓装传奇_无忧传奇
传奇花屏补丁,花屏补丁,土城花屏补丁,盟重土城花屏补丁下载,土城花屏补丁下载,沙巴克花屏补丁,传奇土城花屏补丁下载
网站每天发布最新、最好的传奇版本下载和与传奇服务端配套开区传奇模版,网游技术教程全部免费下载!
无忧网络是目前唯一家所有的传奇服务端,传奇私服花屏补丁,盟重花屏补丁和传奇客户端下载都经过站长亲自测试并配有真实测试图!
所有的工具软件和传奇版本在发布之前,都会经过站长亲自测试,保证chuanqisf可以进入游戏,所有软件都无毒无插件!
本站声明:本站所有技术资料与下载资源均为网络搜集整理,并不代表本站的观点与立场,如有侵犯您的权益,请来信指出,本站将立即改正Copyright © 2002-2014 无忧网络 版权所有蜀ICP备09041899号