на вскидку, примерно так ...
###########################################################################
#
#
DROP TABLE IF EXISTS #TBL_ACCOUNTS#;
CREATE TABLE #TBL_ACCOUNTS# (
acc_id mediumint(8) UNSIGNED NOT NULL auto_increment,
acc_username varchar(32) NOT NULL,
acc_password varchar(32) NOT NULL,
acc_lastactive int(11) NOT NULL DEFAULT 0,
acc_access tinyint(3) NOT NULL DEFAULT 0,
acc_lastip char(8) NOT NULL DEFAULT '0',
PRIMARY KEY (acc_id),
KEY (acc_username)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_ARMOR#;
CREATE TABLE #TBL_ARMOR# (
ait_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ait_price int(11) NOT NULL DEFAULT 0,
ait_name varchar(64) NOT NULL DEFAULT '',
ait_bodypart tinyint(1) NOT NULL DEFAULT 0,
ait_crystallizable tinyint(1) NOT NULL DEFAULT 0,
ait_crystaltype tinyint(3) NOT NULL DEFAULT 0,
ait_crystalcount tinyint(5) NOT NULL DEFAULT 0,
ait_weight tinyint(1) NOT NULL DEFAULT 0,
ait_meterial tinyint(3) NOT NULL DEFAULT 0,
ait_avoidmodify tinyint(1) NOT NULL DEFAULT 0,
ait_durability tinyint(3) NOT NULL DEFAULT 0,
ait_pdef tinyint(5) NOT NULL DEFAULT 0,
ait_mdef tinyint(5) NOT NULL DEFAULT 0,
ait_mpbonus tinyint(5) NOT NULL DEFAULT 0,
ait_sellable tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (ait_id)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_BOXACCESS#;
CREATE TABLE #TBL_BOXACCESS# (
ba_spawn mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
ba_charname varchar(32)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_BOXES#;
CREATE TABLE #TBL_BOXES# (
box_id mediumint(8) UNSIGNED NOT NULL auto_increment,
box_spawn mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
box_npcid mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
box_itemid mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
box_count mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
box_enchant tinyint(2) NOT NULL DEFAULT 0,
box_drawer varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (box_id)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_CASTLE#;
CREATE TABLE #TBL_CASTLE# (
cas_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cas_siege_date int(11) NOT NULL DEFAULT 0,
cas_siege_day tinyint(1) NOT NULL DEFAULT 0,
cas_siege_hour tinyint(2) NOT NULL DEFAULT 0,
cas_tax tinyint(3) NOT NULL DEFAULT 0,
cas_treasure tinyint(3) NOT NULL DEFAULT 0,
cas_name varchar(32) NOT NULL DEFAULT ''
PRIMARY KEY (cas_id)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_CASTLE_DOOR#;
CREATE TABLE #TBL_CASTLE_DOOR# (
cd_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cd_castle mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
cd_x int(11) UNSIGNED NOT NULL DEFAULT 0,
cd_y int(11) UNSIGNED NOT NULL DEFAULT 0,
cd_z int(11) UNSIGNED NOT NULL DEFAULT 0,
cd_hp tinyint(5) NOT NULL DEFAULT 0,
cd_pdef tinyint(5) NOT NULL DEFAULT 0,
cd_mdef tinyint(5) NOT NULL DEFAULT 0,
cd_name varchar(24) NOT NULL DEFAULT '',
PRIMARY KEY (cd_id),
KEY (cd_castle)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_CASTLE_DOOR_UPG#;
CREATE TABLE #TBL_CASTLE_DOOR_UPG# (
cdu_door mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
cdu_hp tinyint(5) NOT NULL DEFAULT 0,
cdu_pdef tinyint(5) NOT NULL DEFAULT 0,
cdu_mdef tinyint(5) NOT NULL DEFAULT 0,
PRIMARY KEY (cdu_door)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_CASTLE_GUARD#;
CREATE TABLE #TBL_CASTLE_GUARD# (
cg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cg_clan mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
cg_x int(11) UNSIGNED NOT NULL DEFAULT 0,
cg_y int(11) UNSIGNED NOT NULL DEFAULT 0,
cg_z int(11) UNSIGNED NOT NULL DEFAULT 0,
cg_hp tinyint(5) NOT NULL DEFAULT 0,
cg_mp tinyint(5) NOT NULL DEFAULT 0,
cg_patk tinyint(5) NOT NULL DEFAULT 0,
cg_pspd tinyint(5) NOT NULL DEFAULT 0,
cg_pdef tinyint(5) NOT NULL DEFAULT 0,
cg_matk tinyint(5) NOT NULL DEFAULT 0,
cg_mspd tinyint(5) NOT NULL DEFAULT 0,
cg_mdef tinyint(5) NOT NULL DEFAULT 0,
cg_magery tinyint(5) NOT NULL DEFAULT 0,
cg_name tinyint(5) NOT NULL DEFAULT 0,
cg_hpctrl tinyint(1) NOT NULL DEFAULT 0,
cg_mpctrl tinyint(1) NOT NULL DEFAULT 0,
cg_patkctrl tinyint(1) NOT NULL DEFAULT 0,
cg_pspdctrl tinyint(1) NOT NULL DEFAULT 0,
cg_pdefctrl tinyint(1) NOT NULL DEFAULT 0,
cg_matkctrl tinyint(1) NOT NULL DEFAULT 0,
cg_mspdctrl tinyint(1) NOT NULL DEFAULT 0,
cg_mdefctrl tinyint(1) NOT NULL DEFAULT 0,
cg_template int(11) NOT NULL DEFAULT 0,
cg_group varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (cg_id)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;
DROP TABLE IF EXISTS #TBL_CASTLE_GUARD_SKILLS#;
CREATE TABLE #TBL_CASTLE_GUARD_SKILLS# (
cgs_npcid mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
cgs_skill mediumint(8) UNSIGNED NOT NULL DEFAULT 0,
cgs_level tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (cgs_npcid, cgs_skill, cgs_level)
) TYPE = #V_DBTBLT# CHARACTER SET #V_DBCHST#;