⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cq_tables.sql

📁 魔域源代码需要的可以学习一下真么这么麻烦啊
💻 SQL
📖 第 1 页 / 共 3 页
字号:

# MySQL dump 8.16
#
# Host: 192.168.1.200    Database: cq
#--------------------------------------------------------
# Server version	3.23.32

#
# Table structure for table 'cq_item'
#

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', 
	magic2 tinyint(1) unsigned NOT NULL default '0', 
	magic3 tinyint(1) unsigned NOT NULL default '0', 
	data int(4) NOT NULL default '0', 
	PRIMARY KEY (id), 
	KEY package(owner_id, position, player_id)
) TYPE=MyISAM; 

#
# Table structure for table 'cq_itemtype'
#

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_sex 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', 
	monopoly tinyint(1) unsigned NOT NULL default '0', 
	weight smallint(2) unsigned NOT NULL default '100', 
	price int(4) unsigned NOT NULL default '0', 
	id_action int(4) unsigned NOT NULL default '0', 
	attack_max smallint(2) unsigned NOT NULL default '0', 
	attack_min smallint(2) unsigned NOT NULL default '0', 
	defense smallint(2) unsigned NOT NULL default '0', 
	magicatk_min smallint(2) unsigned NOT NULL default '0', 
	add_soul smallint(2) unsigned NOT NULL default '0', 
	life smallint(2) NOT NULL default '0', 
	mana smallint(2) NOT NULL default '0', 
	amount smallint(2) unsigned NOT NULL default '1', 
	amount_limit smallint(2) unsigned NOT NULL default '1', 
	ident 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', 
	magic2 tinyint(1) unsigned NOT NULL default '0', 
	magic3 tinyint(1) unsigned NOT NULL default '0', 
	magicatk_max smallint(2) unsigned NOT NULL default '0', 
	magic_def smallint(2) unsigned NOT NULL default '0', 
	atk_range smallint(2) unsigned NOT NULL default '1', 
	atk_speed smallint(2) unsigned NOT NULL default '800', 
	PRIMARY KEY (id)
) TYPE=MyISAM; 

##############################################################
# itemtype表针对精灵的字段转义:
# req_level:精灵等级
# attack_max:精灵原始成长率
# attack_min:精灵升级到下一级需要的经验值
##############################################################
#
# req_weaponskill字段无用,改名为level:物品等级
#
##############################################################

#
# Table structure for table 'cq_friend'
#

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'
#

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;


#
# Table structure for table 'cq_generator'
#

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',
  PRIMARY KEY (id),
  KEY mapid(mapid)
) TYPE=MyISAM;
# max_per_gen - 0: generat by game server
# npctype - only use for monster but pet
# (bound_x==0 && bound_y==0) : dynamic bound for pet
# timer_begin,timer_end - format: DDWWHHMMSS, DD:day of month(1-31), WW:day of week(1-7), HHMMSS:hour,minute,second. WW mast 00 when DD is not 00.
# born_x,born_y - born from bound when default 0, else born to corrd(x,y)


#
# 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, 
	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, 
	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, 
	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;		// 被动攻击
				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',

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -