diff options
36 files changed, 1356 insertions, 1310 deletions
diff --git a/sql-files/logs.sql b/sql-files/logs.sql index a281d632e..3d5f56710 100644 --- a/sql-files/logs.sql +++ b/sql-files/logs.sql @@ -1,128 +1,157 @@ -#PickLog types (M)onsters Drop, (P)layers Drop/Take, Mobs Drop (L)oot Drop/Take, -# Players (T)rade Give/Take, Players (V)ending Sell/Take, (S)hop Sell/Take, (N)PC Give/Take, -# (C)onsumable Items, (A)dministrators Create/Delete, Sto(R)age, (G)uild Storage, -# (E)mail attachment,(B)uying Store, Pr(O)duced Items/Ingredients, Auct(I)oned Items, -# (X) Other, (D) Stolen from mobs, (U) MVP Prizes - -#Database: ragnarok -#Table: picklog -CREATE TABLE `picklog` ( - `id` int(11) NOT NULL auto_increment, - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `char_id` int(11) NOT NULL default '0', - `type` enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL default 'P', - `nameid` int(11) NOT NULL default '0', - `amount` int(11) NOT NULL default '1', - `refine` tinyint(3) unsigned NOT NULL default '0', - `card0` int(11) NOT NULL default '0', - `card1` int(11) NOT NULL default '0', - `card2` int(11) NOT NULL default '0', - `card3` int(11) NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - `map` varchar(11) NOT NULL default '', - PRIMARY KEY (`id`), - INDEX (`type`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +-- PickLog Types +-- (M)onsters Drop +-- (P)layers Drop/Take +-- Mobs Drop (L)oot Drop/Take +-- Players (T)rade Give/Take +-- Players (V)ending Sell/Take +-- (S)hop Sell/Take +-- (N)PC Give/Take +-- (C)onsumable Items +-- (A)dministrators Create/Delete +-- Sto(R)age +-- (G)uild Storage +-- (E)mail attachment +-- (B)uying Store +-- Pr(O)duced Items/Ingredients +-- Auct(I)oned Items +-- (X) Other +-- (D) Stolen from mobs +-- (U) MVP Prizes -#ZenyLog types (M)onsters,(T)rade,(V)ending Sell/Buy,(S)hop Sell/Buy,(N)PC Change amount,(A)dministrators,(E)Mail,(B)uying Store -#Database: ragnarok -#Table: zenylog -CREATE TABLE `zenylog` ( - `id` int(11) NOT NULL auto_increment, - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `char_id` int(11) NOT NULL default '0', - `src_id` int(11) NOT NULL default '0', - `type` enum('T','V','P','M','S','N','D','C','A','E','I','B') NOT NULL default 'S', - `amount` int(11) NOT NULL default '0', - `map` varchar(11) NOT NULL default '', - PRIMARY KEY (`id`), - INDEX (`type`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Table structure for table `atcommandlog` +-- -#Database: ragnarok -#Table: branchlog -CREATE TABLE `branchlog` ( - `branch_id` mediumint(9) unsigned NOT NULL auto_increment, - `branch_date` datetime NOT NULL default '0000-00-00 00:00:00', - `account_id` int(11) NOT NULL default '0', - `char_id` int(11) NOT NULL default '0', - `char_name` varchar(25) NOT NULL default '', - `map` varchar(11) NOT NULL default '', - PRIMARY KEY (`branch_id`), +CREATE TABLE IF NOT EXISTS `atcommandlog` ( + `atcommand_id` MEDIUMINT(9) UNSIGNED NOT NULL AUTO_INCREMENT, + `atcommand_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_name` VARCHAR(25) NOT NULL DEFAULT '', + `map` VARCHAR(11) NOT NULL DEFAULT '', + `command` VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY (`atcommand_id`), INDEX (`account_id`), INDEX (`char_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 ; -#Database: ragnarok -#Table: mvplog -CREATE TABLE `mvplog` ( - `mvp_id` mediumint(9) unsigned NOT NULL auto_increment, - `mvp_date` datetime NOT NULL default '0000-00-00 00:00:00', - `kill_char_id` int(11) NOT NULL default '0', - `monster_id` smallint(6) NOT NULL default '0', - `prize` int(11) NOT NULL default '0', - `mvpexp` mediumint(9) NOT NULL default '0', - `map` varchar(11) NOT NULL default '', - PRIMARY KEY (`mvp_id`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Table structure for table `branchlog` +-- -#Database: ragnarok -#Table: atcommandlog -CREATE TABLE `atcommandlog` ( - `atcommand_id` mediumint(9) unsigned NOT NULL auto_increment, - `atcommand_date` datetime NOT NULL default '0000-00-00 00:00:00', - `account_id` int(11) unsigned NOT NULL default '0', - `char_id` int(11) unsigned NOT NULL default '0', - `char_name` varchar(25) NOT NULL default '', - `map` varchar(11) NOT NULL default '', - `command` varchar(255) NOT NULL default '', - PRIMARY KEY (`atcommand_id`), +CREATE TABLE IF NOT EXISTS `branchlog` ( + `branch_id` MEDIUMINT(9) UNSIGNED NOT NULL AUTO_INCREMENT, + `branch_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `account_id` INT(11) NOT NULL DEFAULT '0', + `char_id` INT(11) NOT NULL DEFAULT '0', + `char_name` VARCHAR(25) NOT NULL DEFAULT '', + `map` VARCHAR(11) NOT NULL DEFAULT '', + PRIMARY KEY(`branch_id`), INDEX (`account_id`), INDEX (`char_id`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1; -#Database: ragnarok -#Table: npclog -CREATE TABLE `npclog` ( - `npc_id` mediumint(9) unsigned NOT NULL auto_increment, - `npc_date` datetime NOT NULL default '0000-00-00 00:00:00', - `account_id` int(11) unsigned NOT NULL default '0', - `char_id` int(11) unsigned NOT NULL default '0', - `char_name` varchar(25) NOT NULL default '', - `map` varchar(11) NOT NULL default '', - `mes` varchar(255) NOT NULL default '', - PRIMARY KEY (`npc_id`), - INDEX (`account_id`), - INDEX (`char_id`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Table structure for table `chatlog` +-- -#ChatLog types Gl(O)bal,(W)hisper,(P)arty,(G)uild,(M)ain chat -#Database: ragnarok -#Table: chatlog -CREATE TABLE `chatlog` ( - `id` bigint(20) NOT NULL auto_increment, - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `type` enum('O','W','P','G','M') NOT NULL default 'O', - `type_id` int(11) NOT NULL default '0', - `src_charid` int(11) NOT NULL default '0', - `src_accountid` int(11) NOT NULL default '0', - `src_map` varchar(11) NOT NULL default '', - `src_map_x` smallint(4) NOT NULL default '0', - `src_map_y` smallint(4) NOT NULL default '0', - `dst_charname` varchar(25) NOT NULL default '', - `message` varchar(150) NOT NULL default '', - PRIMARY KEY (`id`), +CREATE TABLE IF NOT EXISTS `chatlog` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT, + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `type` ENUM('O','W','P','G','M') NOT NULL DEFAULT 'O', + `type_id` INT(11) NOT NULL DEFAULT '0', + `src_charid` INT(11) NOT NULL DEFAULT '0', + `src_accountid` INT(11) NOT NULL DEFAULT '0', + `src_map` VARCHAR(11) NOT NULL DEFAULT '', + `src_map_x` SMALLINT(4) NOT NULL DEFAULT '0', + `src_map_y` SMALLINT(4) NOT NULL DEFAULT '0', + `dst_charname` VARCHAR(25) NOT NULL DEFAULT '', + `message` VARCHAR(150) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), INDEX (`src_accountid`), INDEX (`src_charid`) -) ENGINE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1; + +-- +-- Table structure for table `loginlog` +-- -#Database: ragnarok -#Table: loginlog -CREATE TABLE `loginlog` ( - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `ip` varchar(15) NOT NULL default '', - `user` varchar(23) NOT NULL default '', - `rcode` tinyint(4) NOT NULL default '0', - `log` varchar(255) NOT NULL default '', +CREATE TABLE IF NOT EXISTS `loginlog` ( + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `ip` VARCHAR(15) NOT NULL DEFAULT '', + `user` VARCHAR(23) NOT NULL DEFAULT '', + `rcode` TINYINT(4) NOT NULL DEFAULT '0', + `log` VARCHAR(255) NOT NULL DEFAULT '', INDEX (`ip`) -) ENGINE=MyISAM ; +) ENGINE=MyISAM; + +-- +-- Table structure for table `mvplog` +-- + +CREATE TABLE IF NOT EXISTS `mvplog` ( + `mvp_id` MEDIUMINT(9) UNSIGNED NOT NULL AUTO_INCREMENT, + `mvp_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `kill_char_id` INT(11) NOT NULL DEFAULT '0', + `monster_id` SMALLINT(6) NOT NULL DEFAULT '0', + `prize` INT(11) NOT NULL DEFAULT '0', + `mvpexp` MEDIUMINT(9) NOT NULL DEFAULT '0', + `map` VARCHAR(11) NOT NULL DEFAULT '', + PRIMARY KEY (`mvp_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +-- +-- Table structure for table `npclog` +-- + +CREATE TABLE IF NOT EXISTS `npclog` ( + `npc_id` MEDIUMINT(9) UNSIGNED NOT NULL AUTO_INCREMENT, + `npc_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_name` VARCHAR(25) NOT NULL DEFAULT '', + `map` VARCHAR(11) NOT NULL DEFAULT '', + `mes` VARCHAR(255) NOT NULL DEFAULT '', + PRIMARY KEY (`npc_id`), + INDEX (`account_id`), + INDEX (`char_id`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +-- +-- Table structure for table `picklog` +-- + +CREATE TABLE IF NOT EXISTS `picklog` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `char_id` INT(11) NOT NULL DEFAULT '0', + `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL DEFAULT 'P', + `nameid` INT(11) NOT NULL DEFAULT '0', + `amount` INT(11) NOT NULL DEFAULT '1', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `card0` INT(11) NOT NULL DEFAULT '0', + `card1` INT(11) NOT NULL DEFAULT '0', + `card2` INT(11) NOT NULL DEFAULT '0', + `card3` INT(11) NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + `map` VARCHAR(11) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + INDEX (`type`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + +-- +-- Table structure for table `zenylog` +-- + +CREATE TABLE IF NOT EXISTS `zenylog` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `char_id` INT(11) NOT NULL DEFAULT '0', + `src_id` INT(11) NOT NULL DEFAULT '0', + `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B') NOT NULL DEFAULT 'S', + `amount` INT(11) NOT NULL DEFAULT '0', + `map` VARCHAR(11) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + INDEX (`type`) +) ENGINE=MyISAM AUTO_INCREMENT=1; + diff --git a/sql-files/main.sql b/sql-files/main.sql index 9c2c1ca43..22cba1660 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -1,51 +1,114 @@ -- +-- +-- Table structure for table `account_data` + +CREATE TABLE IF NOT EXISTS `account_data` ( + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bank_vault` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', + `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', + `base_death` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', + PRIMARY KEY (`account_id`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `acc_reg_num_db` +-- + +CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `acc_reg_str_db` +-- + +CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; + +-- -- Table structure for table `auction` -- CREATE TABLE IF NOT EXISTS `auction` ( - `auction_id` bigint(20) unsigned NOT NULL auto_increment, - `seller_id` int(11) unsigned NOT NULL default '0', - `seller_name` varchar(30) NOT NULL default '', - `buyer_id` int(11) unsigned NOT NULL default '0', - `buyer_name` varchar(30) NOT NULL default '', - `price` int(11) unsigned NOT NULL default '0', - `buynow` int(11) unsigned NOT NULL default '0', - `hours` smallint(6) NOT NULL default '0', - `timestamp` int(11) unsigned NOT NULL default '0', - `nameid` int(11) unsigned NOT NULL default '0', - `item_name` varchar(50) NOT NULL default '', - `type` smallint(6) NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) unsigned NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`auction_id`) + `auction_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `seller_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `seller_name` VARCHAR(30) NOT NULL DEFAULT '', + `buyer_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `buyer_name` VARCHAR(30) NOT NULL DEFAULT '', + `price` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `buynow` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `hours` SMALLINT(6) NOT NULL DEFAULT '0', + `timestamp` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `item_name` VARCHAR(50) NOT NULL DEFAULT '', + `type` SMALLINT(6) NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`auction_id`) ) ENGINE=MyISAM; -- +-- Table structure for table `autotrade_data` +-- + +CREATE TABLE IF NOT EXISTS `autotrade_data` ( + `char_id` INT(11) NOT NULL DEFAULT '0', + `itemkey` INT(11) NOT NULL DEFAULT '0', + `amount` INT(11) NOT NULL DEFAULT '0', + `price` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`itemkey`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `autotrade_merchants` +-- + +CREATE TABLE IF NOT EXISTS `autotrade_merchants` ( + `account_id` INT(11) NOT NULL DEFAULT '0', + `char_id` INT(11) NOT NULL DEFAULT '0', + `sex` TINYINT(2) NOT NULL DEFAULT '0', + `title` VARCHAR(80) NOT NULL DEFAULT 'Buy From Me!', + PRIMARY KEY (`account_id`,`char_id`) +) ENGINE=MyISAM; + +-- -- Table structure for table `cart_inventory` -- CREATE TABLE IF NOT EXISTS `cart_inventory` ( - `id` int(11) NOT NULL auto_increment, - `char_id` int(11) NOT NULL default '0', - `nameid` int(11) NOT NULL default '0', - `amount` int(11) NOT NULL default '0', - `equip` int(11) unsigned NOT NULL default '0', - `identify` smallint(6) NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `expire_time` int(11) unsigned NOT NULL default '0', - `bound` tinyint(1) unsigned NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), + `id` INT(11) NOT NULL AUTO_INCREMENT, + `char_id` INT(11) NOT NULL DEFAULT '0', + `nameid` INT(11) NOT NULL DEFAULT '0', + `amount` INT(11) NOT NULL DEFAULT '0', + `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `identify` SMALLINT(6) NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -54,65 +117,65 @@ CREATE TABLE IF NOT EXISTS `cart_inventory` ( -- CREATE TABLE IF NOT EXISTS `char` ( - `char_id` int(11) unsigned NOT NULL auto_increment, - `account_id` int(11) unsigned NOT NULL default '0', - `char_num` tinyint(1) NOT NULL default '0', - `name` varchar(30) NOT NULL DEFAULT '', - `class` smallint(6) unsigned NOT NULL default '0', - `base_level` smallint(6) unsigned NOT NULL default '1', - `job_level` smallint(6) unsigned NOT NULL default '1', - `base_exp` bigint(20) unsigned NOT NULL default '0', - `job_exp` bigint(20) unsigned NOT NULL default '0', - `zeny` int(11) unsigned NOT NULL default '0', - `str` smallint(4) unsigned NOT NULL default '0', - `agi` smallint(4) unsigned NOT NULL default '0', - `vit` smallint(4) unsigned NOT NULL default '0', - `int` smallint(4) unsigned NOT NULL default '0', - `dex` smallint(4) unsigned NOT NULL default '0', - `luk` smallint(4) unsigned NOT NULL default '0', - `max_hp` mediumint(8) unsigned NOT NULL default '0', - `hp` mediumint(8) unsigned NOT NULL default '0', - `max_sp` mediumint(6) unsigned NOT NULL default '0', - `sp` mediumint(6) unsigned NOT NULL default '0', - `status_point` int(11) unsigned NOT NULL default '0', - `skill_point` int(11) unsigned NOT NULL default '0', - `option` int(11) NOT NULL default '0', - `karma` tinyint(3) NOT NULL default '0', - `manner` smallint(6) NOT NULL default '0', - `party_id` int(11) unsigned NOT NULL default '0', - `guild_id` int(11) unsigned NOT NULL default '0', - `pet_id` int(11) unsigned NOT NULL default '0', - `homun_id` int(11) unsigned NOT NULL default '0', - `elemental_id` int(11) unsigned NOT NULL default '0', - `hair` tinyint(4) unsigned NOT NULL default '0', - `hair_color` smallint(5) unsigned NOT NULL default '0', - `clothes_color` smallint(5) unsigned NOT NULL default '0', - `weapon` smallint(6) unsigned NOT NULL default '0', - `shield` smallint(6) unsigned NOT NULL default '0', - `head_top` smallint(6) unsigned NOT NULL default '0', - `head_mid` smallint(6) unsigned NOT NULL default '0', - `head_bottom` smallint(6) unsigned NOT NULL default '0', + `char_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_num` TINYINT(1) NOT NULL DEFAULT '0', + `name` VARCHAR(30) NOT NULL DEFAULT '', + `class` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `base_level` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '1', + `job_level` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '1', + `base_exp` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + `job_exp` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `status_point` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `skill_point` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `option` INT(11) NOT NULL DEFAULT '0', + `karma` TINYINT(3) NOT NULL DEFAULT '0', + `manner` SMALLINT(6) NOT NULL DEFAULT '0', + `party_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `pet_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `homun_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `elemental_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `hair` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `hair_color` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', + `clothes_color` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', + `weapon` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `shield` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `head_top` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `head_mid` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `head_bottom` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `robe` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', - `last_map` varchar(11) NOT NULL default '', - `last_x` smallint(4) unsigned NOT NULL default '53', - `last_y` smallint(4) unsigned NOT NULL default '111', - `save_map` varchar(11) NOT NULL default '', - `save_x` smallint(4) unsigned NOT NULL default '53', - `save_y` smallint(4) unsigned NOT NULL default '111', - `partner_id` int(11) unsigned NOT NULL default '0', - `online` tinyint(2) NOT NULL default '0', - `father` int(11) unsigned NOT NULL default '0', - `mother` int(11) unsigned NOT NULL default '0', - `child` int(11) unsigned NOT NULL default '0', - `fame` int(11) unsigned NOT NULL default '0', - `rename` SMALLINT(3) unsigned NOT NULL default '0', - `delete_date` INT(11) unsigned NOT NULL DEFAULT '0', - `slotchange` SMALLINT(3) unsigned NOT NULL default '0', - `char_opt` INT( 11 ) unsigned NOT NULL default '0', - `font` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0', - `unban_time` int(11) unsigned NOT NULL default '0', - `uniqueitem_counter` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`char_id`), + `last_map` VARCHAR(11) NOT NULL DEFAULT '', + `last_x` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '53', + `last_y` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '111', + `save_map` VARCHAR(11) NOT NULL DEFAULT '', + `save_x` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '53', + `save_y` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '111', + `partner_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `online` TINYINT(2) NOT NULL DEFAULT '0', + `father` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `mother` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `child` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `fame` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `rename` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', + `delete_date` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `slotchange` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', + `char_opt` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `font` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`), UNIQUE KEY `name_key` (`name`), KEY `account_id` (`account_id`), KEY `party_id` (`party_id`), @@ -121,24 +184,50 @@ CREATE TABLE IF NOT EXISTS `char` ( ) ENGINE=MyISAM AUTO_INCREMENT=150000; -- +-- Table structure for table `char_reg_num_db` +-- + +CREATE TABLE IF NOT EXISTS `char_reg_num_db` ( + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `char_reg_str_db` +-- + +CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; + +-- -- Table structure for table `charlog` -- CREATE TABLE IF NOT EXISTS `charlog` ( - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `char_msg` varchar(255) NOT NULL default 'char select', - `account_id` int(11) NOT NULL default '0', - `char_id` int(11) unsigned NOT NULL default '0', - `char_num` tinyint(4) NOT NULL default '0', - `name` varchar(23) NOT NULL default '', - `str` int(11) unsigned NOT NULL default '0', - `agi` int(11) unsigned NOT NULL default '0', - `vit` int(11) unsigned NOT NULL default '0', - `int` int(11) unsigned NOT NULL default '0', - `dex` int(11) unsigned NOT NULL default '0', - `luk` int(11) unsigned NOT NULL default '0', - `hair` tinyint(4) NOT NULL default '0', - `hair_color` int(11) NOT NULL default '0' + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `char_msg` VARCHAR(255) NOT NULL DEFAULT 'char select', + `account_id` INT(11) NOT NULL DEFAULT '0', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_num` TINYINT(4) NOT NULL DEFAULT '0', + `name` VARCHAR(23) NOT NULL DEFAULT '', + `str` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `agi` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `vit` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `INT` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `dex` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `luk` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `hair` TINYINT(4) NOT NULL DEFAULT '0', + `hair_color` INT(11) NOT NULL DEFAULT '0' ) ENGINE=MyISAM; -- @@ -146,24 +235,24 @@ CREATE TABLE IF NOT EXISTS `charlog` ( -- CREATE TABLE IF NOT EXISTS `elemental` ( - `ele_id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) NOT NULL, - `class` mediumint(9) unsigned NOT NULL default '0', - `mode` int(11) unsigned NOT NULL default '1', - `hp` int(12) NOT NULL default '1', - `sp` int(12) NOT NULL default '1', - `max_hp` mediumint(8) unsigned NOT NULL default '0', - `max_sp` mediumint(6) unsigned NOT NULL default '0', - `atk1` MEDIUMINT(6) unsigned NOT NULL default '0', - `atk2` MEDIUMINT(6) unsigned NOT NULL default '0', - `matk` MEDIUMINT(6) unsigned NOT NULL default '0', - `aspd` smallint(4) unsigned NOT NULL default '0', - `def` smallint(4) unsigned NOT NULL default '0', - `mdef` smallint(4) unsigned NOT NULL default '0', - `flee` smallint(4) unsigned NOT NULL default '0', - `hit` smallint(4) unsigned NOT NULL default '0', - `life_time` int(11) NOT NULL default '0', - PRIMARY KEY (`ele_id`) + `ele_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `char_id` INT(11) NOT NULL, + `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `mode` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `hp` INT(12) NOT NULL DEFAULT '1', + `sp` INT(12) NOT NULL DEFAULT '1', + `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `life_time` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`ele_id`) ) ENGINE=MyISAM; -- @@ -171,9 +260,9 @@ CREATE TABLE IF NOT EXISTS `elemental` ( -- CREATE TABLE IF NOT EXISTS `friends` ( - `char_id` int(11) NOT NULL default '0', - `friend_account` int(11) NOT NULL default '0', - `friend_id` int(11) NOT NULL default '0', + `char_id` INT(11) NOT NULL DEFAULT '0', + `friend_account` INT(11) NOT NULL DEFAULT '0', + `friend_id` INT(11) NOT NULL DEFAULT '0', KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -183,35 +272,61 @@ CREATE TABLE IF NOT EXISTS `friends` ( CREATE TABLE IF NOT EXISTS `hotkey` ( `char_id` INT(11) NOT NULL, - `hotkey` TINYINT(2) unsigned NOT NULL, - `type` TINYINT(1) unsigned NOT NULL default '0', - `itemskill_id` INT(11) unsigned NOT NULL default '0', - `skill_lvl` TINYINT(4) unsigned NOT NULL default '0', + `hotkey` TINYINT(2) UNSIGNED NOT NULL, + `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `itemskill_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `skill_lvl` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`char_id`,`hotkey`) ) ENGINE=MyISAM; -- +-- Table structure for table `global_acc_reg_num_db` +-- + +CREATE TABLE IF NOT EXISTS `global_acc_reg_num_db` ( + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `global_acc_reg_str_db` +-- + +CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; + +-- -- Table structure for table `guild` -- CREATE TABLE IF NOT EXISTS `guild` ( - `guild_id` int(11) unsigned NOT NULL auto_increment, - `name` varchar(24) NOT NULL default '', - `char_id` int(11) unsigned NOT NULL default '0', - `master` varchar(24) NOT NULL default '', - `guild_lv` tinyint(6) unsigned NOT NULL default '0', - `connect_member` tinyint(6) unsigned NOT NULL default '0', - `max_member` tinyint(6) unsigned NOT NULL default '0', - `average_lv` smallint(6) unsigned NOT NULL default '1', - `exp` bigint(20) unsigned NOT NULL default '0', - `next_exp` int(11) unsigned NOT NULL default '0', - `skill_point` tinyint(11) unsigned NOT NULL default '0', - `mes1` varchar(60) NOT NULL default '', - `mes2` varchar(120) NOT NULL default '', - `emblem_len` int(11) unsigned NOT NULL default '0', - `emblem_id` int(11) unsigned NOT NULL default '0', + `guild_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `name` VARCHAR(24) NOT NULL DEFAULT '', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `master` VARCHAR(24) NOT NULL DEFAULT '', + `guild_lv` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `connect_member` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `max_member` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `average_lv` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '1', + `exp` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + `next_exp` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `skill_point` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + `mes1` VARCHAR(60) NOT NULL DEFAULT '', + `mes2` VARCHAR(120) NOT NULL DEFAULT '', + `emblem_len` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `emblem_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', `emblem_data` blob, - PRIMARY KEY (`guild_id`,`char_id`), + PRIMARY KEY (`guild_id`,`char_id`), UNIQUE KEY `guild_id` (`guild_id`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -221,11 +336,11 @@ CREATE TABLE IF NOT EXISTS `guild` ( -- CREATE TABLE IF NOT EXISTS `guild_alliance` ( - `guild_id` int(11) unsigned NOT NULL default '0', - `opposition` int(11) unsigned NOT NULL default '0', - `alliance_id` int(11) unsigned NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - PRIMARY KEY (`guild_id`,`alliance_id`), + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `opposition` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `alliance_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + PRIMARY KEY (`guild_id`,`alliance_id`), KEY `alliance_id` (`alliance_id`) ) ENGINE=MyISAM; @@ -234,25 +349,25 @@ CREATE TABLE IF NOT EXISTS `guild_alliance` ( -- CREATE TABLE IF NOT EXISTS `guild_castle` ( - `castle_id` int(11) unsigned NOT NULL default '0', - `guild_id` int(11) unsigned NOT NULL default '0', - `economy` int(11) unsigned NOT NULL default '0', - `defense` int(11) unsigned NOT NULL default '0', - `triggerE` int(11) unsigned NOT NULL default '0', - `triggerD` int(11) unsigned NOT NULL default '0', - `nextTime` int(11) unsigned NOT NULL default '0', - `payTime` int(11) unsigned NOT NULL default '0', - `createTime` int(11) unsigned NOT NULL default '0', - `visibleC` int(11) unsigned NOT NULL default '0', - `visibleG0` int(11) unsigned NOT NULL default '0', - `visibleG1` int(11) unsigned NOT NULL default '0', - `visibleG2` int(11) unsigned NOT NULL default '0', - `visibleG3` int(11) unsigned NOT NULL default '0', - `visibleG4` int(11) unsigned NOT NULL default '0', - `visibleG5` int(11) unsigned NOT NULL default '0', - `visibleG6` int(11) unsigned NOT NULL default '0', - `visibleG7` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`castle_id`), + `castle_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `economy` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `defense` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `triggerE` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `triggerD` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nextTime` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `payTime` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `createTime` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleC` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG0` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG1` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG2` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG3` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG4` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG5` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG6` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `visibleG7` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`castle_id`), KEY `guild_id` (`guild_id`) ) ENGINE=MyISAM; @@ -261,11 +376,11 @@ CREATE TABLE IF NOT EXISTS `guild_castle` ( -- CREATE TABLE IF NOT EXISTS `guild_expulsion` ( - `guild_id` int(11) unsigned NOT NULL default '0', - `account_id` int(11) unsigned NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - `mes` varchar(40) NOT NULL default '', - PRIMARY KEY (`guild_id`,`name`) + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + `mes` VARCHAR(40) NOT NULL DEFAULT '', + PRIMARY KEY (`guild_id`,`name`) ) ENGINE=MyISAM; -- @@ -273,20 +388,20 @@ CREATE TABLE IF NOT EXISTS `guild_expulsion` ( -- CREATE TABLE IF NOT EXISTS `guild_member` ( - `guild_id` int(11) unsigned NOT NULL default '0', - `account_id` int(11) unsigned NOT NULL default '0', - `char_id` int(11) unsigned NOT NULL default '0', - `hair` tinyint(6) unsigned NOT NULL default '0', - `hair_color` smallint(6) unsigned NOT NULL default '0', - `gender` tinyint(6) unsigned NOT NULL default '0', - `class` smallint(6) unsigned NOT NULL default '0', - `lv` smallint(6) unsigned NOT NULL default '0', - `exp` bigint(20) unsigned NOT NULL default '0', - `exp_payper` tinyint(11) unsigned NOT NULL default '0', - `online` tinyint(4) unsigned NOT NULL default '0', - `position` tinyint(6) unsigned NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - PRIMARY KEY (`guild_id`,`char_id`), + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `hair` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `hair_color` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `gender` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `class` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `lv` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `exp` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + `exp_payper` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + `online` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `position` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + PRIMARY KEY (`guild_id`,`char_id`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -295,12 +410,12 @@ CREATE TABLE IF NOT EXISTS `guild_member` ( -- CREATE TABLE IF NOT EXISTS `guild_position` ( - `guild_id` int(9) unsigned NOT NULL default '0', - `position` tinyint(6) unsigned NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - `mode` tinyint(11) unsigned NOT NULL default '0', - `exp_mode` tinyint(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guild_id`,`position`) + `guild_id` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `position` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + `mode` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + `exp_mode` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`guild_id`,`position`) ) ENGINE=MyISAM; -- @@ -308,10 +423,10 @@ CREATE TABLE IF NOT EXISTS `guild_position` ( -- CREATE TABLE IF NOT EXISTS `guild_skill` ( - `guild_id` int(11) unsigned NOT NULL default '0', - `id` smallint(11) unsigned NOT NULL default '0', - `lv` tinyint(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guild_id`,`id`) + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `id` SMALLINT(11) UNSIGNED NOT NULL DEFAULT '0', + `lv` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`guild_id`,`id`) ) ENGINE=MyISAM; -- @@ -319,22 +434,22 @@ CREATE TABLE IF NOT EXISTS `guild_skill` ( -- CREATE TABLE IF NOT EXISTS `guild_storage` ( - `id` int(10) unsigned NOT NULL auto_increment, - `guild_id` int(11) unsigned NOT NULL default '0', - `nameid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - `equip` int(11) unsigned NOT NULL default '0', - `identify` smallint(6) unsigned NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) unsigned NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `expire_time` int(11) unsigned NOT NULL default '0', - `bound` tinyint(1) unsigned NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), + `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `guild_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `identify` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `guild_id` (`guild_id`) ) ENGINE=MyISAM; @@ -343,63 +458,73 @@ CREATE TABLE IF NOT EXISTS `guild_storage` ( -- CREATE TABLE IF NOT EXISTS `homunculus` ( - `homun_id` int(11) NOT NULL auto_increment, - `char_id` int(11) NOT NULL, - `class` mediumint(9) unsigned NOT NULL default '0', - `prev_class` mediumint(9) NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - `level` smallint(4) NOT NULL default '0', - `exp` int(12) NOT NULL default '0', - `intimacy` int(12) NOT NULL default '0', - `hunger` smallint(4) NOT NULL default '0', - `str` smallint(4) unsigned NOT NULL default '0', - `agi` smallint(4) unsigned NOT NULL default '0', - `vit` smallint(4) unsigned NOT NULL default '0', - `int` smallint(4) unsigned NOT NULL default '0', - `dex` smallint(4) unsigned NOT NULL default '0', - `luk` smallint(4) unsigned NOT NULL default '0', - `hp` int(12) NOT NULL default '1', - `max_hp` int(12) NOT NULL default '1', - `sp` int(12) NOT NULL default '1', - `max_sp` int(12) NOT NULL default '1', - `skill_point` smallint(4) unsigned NOT NULL default '0', - `alive` tinyint(2) NOT NULL default '1', - `rename_flag` tinyint(2) NOT NULL default '0', - `vaporize` tinyint(2) NOT NULL default '0', - PRIMARY KEY (`homun_id`) + `homun_id` INT(11) NOT NULL AUTO_INCREMENT, + `char_id` INT(11) NOT NULL, + `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `prev_class` MEDIUMINT(9) NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + `level` SMALLINT(4) NOT NULL DEFAULT '0', + `exp` INT(12) NOT NULL DEFAULT '0', + `intimacy` INT(12) NOT NULL DEFAULT '0', + `hunger` SMALLINT(4) NOT NULL DEFAULT '0', + `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `hp` INT(12) NOT NULL DEFAULT '1', + `max_hp` INT(12) NOT NULL DEFAULT '1', + `sp` INT(12) NOT NULL DEFAULT '1', + `max_sp` INT(12) NOT NULL DEFAULT '1', + `skill_point` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `alive` TINYINT(2) NOT NULL DEFAULT '1', + `rename_flag` TINYINT(2) NOT NULL DEFAULT '0', + `vaporize` TINYINT(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`homun_id`) ) ENGINE=MyISAM; -- --- Table structure for table `interlog` +-- Table structure for table `INTerlog` -- -CREATE TABLE IF NOT EXISTS `interlog` ( - `time` datetime NOT NULL default '0000-00-00 00:00:00', - `log` varchar(255) NOT NULL default '' +CREATE TABLE IF NOT EXISTS `INTerlog` ( + `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `log` VARCHAR(255) NOT NULL DEFAULT '' ) ENGINE=MyISAM; -- +-- Table structure for table `INTerreg` +-- + +CREATE TABLE IF NOT EXISTS `interreg` ( + `varname` VARCHAR(11) NOT NULL, + `value` VARCHAR(20) NOT NULL, + PRIMARY KEY (`varname`) +) ENGINE=InnoDB; + +-- -- Table structure for table `inventory` -- CREATE TABLE IF NOT EXISTS `inventory` ( - `id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) unsigned NOT NULL default '0', - `nameid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - `equip` int(11) unsigned NOT NULL default '0', - `identify` smallint(6) NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) unsigned NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `expire_time` int(11) unsigned NOT NULL default '0', - `favorite` tinyint(3) unsigned NOT NULL default '0', - `bound` tinyint(1) unsigned NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), + `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `identify` SMALLINT(6) NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `favorite` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -408,10 +533,10 @@ CREATE TABLE IF NOT EXISTS `inventory` ( -- CREATE TABLE IF NOT EXISTS `ipbanlist` ( - `list` varchar(255) NOT NULL default '', - `btime` datetime NOT NULL default '0000-00-00 00:00:00', - `rtime` datetime NOT NULL default '0000-00-00 00:00:00', - `reason` varchar(255) NOT NULL default '', + `list` VARCHAR(255) NOT NULL DEFAULT '', + `btime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `rtime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `reason` VARCHAR(255) NOT NULL DEFAULT '', KEY (`list`) ) ENGINE=MyISAM; @@ -420,28 +545,28 @@ CREATE TABLE IF NOT EXISTS `ipbanlist` ( -- CREATE TABLE IF NOT EXISTS `login` ( - `account_id` int(11) unsigned NOT NULL auto_increment, - `userid` varchar(23) NOT NULL default '', - `user_pass` varchar(32) NOT NULL default '', - `sex` enum('M','F','S') NOT NULL default 'M', - `email` varchar(39) NOT NULL default '', - `group_id` tinyint(3) NOT NULL default '0', - `state` int(11) unsigned NOT NULL default '0', - `unban_time` int(11) unsigned NOT NULL default '0', - `expiration_time` int(11) unsigned NOT NULL default '0', - `logincount` mediumint(9) unsigned NOT NULL default '0', - `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00', - `last_ip` varchar(100) NOT NULL default '', + `account_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `userid` VARCHAR(23) NOT NULL DEFAULT '', + `user_pass` VARCHAR(32) NOT NULL DEFAULT '', + `sex` ENUM('M','F','S') NOT NULL DEFAULT 'M', + `email` VARCHAR(39) NOT NULL DEFAULT '', + `group_id` TINYINT(3) NOT NULL DEFAULT '0', + `state` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `expiration_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `logincount` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `lastlogin` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_ip` VARCHAR(100) NOT NULL DEFAULT '', `birthdate` DATE NOT NULL DEFAULT '0000-00-00', - `character_slots` TINYINT( 3 ) unsigned NOT NULL default '0', - `pincode` varchar(4) NOT NULL default '', - `pincode_change` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`account_id`), + `character_slots` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `pincode` VARCHAR(4) NOT NULL DEFAULT '', + `pincode_change` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`), KEY `name` (`userid`) ) ENGINE=MyISAM AUTO_INCREMENT=2000000; -- added standard accounts for servers, VERY INSECURE!!! --- inserted into the table called login which is above +-- inserted INTo the table called login which is above INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com'); @@ -450,10 +575,21 @@ INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES -- CREATE TABLE IF NOT EXISTS `mapreg` ( - `varname` varchar(32) BINARY NOT NULL, - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(255) NOT NULL, - PRIMARY KEY (`varname`,`index`) + `varname` VARCHAR(32) BINARY NOT NULL, + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(255) NOT NULL, + PRIMARY KEY (`varname`,`index`) +) ENGINE=MyISAM; + +-- +-- Table structure for table `npc_market_data` +-- + +CREATE TABLE IF NOT EXISTS `npc_market_data` ( + `name` VARCHAR(24) NOT NULL DEFAULT '', + `itemid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`name`,`itemid`) ) ENGINE=MyISAM; -- @@ -461,17 +597,17 @@ CREATE TABLE IF NOT EXISTS `mapreg` ( -- CREATE TABLE IF NOT EXISTS `sc_data` ( - `account_id` int(11) unsigned NOT NULL, - `char_id` int(11) unsigned NOT NULL, - `type` smallint(11) unsigned NOT NULL, - `tick` int(11) NOT NULL, - `val1` int(11) NOT NULL default '0', - `val2` int(11) NOT NULL default '0', - `val3` int(11) NOT NULL default '0', - `val4` int(11) NOT NULL default '0', + `account_id` INT(11) UNSIGNED NOT NULL, + `char_id` INT(11) UNSIGNED NOT NULL, + `type` SMALLINT(11) UNSIGNED NOT NULL, + `tick` INT(11) NOT NULL, + `val1` INT(11) NOT NULL DEFAULT '0', + `val2` INT(11) NOT NULL DEFAULT '0', + `val3` INT(11) NOT NULL DEFAULT '0', + `val4` INT(11) NOT NULL DEFAULT '0', KEY (`account_id`), KEY (`char_id`), - PRIMARY KEY (`account_id`,`char_id`,`type`) + PRIMARY KEY (`account_id`,`char_id`,`type`) ) ENGINE=MyISAM; -- @@ -479,27 +615,27 @@ CREATE TABLE IF NOT EXISTS `sc_data` ( -- CREATE TABLE IF NOT EXISTS `mail` ( - `id` bigint(20) unsigned NOT NULL auto_increment, - `send_name` varchar(30) NOT NULL default '', - `send_id` int(11) unsigned NOT NULL default '0', - `dest_name` varchar(30) NOT NULL default '', - `dest_id` int(11) unsigned NOT NULL default '0', - `title` varchar(45) NOT NULL default '', - `message` varchar(255) NOT NULL default '', - `time` int(11) unsigned NOT NULL default '0', - `status` tinyint(2) NOT NULL default '0', - `zeny` int(11) unsigned NOT NULL default '0', - `nameid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) unsigned NOT NULL default '0', - `identify` smallint(6) NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`id`) + `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `send_name` VARCHAR(30) NOT NULL DEFAULT '', + `send_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `dest_name` VARCHAR(30) NOT NULL DEFAULT '', + `dest_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `title` VARCHAR(45) NOT NULL DEFAULT '', + `message` VARCHAR(255) NOT NULL DEFAULT '', + `time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `status` TINYINT(2) NOT NULL DEFAULT '0', + `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `identify` SMALLINT(6) NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=MyISAM; -- @@ -507,12 +643,12 @@ CREATE TABLE IF NOT EXISTS `mail` ( -- CREATE TABLE IF NOT EXISTS `memo` ( - `memo_id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) unsigned NOT NULL default '0', - `map` varchar(11) NOT NULL default '', - `x` smallint(4) unsigned NOT NULL default '0', - `y` smallint(4) unsigned NOT NULL default '0', - PRIMARY KEY (`memo_id`), + `memo_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `map` VARCHAR(11) NOT NULL DEFAULT '', + `x` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `y` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`memo_id`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; @@ -521,14 +657,14 @@ CREATE TABLE IF NOT EXISTS `memo` ( -- CREATE TABLE IF NOT EXISTS `mercenary` ( - `mer_id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) NOT NULL, - `class` mediumint(9) unsigned NOT NULL default '0', - `hp` int(12) NOT NULL default '1', - `sp` int(12) NOT NULL default '1', - `kill_counter` int(11) NOT NULL, - `life_time` int(11) NOT NULL default '0', - PRIMARY KEY (`mer_id`) + `mer_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `char_id` INT(11) NOT NULL, + `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `hp` INT(12) NOT NULL DEFAULT '1', + `sp` INT(12) NOT NULL DEFAULT '1', + `kill_counter` INT(11) NOT NULL, + `life_time` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`mer_id`) ) ENGINE=MyISAM; -- @@ -536,15 +672,15 @@ CREATE TABLE IF NOT EXISTS `mercenary` ( -- CREATE TABLE IF NOT EXISTS `mercenary_owner` ( - `char_id` int(11) NOT NULL, - `merc_id` int(11) NOT NULL default '0', - `arch_calls` int(11) NOT NULL default '0', - `arch_faith` int(11) NOT NULL default '0', - `spear_calls` int(11) NOT NULL default '0', - `spear_faith` int(11) NOT NULL default '0', - `sword_calls` int(11) NOT NULL default '0', - `sword_faith` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`) + `char_id` INT(11) NOT NULL, + `merc_id` INT(11) NOT NULL DEFAULT '0', + `arch_calls` INT(11) NOT NULL DEFAULT '0', + `arch_faith` INT(11) NOT NULL DEFAULT '0', + `spear_calls` INT(11) NOT NULL DEFAULT '0', + `spear_faith` INT(11) NOT NULL DEFAULT '0', + `sword_calls` INT(11) NOT NULL DEFAULT '0', + `sword_faith` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; -- @@ -552,13 +688,13 @@ CREATE TABLE IF NOT EXISTS `mercenary_owner` ( -- CREATE TABLE IF NOT EXISTS `party` ( - `party_id` int(11) unsigned NOT NULL auto_increment, - `name` varchar(24) NOT NULL default '', - `exp` tinyint(11) unsigned NOT NULL default '0', - `item` tinyint(11) unsigned NOT NULL default '0', - `leader_id` int(11) unsigned NOT NULL default '0', - `leader_char` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`party_id`) + `party_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `name` VARCHAR(24) NOT NULL DEFAULT '', + `exp` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + `item` TINYINT(11) UNSIGNED NOT NULL DEFAULT '0', + `leader_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `leader_char` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`party_id`) ) ENGINE=MyISAM; -- @@ -566,19 +702,19 @@ CREATE TABLE IF NOT EXISTS `party` ( -- CREATE TABLE IF NOT EXISTS `pet` ( - `pet_id` int(11) unsigned NOT NULL auto_increment, - `class` mediumint(9) unsigned NOT NULL default '0', - `name` varchar(24) NOT NULL default '', - `account_id` int(11) unsigned NOT NULL default '0', - `char_id` int(11) unsigned NOT NULL default '0', - `level` smallint(4) unsigned NOT NULL default '0', - `egg_id` smallint(11) unsigned NOT NULL default '0', - `equip` mediumint(8) unsigned NOT NULL default '0', - `intimate` smallint(9) unsigned NOT NULL default '0', - `hungry` smallint(9) unsigned NOT NULL default '0', - `rename_flag` tinyint(4) unsigned NOT NULL default '0', - `incubate` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`pet_id`) + `pet_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(24) NOT NULL DEFAULT '', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `level` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `egg_id` SMALLINT(11) UNSIGNED NOT NULL DEFAULT '0', + `equip` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `INTimate` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `hungry` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `rename_flag` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `incubate` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`pet_id`) ) ENGINE=MyISAM; -- @@ -586,14 +722,14 @@ CREATE TABLE IF NOT EXISTS `pet` ( -- CREATE TABLE IF NOT EXISTS `quest` ( - `char_id` int(11) unsigned NOT NULL default '0', - `quest_id` int(10) unsigned NOT NULL, - `state` enum('0','1','2') NOT NULL default '0', - `time` int(11) unsigned NOT NULL default '0', - `count1` mediumint(8) unsigned NOT NULL default '0', - `count2` mediumint(8) unsigned NOT NULL default '0', - `count3` mediumint(8) unsigned NOT NULL default '0', - PRIMARY KEY (`char_id`,`quest_id`) + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `quest_id` INT(10) UNSIGNED NOT NULL, + `state` ENUM('0','1','2') NOT NULL DEFAULT '0', + `time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `count1` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `count2` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `count3` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`quest_id`) ) ENGINE=MyISAM; -- @@ -601,11 +737,11 @@ CREATE TABLE IF NOT EXISTS `quest` ( -- CREATE TABLE IF NOT EXISTS `ragsrvinfo` ( - `index` int(11) NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `exp` int(11) unsigned NOT NULL default '0', - `jexp` int(11) unsigned NOT NULL default '0', - `drop` int(11) unsigned NOT NULL default '0' + `index` INT(11) NOT NULL DEFAULT '0', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `exp` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `jexp` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `drop` INT(11) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=MyISAM; -- @@ -613,11 +749,11 @@ CREATE TABLE IF NOT EXISTS `ragsrvinfo` ( -- CREATE TABLE IF NOT EXISTS `skill` ( - `char_id` int(11) unsigned NOT NULL default '0', - `id` smallint(11) unsigned NOT NULL default '0', - `lv` tinyint(4) unsigned NOT NULL default '0', - `flag` TINYINT(1) UNSIGNED NOT NULL default 0, - PRIMARY KEY (`char_id`,`id`) + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `id` SMALLINT(11) UNSIGNED NOT NULL DEFAULT '0', + `lv` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (`char_id`,`id`) ) ENGINE=MyISAM; -- @@ -625,10 +761,10 @@ CREATE TABLE IF NOT EXISTS `skill` ( -- CREATE TABLE IF NOT EXISTS `skill_homunculus` ( - `homun_id` int(11) NOT NULL, - `id` int(11) NOT NULL, - `lv` smallint(6) NOT NULL, - PRIMARY KEY (`homun_id`,`id`) + `homun_id` INT(11) NOT NULL, + `id` INT(11) NOT NULL, + `lv` SMALLINT(6) NOT NULL, + PRIMARY KEY (`homun_id`,`id`) ) ENGINE=MyISAM; -- @@ -636,8 +772,8 @@ CREATE TABLE IF NOT EXISTS `skill_homunculus` ( -- CREATE TABLE IF NOT EXISTS `sql_updates` ( - `timestamp` int(11) unsigned NOT NULL, - `ignored` enum('Yes','No') NOT NULL DEFAULT 'No', + `timestamp` INT(11) UNSIGNED NOT NULL, + `ignored` ENUM('Yes','No') NOT NULL DEFAULT 'No', PRIMARY KEY (`timestamp`) ) ENGINE=MyISAM; @@ -675,9 +811,9 @@ INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139); -- 2014-05-17--00-0 -- CREATE TABLE IF NOT EXISTS `sstatus` ( - `index` tinyint(4) unsigned NOT NULL default '0', - `name` varchar(255) NOT NULL default '', - `user` int(11) unsigned NOT NULL default '0' + `index` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `name` VARCHAR(255) NOT NULL DEFAULT '', + `user` INT(11) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=MyISAM; -- @@ -685,158 +821,22 @@ CREATE TABLE IF NOT EXISTS `sstatus` ( -- CREATE TABLE IF NOT EXISTS `storage` ( - `id` int(11) unsigned NOT NULL auto_increment, - `account_id` int(11) unsigned NOT NULL default '0', - `nameid` int(11) unsigned NOT NULL default '0', - `amount` smallint(11) unsigned NOT NULL default '0', - `equip` int(11) unsigned NOT NULL default '0', - `identify` smallint(6) unsigned NOT NULL default '0', - `refine` tinyint(3) unsigned NOT NULL default '0', - `attribute` tinyint(4) unsigned NOT NULL default '0', - `card0` smallint(11) NOT NULL default '0', - `card1` smallint(11) NOT NULL default '0', - `card2` smallint(11) NOT NULL default '0', - `card3` smallint(11) NOT NULL default '0', - `expire_time` int(11) unsigned NOT NULL default '0', - `bound` tinyint(1) unsigned NOT NULL default '0', - `unique_id` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), + `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` SMALLINT(11) UNSIGNED NOT NULL DEFAULT '0', + `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `identify` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `attribute` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `card0` SMALLINT(11) NOT NULL DEFAULT '0', + `card1` SMALLINT(11) NOT NULL DEFAULT '0', + `card2` SMALLINT(11) NOT NULL DEFAULT '0', + `card3` SMALLINT(11) NOT NULL DEFAULT '0', + `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; --- --- Table structure for table `interreg` --- - -CREATE TABLE IF NOT EXISTS `interreg` ( - `varname` varchar(11) NOT NULL, - `value` varchar(20) NOT NULL, - PRIMARY KEY (`varname`) -) ENGINE=InnoDB; - --- --- Table structure for table `account_data` --- - -CREATE TABLE IF NOT EXISTS `account_data` ( - `account_id` int(11) unsigned NOT NULL default '0', - `bank_vault` int(11) unsigned NOT NULL default '0', - `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100', - `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100', - `base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100', - PRIMARY KEY (`account_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `npc_market_data` --- - -CREATE TABLE IF NOT EXISTS `npc_market_data` ( - `name` varchar(24) NOT NULL default '', - `itemid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`name`,`itemid`) -) ENGINE=MyISAM; - --- --- Table structure for table `acc_reg_num_db` --- - -CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `acc_reg_str_db` --- - -CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `char_reg_num_db` --- - -CREATE TABLE IF NOT EXISTS `char_reg_num_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), - KEY `char_id` (`char_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `char_reg_str_db` --- - -CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), - KEY `char_id` (`char_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `global_acc_reg_num_db` --- - -CREATE TABLE IF NOT EXISTS `global_acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `global_acc_reg_str_db` --- - - -CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), - KEY `account_id` (`account_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `autotrade_merchants` --- - -CREATE TABLE IF NOT EXISTS `autotrade_merchants` ( - `account_id` int(11) NOT NULL default '0', - `char_id` int(11) NOT NULL default '0', - `sex` tinyint(2) NOT NULL default '0', - `title` varchar(80) NOT NULL default 'Buy From Me!', - PRIMARY KEY (`account_id`,`char_id`) -) ENGINE=MyISAM; - --- --- Table structure for table `autotrade_data` --- - -CREATE TABLE IF NOT EXISTS `autotrade_data` ( - `char_id` int(11) NOT NULL default '0', - `itemkey` int(11) NOT NULL default '0', - `amount` int(11) NOT NULL default '0', - `price` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`itemkey`) -) ENGINE=MyISAM; diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql index 894c34650..89674e1de 100644 --- a/sql-files/mob_db.sql +++ b/sql-files/mob_db.sql @@ -1,74 +1,74 @@ -# -# Table structure for table `mob_db` -# +-- +-- Table structure for table `mob_db` +-- DROP TABLE IF EXISTS `mob_db`; CREATE TABLE `mob_db` ( - `ID` mediumint(9) unsigned NOT NULL default '0', - `Sprite` text NOT NULL, - `kName` text NOT NULL, - `iName` text NOT NULL, - `LV` tinyint(6) unsigned NOT NULL default '0', - `HP` int(9) unsigned NOT NULL default '0', - `SP` mediumint(9) unsigned NOT NULL default '0', - `EXP` mediumint(9) unsigned NOT NULL default '0', - `JEXP` mediumint(9) unsigned NOT NULL default '0', - `Range1` tinyint(4) unsigned NOT NULL default '0', - `ATK1` smallint(6) unsigned NOT NULL default '0', - `ATK2` smallint(6) unsigned NOT NULL default '0', - `DEF` smallint(6) unsigned NOT NULL default '0', - `MDEF` smallint(6) unsigned NOT NULL default '0', - `STR` smallint(6) unsigned NOT NULL default '0', - `AGI` smallint(6) unsigned NOT NULL default '0', - `VIT` smallint(6) unsigned NOT NULL default '0', - `INT` smallint(6) unsigned NOT NULL default '0', - `DEX` smallint(6) unsigned NOT NULL default '0', - `LUK` smallint(6) unsigned NOT NULL default '0', - `Range2` tinyint(4) unsigned NOT NULL default '0', - `Range3` tinyint(4) unsigned NOT NULL default '0', - `Scale` tinyint(4) unsigned NOT NULL default '0', - `Race` tinyint(4) unsigned NOT NULL default '0', - `Element` tinyint(4) unsigned NOT NULL default '0', - `Mode` smallint(6) unsigned NOT NULL default '0', - `Speed` smallint(6) unsigned NOT NULL default '0', - `aDelay` smallint(6) unsigned NOT NULL default '0', - `aMotion` smallint(6) unsigned NOT NULL default '0', - `dMotion` smallint(6) unsigned NOT NULL default '0', - `MEXP` mediumint(9) unsigned NOT NULL default '0', - `MVP1id` smallint(9) unsigned NOT NULL default '0', - `MVP1per` smallint(9) unsigned NOT NULL default '0', - `MVP2id` smallint(9) unsigned NOT NULL default '0', - `MVP2per` smallint(9) unsigned NOT NULL default '0', - `MVP3id` smallint(9) unsigned NOT NULL default '0', - `MVP3per` smallint(9) unsigned NOT NULL default '0', - `Drop1id` smallint(9) unsigned NOT NULL default '0', - `Drop1per` smallint(9) unsigned NOT NULL default '0', - `Drop2id` smallint(9) unsigned NOT NULL default '0', - `Drop2per` smallint(9) unsigned NOT NULL default '0', - `Drop3id` smallint(9) unsigned NOT NULL default '0', - `Drop3per` smallint(9) unsigned NOT NULL default '0', - `Drop4id` smallint(9) unsigned NOT NULL default '0', - `Drop4per` smallint(9) unsigned NOT NULL default '0', - `Drop5id` smallint(9) unsigned NOT NULL default '0', - `Drop5per` smallint(9) unsigned NOT NULL default '0', - `Drop6id` smallint(9) unsigned NOT NULL default '0', - `Drop6per` smallint(9) unsigned NOT NULL default '0', - `Drop7id` smallint(9) unsigned NOT NULL default '0', - `Drop7per` smallint(9) unsigned NOT NULL default '0', - `Drop8id` smallint(9) unsigned NOT NULL default '0', - `Drop8per` smallint(9) unsigned NOT NULL default '0', - `Drop9id` smallint(9) unsigned NOT NULL default '0', - `Drop9per` smallint(9) unsigned NOT NULL default '0', - `DropCardid` smallint(9) unsigned NOT NULL default '0', - `DropCardper` smallint(9) unsigned NOT NULL default '0', - PRIMARY KEY (`ID`) + `ID` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Sprite` TEXT NOT NULL, + `kName` TEXT NOT NULL, + `iName` TEXT NOT NULL, + `LV` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `HP` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `SP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `EXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `JEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Range1` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `ATK1` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `ATK2` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MDEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `STR` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `AGI` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `VIT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEX` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `LUK` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Range2` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Range3` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Scale` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Race` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Element` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Mode` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Speed` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aDelay` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `dMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardid` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardper` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) ) ENGINE=MyISAM; -# Monster Database -# -# Structure of Database : -# REPLACE INTO `mob_db` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); -# Note: Keep the Sprite_Name field as it is in the game client. +-- Monster Database +-- +-- Structure of Database : +-- REPLACE INTO `mob_db` VALUES (ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); +-- Note: Keep the Sprite_Name field as it is in the game client. REPLACE INTO `mob_db` VALUES (1001,'SCORPION','Scorpion','Scorpion',24,1109,0,287,176,1,80,135,30,0,1,24,24,5,52,5,10,12,0,4,23,0x3195,200,1564,864,576,0,0,0,0,0,0,0,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1); REPLACE INTO `mob_db` VALUES (1002,'PORING','Poring','Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,1); # REPLACE INTO `mob_db` VALUES (1003,'TESTEGG','Test Egg','Test Egg',2,100000,0,10,10,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0x0,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); diff --git a/sql-files/mob_db2.sql b/sql-files/mob_db2.sql index a370e0f58..2367c634a 100644 --- a/sql-files/mob_db2.sql +++ b/sql-files/mob_db2.sql @@ -1,88 +1,88 @@ -# -# Table structure for table `mob_db2` -# +-- +-- Table structure for table `mob_db2` +-- DROP TABLE IF EXISTS `mob_db2`; CREATE TABLE `mob_db2` ( - `ID` mediumint(9) unsigned NOT NULL default '0', - `Sprite` text NOT NULL, - `kName` text NOT NULL, - `iName` text NOT NULL, - `LV` tinyint(6) unsigned NOT NULL default '0', - `HP` int(9) unsigned NOT NULL default '0', - `SP` mediumint(9) unsigned NOT NULL default '0', - `EXP` mediumint(9) unsigned NOT NULL default '0', - `JEXP` mediumint(9) unsigned NOT NULL default '0', - `Range1` tinyint(4) unsigned NOT NULL default '0', - `ATK1` smallint(6) unsigned NOT NULL default '0', - `ATK2` smallint(6) unsigned NOT NULL default '0', - `DEF` smallint(6) unsigned NOT NULL default '0', - `MDEF` smallint(6) unsigned NOT NULL default '0', - `STR` smallint(6) unsigned NOT NULL default '0', - `AGI` smallint(6) unsigned NOT NULL default '0', - `VIT` smallint(6) unsigned NOT NULL default '0', - `INT` smallint(6) unsigned NOT NULL default '0', - `DEX` smallint(6) unsigned NOT NULL default '0', - `LUK` smallint(6) unsigned NOT NULL default '0', - `Range2` tinyint(4) unsigned NOT NULL default '0', - `Range3` tinyint(4) unsigned NOT NULL default '0', - `Scale` tinyint(4) unsigned NOT NULL default '0', - `Race` tinyint(4) unsigned NOT NULL default '0', - `Element` tinyint(4) unsigned NOT NULL default '0', - `Mode` smallint(6) unsigned NOT NULL default '0', - `Speed` smallint(6) unsigned NOT NULL default '0', - `aDelay` smallint(6) unsigned NOT NULL default '0', - `aMotion` smallint(6) unsigned NOT NULL default '0', - `dMotion` smallint(6) unsigned NOT NULL default '0', - `MEXP` mediumint(9) unsigned NOT NULL default '0', - `MVP1id` smallint(9) unsigned NOT NULL default '0', - `MVP1per` smallint(9) unsigned NOT NULL default '0', - `MVP2id` smallint(9) unsigned NOT NULL default '0', - `MVP2per` smallint(9) unsigned NOT NULL default '0', - `MVP3id` smallint(9) unsigned NOT NULL default '0', - `MVP3per` smallint(9) unsigned NOT NULL default '0', - `Drop1id` smallint(9) unsigned NOT NULL default '0', - `Drop1per` smallint(9) unsigned NOT NULL default '0', - `Drop2id` smallint(9) unsigned NOT NULL default '0', - `Drop2per` smallint(9) unsigned NOT NULL default '0', - `Drop3id` smallint(9) unsigned NOT NULL default '0', - `Drop3per` smallint(9) unsigned NOT NULL default '0', - `Drop4id` smallint(9) unsigned NOT NULL default '0', - `Drop4per` smallint(9) unsigned NOT NULL default '0', - `Drop5id` smallint(9) unsigned NOT NULL default '0', - `Drop5per` smallint(9) unsigned NOT NULL default '0', - `Drop6id` smallint(9) unsigned NOT NULL default '0', - `Drop6per` smallint(9) unsigned NOT NULL default '0', - `Drop7id` smallint(9) unsigned NOT NULL default '0', - `Drop7per` smallint(9) unsigned NOT NULL default '0', - `Drop8id` smallint(9) unsigned NOT NULL default '0', - `Drop8per` smallint(9) unsigned NOT NULL default '0', - `Drop9id` smallint(9) unsigned NOT NULL default '0', - `Drop9per` smallint(9) unsigned NOT NULL default '0', - `DropCardid` smallint(9) unsigned NOT NULL default '0', - `DropCardper` smallint(9) unsigned NOT NULL default '0', - PRIMARY KEY (`ID`) + `ID` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Sprite` TEXT NOT NULL, + `kName` TEXT NOT NULL, + `iName` TEXT NOT NULL, + `LV` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `HP` INT(9) UNSIGNED NOT NULL DEFAULT '0', + `SP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `EXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `JEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Range1` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `ATK1` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `ATK2` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MDEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `STR` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `AGI` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `VIT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEX` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `LUK` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Range2` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Range3` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Scale` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Race` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Element` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Mode` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Speed` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aDelay` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `dMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardid` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardper` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) ) ENGINE=MyISAM; -# Monsters Additional Database -# -# Structure of Database : -# REPLACE INTO `mob_db2` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); +-- Monsters Additional Database +-- +-- Structure of Database : +-- REPLACE INTO `mob_db2` VALUES (ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); -# rAthena Dev Team +-- rAthena Dev Team #REPLACE INTO `mob_db2` VALUES (1900,'VALARIS','Valaris','Valaris',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1); #REPLACE INTO `mob_db2` VALUES (1901,'VALARIS_WORSHIPPER','Valaris\'s Worshipper','Valaris\'s Worshipper',50,8578,0,2706,1480,1,487,590,15,25,1,75,55,1,93,45,10,12,0,6,27,0x1685,100,868,480,120,0,0,0,0,0,0,0,923,500,984,63,1464,2,607,50,610,100,503,300,2405,50,0,0,0,0,4129,1); #REPLACE INTO `mob_db2` VALUES (1902,'MC_CAMERI','MC Cameri','MC Cameri',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1); #REPLACE INTO `mob_db2` VALUES (1903,'POKI','Poki#3','Poki#3',99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,0x1973,120,500,672,480,92100,603,5500,617,3000,1723,1000,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0); #REPLACE INTO `mob_db2` VALUES (1904,'SENTRY','Sentry','Sentry',99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,0x1973,100,1068,768,576,13000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1); -# Custom Hollow Poring (overrrides/collides with META_ANDRE) +-- Custom Hollow Poring (overrrides/collides with META_ANDRE) #REPLACE INTO `mob_db2` VALUES (1237,'HOLLOW_PORING','Hollow Poring','Hollow Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,10); -# Custom Fire Poring. Warning, Colides with META_DENIRO +-- Custom Fire Poring. Warning, Colides with META_DENIRO #REPLACE INTO `mob_db2` VALUES (1239,'FIRE_PORING','Fire Poring','Fire Poring',1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x131,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20); -# Lunar New Year 2008 Event Monster overrides -# Uncomment if event is enabled, as these drops modifications are nessecary. +-- Lunar New Year 2008 Event Monster overrides +-- Uncomment if event is enabled, as these drops modifications are nessecary. #REPLACE INTO `mob_db2` VALUES (1145,'MARTIN','Martin','Martin',18,1109,0,134,86,1,52,63,0,5,12,18,30,15,15,5,10,12,0,2,42,0x81,300,1480,480,480,0,0,0,0,0,0,0,1017,9000,1018,500,1251,10,2225,5,5009,1,10010,10,2224,15,7869,1500,0,0,4046,1); #REPLACE INTO `mob_db2` VALUES (1175,'TAROU','Tarou','Tarou',11,284,0,57,28,1,34,45,0,0,1,20,11,10,24,5,10,12,0,2,27,0x91,150,1744,1044,684,0,0,0,0,0,0,0,1016,9000,919,3000,949,800,528,1000,701,2,7869,2500,0,0,0,0,0,0,4028,1); #REPLACE INTO `mob_db2` VALUES (1209,'CRAMP','Cramp','Cramp',56,4720,0,2300,1513,1,395,465,0,5,1,85,35,5,65,60,10,12,0,2,45,0x3095,100,1000,500,1000,0,0,0,0,0,0,0,7007,4656,528,1000,726,80,746,110,568,250,510,70,984,95,7869,1500,0,0,4296,1); diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index bd2ab084f..8a2863b80 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -1,74 +1,74 @@ -# -# Table structure for table `mob_db` -# +-- +-- Table structure for table `mob_db` +-- DROP TABLE IF EXISTS `mob_db`; CREATE TABLE `mob_db` ( - `ID` mediumint(9) unsigned NOT NULL default '0', - `Sprite` text NOT NULL, - `kName` text NOT NULL, - `iName` text NOT NULL, - `LV` tinyint(6) unsigned NOT NULL default '0', - `HP` int(9) unsigned NOT NULL default '0', - `SP` mediumint(9) unsigned NOT NULL default '0', - `EXP` mediumint(9) unsigned NOT NULL default '0', - `JEXP` mediumint(9) unsigned NOT NULL default '0', - `Range1` tinyint(4) unsigned NOT NULL default '0', - `ATK1` smallint(6) unsigned NOT NULL default '0', - `ATK2` smallint(6) unsigned NOT NULL default '0', - `DEF` smallint(6) unsigned NOT NULL default '0', - `MDEF` smallint(6) unsigned NOT NULL default '0', - `STR` smallint(6) unsigned NOT NULL default '0', - `AGI` smallint(6) unsigned NOT NULL default '0', - `VIT` smallint(6) unsigned NOT NULL default '0', - `INT` smallint(6) unsigned NOT NULL default '0', - `DEX` smallint(6) unsigned NOT NULL default '0', - `LUK` smallint(6) unsigned NOT NULL default '0', - `Range2` tinyint(4) unsigned NOT NULL default '0', - `Range3` tinyint(4) unsigned NOT NULL default '0', - `Scale` tinyint(4) unsigned NOT NULL default '0', - `Race` tinyint(4) unsigned NOT NULL default '0', - `Element` tinyint(4) unsigned NOT NULL default '0', - `Mode` smallint(6) unsigned NOT NULL default '0', - `Speed` smallint(6) unsigned NOT NULL default '0', - `aDelay` smallint(6) unsigned NOT NULL default '0', - `aMotion` smallint(6) unsigned NOT NULL default '0', - `dMotion` smallint(6) unsigned NOT NULL default '0', - `MEXP` mediumint(9) unsigned NOT NULL default '0', - `MVP1id` smallint(9) unsigned NOT NULL default '0', - `MVP1per` smallint(9) unsigned NOT NULL default '0', - `MVP2id` smallint(9) unsigned NOT NULL default '0', - `MVP2per` smallint(9) unsigned NOT NULL default '0', - `MVP3id` smallint(9) unsigned NOT NULL default '0', - `MVP3per` smallint(9) unsigned NOT NULL default '0', - `Drop1id` smallint(9) unsigned NOT NULL default '0', - `Drop1per` smallint(9) unsigned NOT NULL default '0', - `Drop2id` smallint(9) unsigned NOT NULL default '0', - `Drop2per` smallint(9) unsigned NOT NULL default '0', - `Drop3id` smallint(9) unsigned NOT NULL default '0', - `Drop3per` smallint(9) unsigned NOT NULL default '0', - `Drop4id` smallint(9) unsigned NOT NULL default '0', - `Drop4per` smallint(9) unsigned NOT NULL default '0', - `Drop5id` smallint(9) unsigned NOT NULL default '0', - `Drop5per` smallint(9) unsigned NOT NULL default '0', - `Drop6id` smallint(9) unsigned NOT NULL default '0', - `Drop6per` smallint(9) unsigned NOT NULL default '0', - `Drop7id` smallint(9) unsigned NOT NULL default '0', - `Drop7per` smallint(9) unsigned NOT NULL default '0', - `Drop8id` smallint(9) unsigned NOT NULL default '0', - `Drop8per` smallint(9) unsigned NOT NULL default '0', - `Drop9id` smallint(9) unsigned NOT NULL default '0', - `Drop9per` smallint(9) unsigned NOT NULL default '0', - `DropCardid` smallint(9) unsigned NOT NULL default '0', - `DropCardper` smallint(9) unsigned NOT NULL default '0', - PRIMARY KEY (`ID`) + `ID` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Sprite` TEXT NOT NULL, + `kName` TEXT NOT NULL, + `iName` TEXT NOT NULL, + `LV` TINYINT(6) UNSIGNED NOT NULL DEFAULT '0', + `HP` int(9) UNSIGNED NOT NULL DEFAULT '0', + `SP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `EXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `JEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Range1` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `ATK1` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `ATK2` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MDEF` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `STR` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `AGI` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `VIT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `DEX` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `LUK` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Range2` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Range3` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Scale` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Race` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Element` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', + `Mode` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `Speed` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aDelay` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `aMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `dMotion` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', + `MEXP` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `MVP3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop1per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop2per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop3per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop4per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop5per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop6per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop7per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop8per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9id` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `Drop9per` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardid` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + `DropCardper` SMALLINT(9) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) ) ENGINE=MyISAM; -# Monster Database -# -# Structure of Database : -# REPLACE INTO `mob_db` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); -# Note: Keep the Sprite_Name field as it is in the game client. +-- Monster Database +-- +-- Structure of Database : +-- REPLACE INTO `mob_db` VALUES (ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); +-- Note: Keep the Sprite_Name field as it is in the game client. REPLACE INTO `mob_db` VALUES (1001,'SCORPION','Scorpion','Scorpion',16,153,1,108,81,1,33,40,16,5,12,15,10,5,19,5,10,12,0,4,23,0x3191,200,1564,864,576,0,0,0,0,0,0,0,990,70,904,5500,757,57,943,210,7041,100,508,200,625,20,0,0,0,0,4068,1); REPLACE INTO `mob_db` VALUES (1002,'PORING','Poring','Poring',1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,1); # REPLACE INTO `mob_db` VALUES (1003,'TESTEGG','Test Egg','Test Egg',2,100000,0,10,10,0,3,9,99,0,1,99,1,1,1,1,10,12,0,4,22,0x0,512,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); diff --git a/sql-files/mob_skill_db.sql b/sql-files/mob_skill_db.sql index 30e845d83..b240711cb 100644 --- a/sql-files/mob_skill_db.sql +++ b/sql-files/mob_skill_db.sql @@ -1,93 +1,93 @@ -# -# Table structure for table `mob_skill_db` -# +-- +-- Table structure for table `mob_skill_db` +-- DROP TABLE IF EXISTS `mob_skill_db`; CREATE TABLE IF NOT EXISTS `mob_skill_db` ( - `MOB_ID` smallint(6) NOT NULL, - `INFO` text NOT NULL, - `STATE` text NOT NULL, - `SKILL_ID` smallint(6) NOT NULL, - `SKILL_LV` tinyint(4) NOT NULL, - `RATE` smallint(4) NOT NULL, - `CASTTIME` mediumint(9) NOT NULL, - `DELAY` int(9) NOT NULL, - `CANCELABLE` text NOT NULL, - `TARGET` text NOT NULL, - `CONDITION` text NOT NULL, - `CONDITION_VALUE` text, - `VAL1` mediumint(9) DEFAULT NULL, - `VAL2` mediumint(9) DEFAULT NULL, - `VAL3` mediumint(9) DEFAULT NULL, - `VAL4` mediumint(9) DEFAULT NULL, - `VAL5` mediumint(9) DEFAULT NULL, - `EMOTION` text, - `CHAT` text + `MOB_ID` SMALLINT(6) NOT NULL, + `INFO` TEXT NOT NULL, + `STATE` TEXT NOT NULL, + `SKILL_ID` SMALLINT(6) NOT NULL, + `SKILL_LV` TINYINT(4) NOT NULL, + `RATE` SMALLINT(4) NOT NULL, + `CASTTIME` MEDIUMINT(9) NOT NULL, + `DELAY` INT(9) NOT NULL, + `CANCELABLE` TEXT NOT NULL, + `TARGET` TEXT NOT NULL, + `CONDITION` TEXT NOT NULL, + `CONDITION_VALUE` TEXT, + `VAL1` MEDIUMINT(9) DEFAULT NULL, + `VAL2` MEDIUMINT(9) DEFAULT NULL, + `VAL3` MEDIUMINT(9) DEFAULT NULL, + `VAL4` MEDIUMINT(9) DEFAULT NULL, + `VAL5` MEDIUMINT(9) DEFAULT NULL, + `EMOTION` TEXT, + `CHAT` TEXT ) ENGINE=MyISAM; -# Based on Aegis Episode 11.3 -# -# REPLACE INTO `mob_skill_db` VALUES (MOB_ID,'dummy value (info only)','STATE',SKILL_ID,SKILL_LV,rate (10000 = 100%),casttime,delay,'cancelable','target','condition type','condition value',val1,val2,val3,val4,val5,'emotion','chat'); -#Example -#1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7, -# -#rate refers to the chance of the skill being casted when the condition is fulfilled. -#delay is the time in milliseconds that has to be pass before recasting the same skill. -# -#STATE: -# any (except dead) / idle (in standby) / walk (in movement) / dead (on killed) / -# loot /attack / angry (like attack, except player has not attacked mob yet) / -# chase (following target, after being attacked) / follow (following -# target, without being attacked) -# anytarget (attack+angry+chase+follow) -# -#target: The target of the skill can be: target (current target) / self / friend / -# master / randomtarget (any enemy within skill's range) -# (the following are for ground-skills, a random target tile is selected from -# the specified area): -# around1 (3x3 area around self) / around2 (5x5 area around self) / -# around3 (7x7 area around self) / around4 (9x9 area around self) / -# around5 (3x3 area around target) / around6 (5x5 area around target) / -# around7 (7x7 area around target) / around8 (9x9 area around target) / -# around = around4 -# -#conditions: (condition type) (value which specifies a condition value) -# always unconditional -# onspawn when the mob spawns/respawns. -# myhpltmaxrate when the mob's hp drops to a certain % -# myhpinrate when the mob's hp is in a certain % range ('a condition value' -# is the lower cap, while 'a value 1' is the upper cap). -# mystatuson If the mob has any abnormalities in status (condition value) -# mystatusoff If the mob has ended any abnormalities in status (condition value) -# friendhpltmaxrate when the mob's friend's hp drops to a certain % -# friendhpinrate when the mob's friend's hp is in a certain % range (range -# defined the same way as in myhpinrate) -# friendstatuson If the friend has any abnormalities in status (condition value) -# friendstatusoff If the friend has ended any abnormalities in status (condition value) -# attackpcgt Attack PC becomes more than the number of specification -# attackpcge Attack PC becomes equal or more than the number of specification. -# slavelt when the number of slaves is lower than the original number of specification. -# slavele when the number of slaves is lower or equal than the original number of specification. -# closedattacked when melee attacked (close range attack) -# longrangeattacked when long ranged attacked (like bows and far range weapons) -# skillused when a skill is used on the mob -# afterskill after the mob used certain skill. -# casttargeted when a target is in cast range. -# rudeattacked when a target is rude attacked -# -# The character's state which can be specified to be a condition value by the statuson/statusoff system -# anybad any type of state change -# stone condition of being in stone state -# freeze condition of being in frozen state -# stun condition of being in stunned state -# sleep condition of being in sleep state -# poison condition of being in poisoned state -# curse condition of being in cursed state -# silence condition of being in silenced state -# confusion condition of being in confusion state -# blind condition of being in blind state -# hiding condition of being in hidden state -# sight condition of being in unhidden state +-- Based on Aegis Episode 11.3 +-- +-- REPLACE INTO `mob_skill_db` VALUES (MOB_ID,'dummy value (info only)','STATE',SKILL_ID,SKILL_LV,rate (10000 = 100%),casttime,delay,'cancelable','target','condition type','condition value',val1,val2,val3,val4,val5,'emotion','chat'); +-- Example +-- 1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7, +-- +-- rate refers to the chance of the skill being casted when the condition is fulfilled. +-- delay is the time in milliseconds that has to be pass before recasting the same skill. +-- +-- STATE: +-- any (except dead) / idle (in standby) / walk (in movement) / dead (on killed) / +-- loot /attack / angry (like attack, except player has not attacked mob yet) / +-- chase (following target, after being attacked) / follow (following +-- target, without being attacked) +-- anytarget (attack+angry+chase+follow) +-- +-- target: The target of the skill can be: target (current target) / self / friend / +-- master / randomtarget (any enemy within skill's range) +-- (the following are for ground-skills, a random target tile is selected from +-- the specified area): +-- around1 (3x3 area around self) / around2 (5x5 area around self) / +-- around3 (7x7 area around self) / around4 (9x9 area around self) / +-- around5 (3x3 area around target) / around6 (5x5 area around target) / +-- around7 (7x7 area around target) / around8 (9x9 area around target) / +-- around = around4 +-- +-- conditions: (condition type) (value which specifies a condition value) +-- always unconditional +-- onspawn when the mob spawns/respawns. +-- myhpltmaxrate when the mob's hp drops to a certain % +-- myhpinrate when the mob's hp is in a certain % range ('a condition value' +-- is the lower cap, while 'a value 1' is the upper cap). +-- mystatuson If the mob has any abnormalities in status (condition value) +-- mystatusoff If the mob has ended any abnormalities in status (condition value) +-- friendhpltmaxrate when the mob's friend's hp drops to a certain % +-- friendhpinrate when the mob's friend's hp is in a certain % range (range +-- defined the same way as in myhpinrate) +-- friendstatuson If the friend has any abnormalities in status (condition value) +-- friendstatusoff If the friend has ended any abnormalities in status (condition value) +-- attackpcgt Attack PC becomes more than the number of specification +-- attackpcge Attack PC becomes equal or more than the number of specification. +-- slavelt when the number of slaves is lower than the original number of specification. +-- slavele when the number of slaves is lower or equal than the original number of specification. +-- closedattacked when melee attacked (close range attack) +-- longrangeattacked when long ranged attacked (like bows and far range weapons) +-- skillused when a skill is used on the mob +-- afterskill after the mob used certain skill. +-- casttargeted when a target is in cast range. +-- rudeattacked when a target is rude attacked +-- +-- The character's state which can be specified to be a condition value by the statuson/statusoff system +-- anybad any type of state change +-- stone condition of being in stone state +-- freeze condition of being in frozen state +-- stun condition of being in stunned state +-- sleep condition of being in sleep state +-- poison condition of being in poisoned state +-- curse condition of being in cursed state +-- silence condition of being in silenced state +-- confusion condition of being in confusion state +-- blind condition of being in blind state +-- hiding condition of being in hidden state +-- sight condition of being in unhidden state REPLACE INTO `mob_skill_db` VALUES (1001,'Scorpion@NPC_FIREATTACK','attack',186,1,2000,0,5000,'yes','target','always',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `mob_skill_db` VALUES (1001,'Scorpion@NPC_POISON','attack',176,3,500,800,5000,'no','target','always',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql-files/mob_skill_db2.sql b/sql-files/mob_skill_db2.sql index b44ad3225..0df6e8de5 100644 --- a/sql-files/mob_skill_db2.sql +++ b/sql-files/mob_skill_db2.sql @@ -1,35 +1,35 @@ -# -# Table structure for table `mob_skill_db2` -# +-- +-- Table structure for table `mob_skill_db2` +-- DROP TABLE IF EXISTS `mob_skill_db2`; CREATE TABLE IF NOT EXISTS `mob_skill_db2` ( - `MOB_ID` smallint(6) NOT NULL, - `INFO` text NOT NULL, - `STATE` text NOT NULL, - `SKILL_ID` smallint(6) NOT NULL, + `MOB_ID` SMALLINT(6) NOT NULL, + `INFO` TEXT NOT NULL, + `STATE` TEXT NOT NULL, + `SKILL_ID` SMALLINT(6) NOT NULL, `SKILL_LV` tinyint(4) NOT NULL, - `RATE` smallint(4) NOT NULL, - `CASTTIME` mediumint(9) NOT NULL, - `DELAY` int(9) NOT NULL, - `CANCELABLE` text NOT NULL, - `TARGET` text NOT NULL, - `CONDITION` text NOT NULL, - `CONDITION_VALUE` text, - `VAL1` mediumint(9) DEFAULT NULL, - `VAL2` mediumint(9) DEFAULT NULL, - `VAL3` mediumint(9) DEFAULT NULL, - `VAL4` mediumint(9) DEFAULT NULL, - `VAL5` mediumint(9) DEFAULT NULL, - `EMOTION` text, - `CHAT` text + `RATE` SMALLINT(4) NOT NULL, + `CASTTIME` MEDIUMINT(9) NOT NULL, + `DELAY` INT(9) NOT NULL, + `CANCELABLE` TEXT NOT NULL, + `TARGET` TEXT NOT NULL, + `CONDITION` TEXT NOT NULL, + `CONDITION_VALUE` TEXT, + `VAL1` MEDIUMINT(9) DEFAULT NULL, + `VAL2` MEDIUMINT(9) DEFAULT NULL, + `VAL3` MEDIUMINT(9) DEFAULT NULL, + `VAL4` MEDIUMINT(9) DEFAULT NULL, + `VAL5` MEDIUMINT(9) DEFAULT NULL, + `EMOTION` TEXT, + `CHAT` TEXT ) ENGINE=MyISAM; -# Mob Skill Database -# -# Structure of Database: -# INSERT INTO `mob_skill_db2` (`MOB_ID`, `INFO`, `STATE`, `SKILL_ID`, `SKILL_LV`, `RATE`, `CASTTIME`, `DELAY`, `CANCELABLE`, `TARGET`, `CONDITION`, `CONDITION_VALUE`, `VAL1`, `VAL2`, `VAL3`, `VAL4`, `VAL5`, `EMOTION`, `CHAT`); -# +-- Mob Skill Database +-- +-- Structure of Database: +-- INSERT INTO `mob_skill_db2` (`MOB_ID`, `INFO`, `STATE`, `SKILL_ID`, `SKILL_LV`, `RATE`, `CASTTIME`, `DELAY`, `CANCELABLE`, `TARGET`, `CONDITION`, `CONDITION_VALUE`, `VAL1`, `VAL2`, `VAL3`, `VAL4`, `VAL5`, `EMOTION`, `CHAT`); + # REPLACE INTO mob_skill_db2 VALUES(1900, "Valaris@AL_TELEPORT", "idle", 26, 1, 10000, 0, 0, "yes", "self", "rudeattacked", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); # REPLACE INTO mob_skill_db2 VALUES(1900, "Valaris@AL_TELEPORT", "walk", 26, 1, 500, 0, 5000, "yes", "self", "rudeattacked", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); # REPLACE INTO mob_skill_db2 VALUES(1900, "Valaris@KN_BRANDISHSPEAR", "attack", 57, 10, 2000, 500, 5000, "no", "target", "always", 0, NULL, NULL, NULL, NULL, NULL, 29, NULL); diff --git a/sql-files/mob_skill_db_re.sql b/sql-files/mob_skill_db_re.sql index 41d690503..8810ef1e5 100644 --- a/sql-files/mob_skill_db_re.sql +++ b/sql-files/mob_skill_db_re.sql @@ -1,93 +1,93 @@ -# -# Table structure for table `mob_skill_db` -# +-- +-- Table structure for table `mob_skill_db` +-- DROP TABLE IF EXISTS `mob_skill_db`; CREATE TABLE IF NOT EXISTS `mob_skill_db` ( - `MOB_ID` smallint(6) NOT NULL, - `INFO` text NOT NULL, - `STATE` text NOT NULL, - `SKILL_ID` smallint(6) NOT NULL, - `SKILL_LV` tinyint(4) NOT NULL, - `RATE` smallint(4) NOT NULL, - `CASTTIME` mediumint(9) NOT NULL, - `DELAY` int(9) NOT NULL, - `CANCELABLE` text NOT NULL, - `TARGET` text NOT NULL, - `CONDITION` text NOT NULL, - `CONDITION_VALUE` text, - `VAL1` mediumint(9) DEFAULT NULL, - `VAL2` mediumint(9) DEFAULT NULL, - `VAL3` mediumint(9) DEFAULT NULL, - `VAL4` mediumint(9) DEFAULT NULL, - `VAL5` mediumint(9) DEFAULT NULL, - `EMOTION` text, - `CHAT` text + `MOB_ID` SMALLINT(6) NOT NULL, + `INFO` TEXT NOT NULL, + `STATE` TEXT NOT NULL, + `SKILL_ID` SMALLINT(6) NOT NULL, + `SKILL_LV` TINYINT(4) NOT NULL, + `RATE` SMALLINT(4) NOT NULL, + `CASTTIME` MEDIUMINT(9) NOT NULL, + `DELAY` INT(9) NOT NULL, + `CANCELABLE` TEXT NOT NULL, + `TARGET` TEXT NOT NULL, + `CONDITION` TEXT NOT NULL, + `CONDITION_VALUE` TEXT, + `VAL1` MEDIUMINT(9) DEFAULT NULL, + `VAL2` MEDIUMINT(9) DEFAULT NULL, + `VAL3` MEDIUMINT(9) DEFAULT NULL, + `VAL4` MEDIUMINT(9) DEFAULT NULL, + `VAL5` MEDIUMINT(9) DEFAULT NULL, + `EMOTION` TEXT, + `CHAT` TEXT ) ENGINE=MyISAM; -# Based on Aegis Episode 11.3 -# -# REPLACE INTO `mob_skill_db` VALUES (MOB_ID,'dummy value (info only)','STATE',SKILL_ID,SKILL_LV,rate (10000 = 100%),casttime,delay,'cancelable','target','condition type','condition value',val1,val2,val3,val4,val5,'emotion','chat'); -#Example -#1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7, -# -#rate refers to the chance of the skill being casted when the condition is fulfilled. -#delay is the time in milliseconds that has to be pass before recasting the same skill. -# -#STATE: -# any (except dead) / idle (in standby) / walk (in movement) / dead (on killed) / -# loot /attack / angry (like attack, except player has not attacked mob yet) / -# chase (following target, after being attacked) / follow (following -# target, without being attacked) -# anytarget (attack+angry+chase+follow) -# -#target: The target of the skill can be: target (current target) / self / friend / -# master / randomtarget (any enemy within skill's range) -# (the following are for ground-skills, a random target tile is selected from -# the specified area): -# around1 (3x3 area around self) / around2 (5x5 area around self) / -# around3 (7x7 area around self) / around4 (9x9 area around self) / -# around5 (3x3 area around target) / around6 (5x5 area around target) / -# around7 (7x7 area around target) / around8 (9x9 area around target) / -# around = around4 -# -#conditions: (condition type) (value which specifies a condition value) -# always unconditional -# onspawn when the mob spawns/respawns. -# myhpltmaxrate when the mob's hp drops to a certain % -# myhpinrate when the mob's hp is in a certain % range ('a condition value' -# is the lower cap, while 'a value 1' is the upper cap). -# mystatuson If the mob has any abnormalities in status (condition value) -# mystatusoff If the mob has ended any abnormalities in status (condition value) -# friendhpltmaxrate when the mob's friend's hp drops to a certain % -# friendhpinrate when the mob's friend's hp is in a certain % range (range -# defined the same way as in myhpinrate) -# friendstatuson If the friend has any abnormalities in status (condition value) -# friendstatusoff If the friend has ended any abnormalities in status (condition value) -# attackpcgt Attack PC becomes more than the number of specification -# attackpcge Attack PC becomes equal or more than the number of specification. -# slavelt when the number of slaves is lower than the original number of specification. -# slavele when the number of slaves is lower or equal than the original number of specification. -# closedattacked when melee attacked (close range attack) -# longrangeattacked when long ranged attacked (like bows and far range weapons) -# skillused when a skill is used on the mob -# afterskill after the mob used certain skill. -# casttargeted when a target is in cast range. -# rudeattacked when a target is rude attacked -# -# The character's state which can be specified to be a condition value by the statuson/statusoff system -# anybad any type of state change -# stone condition of being in stone state -# freeze condition of being in frozen state -# stun condition of being in stunned state -# sleep condition of being in sleep state -# poison condition of being in poisoned state -# curse condition of being in cursed state -# silence condition of being in silenced state -# confusion condition of being in confusion state -# blind condition of being in blind state -# hiding condition of being in hidden state -# sight condition of being in unhidden state +-- Based on Aegis Episode 11.3 +-- +-- REPLACE INTO `mob_skill_db` VALUES (MOB_ID,'dummy value (info only)','STATE',SKILL_ID,SKILL_LV,rate (10000 = 100%),casttime,delay,'cancelable','target','condition type','condition value',val1,val2,val3,val4,val5,'emotion','chat'); +-- Example +-- 1001,Poring@TF_POISON,attack,52,3,100,1500,10000,no,target,always,0,,,,,7, +-- +-- rate refers to the chance of the skill being casted when the condition is fulfilled. +-- delay is the time in milliseconds that has to be pass before recasting the same skill. +-- +-- STATE: +-- any (except dead) / idle (in standby) / walk (in movement) / dead (on killed) / +-- loot /attack / angry (like attack, except player has not attacked mob yet) / +-- chase (following target, after being attacked) / follow (following +-- target, without being attacked) +-- anytarget (attack+angry+chase+follow) +-- +-- target: The target of the skill can be: target (current target) / self / friend / +-- master / randomtarget (any enemy within skill's range) +-- (the following are for ground-skills, a random target tile is selected from +-- the specified area): +-- around1 (3x3 area around self) / around2 (5x5 area around self) / +-- around3 (7x7 area around self) / around4 (9x9 area around self) / +-- around5 (3x3 area around target) / around6 (5x5 area around target) / +-- around7 (7x7 area around target) / around8 (9x9 area around target) / +-- around = around4 +-- +-- conditions: (condition type) (value which specifies a condition value) +-- always unconditional +-- onspawn when the mob spawns/respawns. +-- myhpltmaxrate when the mob's hp drops to a certain % +-- myhpinrate when the mob's hp is in a certain % range ('a condition value' +-- is the lower cap, while 'a value 1' is the upper cap). +-- mystatuson If the mob has any abnormalities in status (condition value) +-- mystatusoff If the mob has ended any abnormalities in status (condition value) +-- friendhpltmaxrate when the mob's friend's hp drops to a certain % +-- friendhpinrate when the mob's friend's hp is in a certain % range (range +-- defined the same way as in myhpinrate) +-- friendstatuson If the friend has any abnormalities in status (condition value) +-- friendstatusoff If the friend has ended any abnormalities in status (condition value) +-- attackpcgt Attack PC becomes more than the number of specification +-- attackpcge Attack PC becomes equal or more than the number of specification. +-- slavelt when the number of slaves is lower than the original number of specification. +-- slavele when the number of slaves is lower or equal than the original number of specification. +-- closedattacked when melee attacked (close range attack) +-- longrangeattacked when long ranged attacked (like bows and far range weapons) +-- skillused when a skill is used on the mob +-- afterskill after the mob used certain skill. +-- casttargeted when a target is in cast range. +-- rudeattacked when a target is rude attacked +-- +-- The character's state which can be specified to be a condition value by the statuson/statusoff system +-- anybad any type of state change +-- stone condition of being in stone state +-- freeze condition of being in frozen state +-- stun condition of being in stunned state +-- sleep condition of being in sleep state +-- poison condition of being in poisoned state +-- curse condition of being in cursed state +-- silence condition of being in silenced state +-- confusion condition of being in confusion state +-- blind condition of being in blind state +-- hiding condition of being in hidden state +-- sight condition of being in unhidden state REPLACE INTO `mob_skill_db` VALUES (1001,'Scorpion@NPC_FIREATTACK','attack',186,1,2000,0,5000,'yes','target','always',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `mob_skill_db` VALUES (1001,'Scorpion@NPC_POISON','attack',176,3,500,800,5000,'no','target','always',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql-files/tools/convert_engine_innodb.sql b/sql-files/tools/convert_engine_innodb.sql index 5cf74d355..0b7270174 100644 --- a/sql-files/tools/convert_engine_innodb.sql +++ b/sql-files/tools/convert_engine_innodb.sql @@ -1,14 +1,24 @@ -- --- Hercules Database Converter ( MyISAM -> InnoDB ) +-- Hercules Database Converter +-- MyISAM Engine -> InnoDB Engine -- +ALTER TABLE `account_data` ENGINE = InnoDB; +ALTER TABLE `acc_reg_num_db` ENGINE = InnoDB; +ALTER TABLE `acc_reg_str_db` ENGINE = InnoDB; ALTER TABLE `auction` ENGINE = InnoDB; +ALTER TABLE `autotrade_data` ENGINE = InnoDB; +ALTER TABLE `autotrade_merchants` ENGINE = InnoDB; ALTER TABLE `cart_inventory` ENGINE = InnoDB; ALTER TABLE `char` ENGINE = InnoDB; +ALTER TABLE `char_reg_num_db` ENGINE = InnoDB; +ALTER TABLE `char_reg_str_db` ENGINE = InnoDB; ALTER TABLE `charlog` ENGINE = InnoDB; ALTER TABLE `elemental` ENGINE = InnoDB; ALTER TABLE `friends` ENGINE = InnoDB; ALTER TABLE `hotkey` ENGINE = InnoDB; +ALTER TABLE `global_acc_reg_num_db` ENGINE = InnoDB; +ALTER TABLE `global_acc_reg_str_db` ENGINE = InnoDB; ALTER TABLE `guild` ENGINE = InnoDB; ALTER TABLE `guild_alliance` ENGINE = InnoDB; ALTER TABLE `guild_castle` ENGINE = InnoDB; @@ -21,8 +31,8 @@ ALTER TABLE `homunculus` ENGINE = InnoDB; ALTER TABLE `interlog` ENGINE = InnoDB; ALTER TABLE `inventory` ENGINE = InnoDB; ALTER TABLE `ipbanlist` ENGINE = InnoDB; -#ALTER TABLE `item_db` ENGINE = InnoDB; -#ALTER TABLE `item_db2` ENGINE = InnoDB; +-- ALTER TABLE `item_db` ENGINE = InnoDB; +-- ALTER TABLE `item_db2` ENGINE = InnoDB; ALTER TABLE `login` ENGINE = InnoDB; ALTER TABLE `mapreg` ENGINE = InnoDB; ALTER TABLE `sc_data` ENGINE = InnoDB; @@ -30,8 +40,9 @@ ALTER TABLE `mail` ENGINE = InnoDB; ALTER TABLE `memo` ENGINE = InnoDB; ALTER TABLE `mercenary` ENGINE = InnoDB; ALTER TABLE `mercenary_owner` ENGINE = InnoDB; -#ALTER TABLE `mob_db` ENGINE = InnoDB; -#ALTER TABLE `mob_db2` ENGINE = InnoDB; +-- ALTER TABLE `mob_db` ENGINE = InnoDB; +-- ALTER TABLE `mob_db2` ENGINE = InnoDB; +ALTER TABLE `npc_market_data` ENGINE = InnoDB; ALTER TABLE `party` ENGINE = InnoDB; ALTER TABLE `pet` ENGINE = InnoDB; ALTER TABLE `quest` ENGINE = InnoDB; @@ -43,16 +54,3 @@ ALTER TABLE `sstatus` ENGINE = InnoDB; ALTER TABLE `storage` ENGINE = InnoDB; ALTER TABLE `interreg` ENGINE = InnoDB; -ALTER TABLE `account_data` ENGINE = InnoDB; -ALTER TABLE `npc_market_data` ENGINE = InnoDB; -ALTER TABLE `acc_reg_num_db` ENGINE = InnoDB; -ALTER TABLE `acc_reg_str_db` ENGINE = InnoDB; -ALTER TABLE `char_reg_num_db` ENGINE = InnoDB; -ALTER TABLE `char_reg_str_db` ENGINE = InnoDB; -ALTER TABLE `global_acc_reg_num_db` ENGINE = InnoDB; -ALTER TABLE `global_acc_reg_str_db` ENGINE = InnoDB; -ALTER TABLE `autotrade_merchants` ENGINE = InnoDB; -ALTER TABLE `autotrade_data` ENGINE = InnoDB; - - - diff --git a/sql-files/tools/convert_engine_myisam.sql b/sql-files/tools/convert_engine_myisam.sql index 7afa7008d..e87037134 100644 --- a/sql-files/tools/convert_engine_myisam.sql +++ b/sql-files/tools/convert_engine_myisam.sql @@ -1,14 +1,24 @@ -- --- Hercules Database Converter ( InnoDB -> MyISAM ) +-- Hercules Database Converter +-- InnoDB Engine -> MyISAM Engine -- +ALTER TABLE `account_data` ENGINE = MyISAM; +ALTER TABLE `acc_reg_num_db` ENGINE = MyISAM; +ALTER TABLE `acc_reg_str_db` ENGINE = MyISAM; ALTER TABLE `auction` ENGINE = MyISAM; +ALTER TABLE `autotrade_data` ENGINE = MyISAM; +ALTER TABLE `autotrade_merchants` ENGINE = MyISAM; ALTER TABLE `cart_inventory` ENGINE = MyISAM; ALTER TABLE `char` ENGINE = MyISAM; +ALTER TABLE `char_reg_num_db` ENGINE = MyISAM; +ALTER TABLE `char_reg_str_db` ENGINE = MyISAM; ALTER TABLE `charlog` ENGINE = MyISAM; ALTER TABLE `elemental` ENGINE = MyISAM; ALTER TABLE `friends` ENGINE = MyISAM; ALTER TABLE `hotkey` ENGINE = MyISAM; +ALTER TABLE `global_acc_reg_num_db` ENGINE = MyISAM; +ALTER TABLE `global_acc_reg_str_db` ENGINE = MyISAM; ALTER TABLE `guild` ENGINE = MyISAM; ALTER TABLE `guild_alliance` ENGINE = MyISAM; ALTER TABLE `guild_castle` ENGINE = MyISAM; @@ -21,8 +31,8 @@ ALTER TABLE `homunculus` ENGINE = MyISAM; ALTER TABLE `interlog` ENGINE = MyISAM; ALTER TABLE `inventory` ENGINE = MyISAM; ALTER TABLE `ipbanlist` ENGINE = MyISAM; -#ALTER TABLE `item_db` ENGINE = MyISAM; -#ALTER TABLE `item_db2` ENGINE = MyISAM; +-- ALTER TABLE `item_db` ENGINE = MyISAM; +-- ALTER TABLE `item_db2` ENGINE = MyISAM; ALTER TABLE `login` ENGINE = MyISAM; ALTER TABLE `mapreg` ENGINE = MyISAM; ALTER TABLE `sc_data` ENGINE = MyISAM; @@ -30,8 +40,9 @@ ALTER TABLE `mail` ENGINE = MyISAM; ALTER TABLE `memo` ENGINE = MyISAM; ALTER TABLE `mercenary` ENGINE = MyISAM; ALTER TABLE `mercenary_owner` ENGINE = MyISAM; -#ALTER TABLE `mob_db` ENGINE = MyISAM; -#ALTER TABLE `mob_db2` ENGINE = MyISAM; +-- ALTER TABLE `mob_db` ENGINE = MyISAM; +-- ALTER TABLE `mob_db2` ENGINE = MyISAM; +ALTER TABLE `npc_market_data` ENGINE = MyISAM; ALTER TABLE `party` ENGINE = MyISAM; ALTER TABLE `pet` ENGINE = MyISAM; ALTER TABLE `quest` ENGINE = MyISAM; @@ -42,13 +53,4 @@ ALTER TABLE `sql_updates` ENGINE = MyISAM; ALTER TABLE `sstatus` ENGINE = MyISAM; ALTER TABLE `storage` ENGINE = MyISAM; ALTER TABLE `interreg` ENGINE = MyISAM; -ALTER TABLE `account_data` ENGINE = MyISAM; -ALTER TABLE `npc_market_data` ENGINE = MyISAM; -ALTER TABLE `acc_reg_num_db` ENGINE = MyISAM; -ALTER TABLE `acc_reg_str_db` ENGINE = MyISAM; -ALTER TABLE `char_reg_num_db` ENGINE = MyISAM; -ALTER TABLE `char_reg_str_db` ENGINE = MyISAM; -ALTER TABLE `global_acc_reg_num_db` ENGINE = MyISAM; -ALTER TABLE `global_acc_reg_str_db` ENGINE = MyISAM; -ALTER TABLE `autotrade_merchants` ENGINE = MyISAM; -ALTER TABLE `autotrade_data` ENGINE = MyISAM; + diff --git a/sql-files/tools/convert_passwords.sql b/sql-files/tools/convert_passwords.sql index 86e4c5b08..9ee35e13e 100644 --- a/sql-files/tools/convert_passwords.sql +++ b/sql-files/tools/convert_passwords.sql @@ -1,3 +1,3 @@ -# Convert passwords to MD5 hashes +-- Convert passwords to MD5 Hash UPDATE `login` SET `user_pass`=MD5(`user_pass`); diff --git a/sql-files/upgrades/2013-02-14--16-15.sql b/sql-files/upgrades/2013-02-14--16-15.sql index 9eac1a5e8..b7db70d43 100644 --- a/sql-files/upgrades/2013-02-14--16-15.sql +++ b/sql-files/upgrades/2013-02-14--16-15.sql @@ -1,7 +1,7 @@ #1360858500 CREATE TABLE IF NOT EXISTS `sql_updates` ( - `timestamp` int(11) unsigned NOT NULL, - `ignored` enum('Yes','No') NOT NULL DEFAULT 'No' + `timestamp` INT(11) UNSIGNED NOT NULL, + `ignored` ENUM('Yes','No') NOT NULL DEFAULT 'No' ) ENGINE=MyISAM; ALTER TABLE `skill` ADD COLUMN `flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500); diff --git a/sql-files/upgrades/2013-02-15--18-06.sql b/sql-files/upgrades/2013-02-15--18-06.sql index 836655095..efb0b2ad6 100644 --- a/sql-files/upgrades/2013-02-15--18-06.sql +++ b/sql-files/upgrades/2013-02-15--18-06.sql @@ -1,3 +1,3 @@ #1360951560 -ALTER TABLE `sql_updates` ADD PRIMARY KEY(`timestamp`); +ALTER TABLE `sql_updates` ADD PRIMARY KEY (`timestamp`); INSERT INTO `sql_updates` (`timestamp`) VALUES (1360951560); diff --git a/sql-files/upgrades/2013-03-05--01-05.sql b/sql-files/upgrades/2013-03-05--01-05.sql index a280dc8dd..b1a0e4029 100644 --- a/sql-files/upgrades/2013-03-05--01-05.sql +++ b/sql-files/upgrades/2013-03-05--01-05.sql @@ -1,3 +1,3 @@ #1362445531 -ALTER TABLE `login` ADD `character_slots` TINYINT( 3 ) UNSIGNED NOT NULL; +ALTER TABLE `login` ADD `character_slots` TINYINT(3) UNSIGNED NOT NULL; INSERT INTO `sql_updates` (`timestamp`) VALUES (1362445531); diff --git a/sql-files/upgrades/2013-03-09--01-56.sql b/sql-files/upgrades/2013-03-09--01-56.sql index c35777283..6edfa79c9 100644 --- a/sql-files/upgrades/2013-03-09--01-56.sql +++ b/sql-files/upgrades/2013-03-09--01-56.sql @@ -1,4 +1,4 @@ #1362794218 -ALTER TABLE `login` ADD COLUMN `pincode` varchar(4) NOT NULL DEFAULT ''; -ALTER TABLE `login` ADD COLUMN `pincode_change` int(11) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `login` ADD COLUMN `pincode` VARCHAR(4) NOT NULL DEFAULT ''; +ALTER TABLE `login` ADD COLUMN `pincode_change` INT(11) unsigned NOT NULL DEFAULT '0'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1362794218); diff --git a/sql-files/upgrades/2013-04-16--01-24.sql b/sql-files/upgrades/2013-04-16--01-24.sql index a55eebe1a..d011e27e3 100644 --- a/sql-files/upgrades/2013-04-16--01-24.sql +++ b/sql-files/upgrades/2013-04-16--01-24.sql @@ -1,3 +1,3 @@ #1366075474 -#Info http://hercules.ws/board/topic/410-skill-script-command-updatefix/ +-- Info http://hercules.ws/board/topic/410-skill-script-command-updatefix/ UPDATE `skill` SET `flag` = 0 WHERE `flag` = 4 AND `id` != 2535 AND `id` != 681; diff --git a/sql-files/upgrades/2013-04-16--02-15.sql b/sql-files/upgrades/2013-04-16--02-15.sql index 3a0895204..458d1dc37 100644 --- a/sql-files/upgrades/2013-04-16--02-15.sql +++ b/sql-files/upgrades/2013-04-16--02-15.sql @@ -1,4 +1,4 @@ #1366078541 -ALTER TABLE `char` ADD `char_opt` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1366075474);#for the previous that missed it.. +ALTER TABLE `char` ADD `char_opt` INT(11) UNSIGNED NOT NULL DEFAULT '0'; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1366075474); -- for the previous that missed it.. INSERT INTO `sql_updates` (`timestamp`) VALUES (1366078541); diff --git a/sql-files/upgrades/2013-10-09--21-38.sql b/sql-files/upgrades/2013-10-09--21-38.sql index 918f8cd21..d8854bcdf 100644 --- a/sql-files/upgrades/2013-10-09--21-38.sql +++ b/sql-files/upgrades/2013-10-09--21-38.sql @@ -1,3 +1,3 @@ #1381354728 -ALTER TABLE `zenylog` MODIFY `type` enum('T','V','P','M','S','N','D','C','A','E','I','B','K') NOT NULL DEFAULT 'S'; +ALTER TABLE `zenylog` MODIFY `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B','K') NOT NULL DEFAULT 'S'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1381354728); diff --git a/sql-files/upgrades/2013-10-10--16-36.sql b/sql-files/upgrades/2013-10-10--16-36.sql index 764e632aa..88db7609e 100644 --- a/sql-files/upgrades/2013-10-10--16-36.sql +++ b/sql-files/upgrades/2013-10-10--16-36.sql @@ -1,7 +1,7 @@ #1381423003 CREATE TABLE IF NOT EXISTS `account_data` ( - `account_id` int(11) unsigned NOT NULL default '0', - `bank_vault` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`account_id`) + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bank_vault` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; INSERT INTO `sql_updates` (`timestamp`) VALUES (1381423003); diff --git a/sql-files/upgrades/2013-10-27--16-47.sql b/sql-files/upgrades/2013-10-27--16-47.sql index 81131726c..2a9a73f31 100644 --- a/sql-files/upgrades/2013-10-27--16-47.sql +++ b/sql-files/upgrades/2013-10-27--16-47.sql @@ -1,6 +1,6 @@ #1382892428 -ALTER TABLE `inventory` MODIFY `equip` int(11) unsigned NOT NULL default '0'; -ALTER TABLE `storage` MODIFY `equip` int(11) unsigned NOT NULL default '0'; -ALTER TABLE `cart_inventory` MODIFY `equip` int(11) unsigned NOT NULL default '0'; -ALTER TABLE `guild_storage` MODIFY `equip` int(11) unsigned NOT NULL default '0'; +ALTER TABLE `inventory` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `storage` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `cart_inventory` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `guild_storage` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1382892428); diff --git a/sql-files/upgrades/2013-10-30--19-53.sql b/sql-files/upgrades/2013-10-30--19-53.sql index 6bff8eaa5..6e89015e9 100644 --- a/sql-files/upgrades/2013-10-30--19-53.sql +++ b/sql-files/upgrades/2013-10-30--19-53.sql @@ -1,5 +1,5 @@ #1383162785 -ALTER TABLE `account_data` ADD `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; -ALTER TABLE `account_data` ADD `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; -ALTER TABLE `account_data` ADD `base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; +ALTER TABLE `account_data` ADD `base_exp` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; +ALTER TABLE `account_data` ADD `base_drop` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; +ALTER TABLE `account_data` ADD `base_death` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1383162785); diff --git a/sql-files/upgrades/2013-10-30--21-12.sql b/sql-files/upgrades/2013-10-30--21-12.sql index 33f052326..e0fbda874 100644 --- a/sql-files/upgrades/2013-10-30--21-12.sql +++ b/sql-files/upgrades/2013-10-30--21-12.sql @@ -1,3 +1,3 @@ #1383167577 -ALTER TABLE `char` ADD `font` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `char` ADD `font` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1383167577); diff --git a/sql-files/upgrades/2013-10-31--07-49.sql b/sql-files/upgrades/2013-10-31--07-49.sql index 607753d54..25f489f57 100644 --- a/sql-files/upgrades/2013-10-31--07-49.sql +++ b/sql-files/upgrades/2013-10-31--07-49.sql @@ -1,6 +1,6 @@ #1383205740 ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite`; -ALTER TABLE `cart_inventory` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -ALTER TABLE `storage` ADD COLUMN `bound` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +ALTER TABLE `cart_inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; +ALTER TABLE `storage` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); diff --git a/sql-files/upgrades/2013-11-09--00-03.sql b/sql-files/upgrades/2013-11-09--00-03.sql index 7ca887653..92fe1b76b 100644 --- a/sql-files/upgrades/2013-11-09--00-03.sql +++ b/sql-files/upgrades/2013-11-09--00-03.sql @@ -1,5 +1,5 @@ #1383955424 -ALTER TABLE `account_data` MODIFY `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; -ALTER TABLE `account_data` MODIFY `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; -ALTER TABLE `account_data` MODIFY `base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100'; +ALTER TABLE `account_data` MODIFY `base_exp` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; +ALTER TABLE `account_data` MODIFY `base_drop` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; +ALTER TABLE `account_data` MODIFY `base_death` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1383955424); diff --git a/sql-files/upgrades/2013-11-15--00-06.sql b/sql-files/upgrades/2013-11-15--00-06.sql index 09749bfc3..dafc5615a 100644 --- a/sql-files/upgrades/2013-11-15--00-06.sql +++ b/sql-files/upgrades/2013-11-15--00-06.sql @@ -4,27 +4,27 @@ -- you'll need to run the following queries manually: -- -- [ Pre-Renewal only ] --- ALTER TABLE item_db2 ADD COLUMN `matk` smallint(5) unsigned DEFAULT NULL AFTER atk; --- ALTER TABLE item_db2 CHANGE COLUMN `equip_level` `equip_level_min` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 ADD COLUMN `equip_level_max` smallint(5) unsigned DEFAULT NULL AFTER equip_level_min; +-- ALTER TABLE item_db2 ADD COLUMN `matk` SMALLINT(5) UNSIGNED DEFAULT NULL AFTER atk; +-- ALTER TABLE item_db2 CHANGE COLUMN `equip_level` `equip_level_min` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 ADD COLUMN `equip_level_max` SMALLINT(5) UNSIGNED DEFAULT NULL AFTER equip_level_min; -- [ Both Pre-Renewal and Renewal ] --- ALTER TABLE item_db2 MODIFY COLUMN `price_buy` mediumint(10) DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `price_sell` mediumint(10) DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `weight` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `atk` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `matk` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `defence` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `range` tinyint(2) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `slots` tinyint(2) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_jobs` int(12) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_upper` tinyint(8) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_genders` tinyint(2) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_locations` smallint(4) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `weapon_level` tinyint(2) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_min` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_max` smallint(5) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `refineable` tinyint(1) unsigned DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `view` smallint(3) unsigned DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `price_buy` MEDIUMINT(10) DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `price_sell` MEDIUMINT(10) DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `weight` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `atk` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `matk` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `defence` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `range` TINYINT(2) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `slots` TINYINT(2) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_jobs` INT(12) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_upper` TINYINT(8) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_genders` TINYINT(2) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_locations` SMALLINT(4) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `weapon_level` TINYINT(2) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_min` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_max` SMALLINT(5) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `refineable` TINYINT(1) UNSIGNED DEFAULT NULL; +-- ALTER TABLE item_db2 MODIFY COLUMN `view` SMALLINT(3) UNSIGNED DEFAULT NULL; -- INSERT INTO `sql_updates` (`timestamp`) VALUES (1384473995); -- -- [ End ] @@ -75,27 +75,27 @@ BEGIN END $$ -CALL alter_if_not_exists('item_db2', 'matk', 'ADD COLUMN', 'smallint(5) unsigned DEFAULT NULL AFTER atk') $$ -CALL alter_if_exists('item_db2', 'equip_level', 'CHANGE COLUMN', 'equip_level_min smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_not_exists('item_db2', 'equip_level_max', 'ADD COLUMN', 'smallint(5) unsigned DEFAULT NULL AFTER equip_level_min') $$ +CALL alter_if_not_exists('item_db2', 'matk', 'ADD COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL AFTER atk') $$ +CALL alter_if_exists('item_db2', 'equip_level', 'CHANGE COLUMN', 'equip_level_min SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_not_exists('item_db2', 'equip_level_max', 'ADD COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL AFTER equip_level_min') $$ -CALL alter_if_exists('item_db2', 'price_buy', 'MODIFY COLUMN', 'mediumint(10) DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'price_sell', 'MODIFY COLUMN', 'mediumint(10) DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'weight', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'atk', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'matk', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'defence', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'range', 'MODIFY COLUMN', 'tinyint(2) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'slots', 'MODIFY COLUMN', 'tinyint(2) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_jobs', 'MODIFY COLUMN', 'int(12) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_upper', 'MODIFY COLUMN', 'tinyint(8) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_genders', 'MODIFY COLUMN', 'tinyint(2) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_locations', 'MODIFY COLUMN', 'smallint(4) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'weapon_level', 'MODIFY COLUMN', 'tinyint(2) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_level_min', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_level_max', 'MODIFY COLUMN', 'smallint(5) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'refineable', 'MODIFY COLUMN', 'tinyint(1) unsigned DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'view', 'MODIFY COLUMN', 'smallint(3) unsigned DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'price_buy', 'MODIFY COLUMN', 'MEDIUMINT(10) DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'price_sell', 'MODIFY COLUMN', 'MEDIUMINT(10) DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'weight', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'atk', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'matk', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'defence', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'range', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'slots', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_jobs', 'MODIFY COLUMN', 'INT(12) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_upper', 'MODIFY COLUMN', 'TINYINT(8) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_genders', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_locations', 'MODIFY COLUMN', 'SMALLINT(4) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'weapon_level', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_level_min', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'equip_level_max', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'refineable', 'MODIFY COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL') $$ +CALL alter_if_exists('item_db2', 'view', 'MODIFY COLUMN', 'SMALLINT(3) UNSIGNED DEFAULT NULL') $$ DROP PROCEDURE IF EXISTS alter_if_not_exists $$ DROP PROCEDURE IF EXISTS alter_if_exists $$ diff --git a/sql-files/upgrades/2013-11-16--07-49.sql b/sql-files/upgrades/2013-11-16--07-49.sql index 15c740fd0..fce74aab1 100644 --- a/sql-files/upgrades/2013-11-16--07-49.sql +++ b/sql-files/upgrades/2013-11-16--07-49.sql @@ -1,3 +1,3 @@ #1384588175 -ALTER TABLE `char` ADD COLUMN `unban_time` int(11) unsigned NOT NULL default '0'; +ALTER TABLE `char` ADD COLUMN `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1384588175); diff --git a/sql-files/upgrades/2013-11-18--08-23.sql b/sql-files/upgrades/2013-11-18--08-23.sql index d5da5fd95..d7100d78a 100644 --- a/sql-files/upgrades/2013-11-18--08-23.sql +++ b/sql-files/upgrades/2013-11-18--08-23.sql @@ -4,7 +4,7 @@ -- you'll need to run the following queries manually: -- -- [ Both Pre-Renewal and Renewal ] --- ALTER TABLE item_db2 ADD COLUMN `bindonequip` tinyint(1) unsigned DEFAULT NULL AFTER `view`; +-- ALTER TABLE item_db2 ADD COLUMN `bindonequip` TINYINT(1) UNSIGNED DEFAULT NULL AFTER `view`; -- INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034); -- -- [ End ] @@ -55,7 +55,7 @@ BEGIN END $$ -CALL alter_if_not_exists('item_db2', 'bindonequip', 'ADD COLUMN', 'tinyint(1) unsigned DEFAULT NULL AFTER `view`') $$ +CALL alter_if_not_exists('item_db2', 'bindonequip', 'ADD COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL AFTER `view`') $$ DROP PROCEDURE IF EXISTS alter_if_not_exists $$ DROP PROCEDURE IF EXISTS alter_if_exists $$ diff --git a/sql-files/upgrades/2013-12-24--00-15.sql b/sql-files/upgrades/2013-12-24--00-15.sql index b1f8d019d..2de4771a6 100644 --- a/sql-files/upgrades/2013-12-24--00-15.sql +++ b/sql-files/upgrades/2013-12-24--00-15.sql @@ -1,8 +1,8 @@ #1387844126 CREATE TABLE IF NOT EXISTS `npc_market_data` ( - `name` varchar(24) NOT NULL default '', - `itemid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`name`,`itemid`) + `name` VARCHAR(24) NOT NULL DEFAULT '', + `itemid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`name`,`itemid`) ) ENGINE=MyISAM; INSERT INTO `sql_updates` (`timestamp`) VALUES (1387844126); diff --git a/sql-files/upgrades/2014-01-04--16-47.sql b/sql-files/upgrades/2014-01-04--16-47.sql index 53320a712..40be437d9 100644 --- a/sql-files/upgrades/2014-01-04--16-47.sql +++ b/sql-files/upgrades/2014-01-04--16-47.sql @@ -2,53 +2,53 @@ ALTER TABLE `mapreg` ADD PRIMARY KEY (`varname`, `index`); ALTER TABLE `mapreg` DROP INDEX `varname`; ALTER TABLE `mapreg` DROP INDEX `index`; -ALTER TABLE `mapreg` MODIFY `varname` varchar(32) BINARY NOT NULL; +ALTER TABLE `mapreg` MODIFY `varname` VARCHAR(32) BINARY NOT NULL; CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `char_reg_num_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `global_acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; INSERT INTO `acc_reg_num_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` NOT LIKE '%$'; @@ -57,5 +57,5 @@ INSERT INTO `char_reg_num_db` (`char_id`, `key`, `index`, `value`) SELECT `char_ INSERT INTO `char_reg_str_db` (`char_id`, `key`, `index`, `value`) SELECT `char_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 3 AND `str` LIKE '%$'; INSERT INTO `global_acc_reg_num_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` NOT LIKE '%$'; INSERT INTO `global_acc_reg_str_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` LIKE '%$'; -#DROP TABLE `global_reg_value`; +# DROP TABLE `global_reg_value`; INSERT INTO `sql_updates` (`timestamp`) VALUES (1388854043); diff --git a/sql-files/upgrades/2014-01-06--17-22.sql b/sql-files/upgrades/2014-01-06--17-22.sql index 0ba9cb69f..e3ca8935e 100644 --- a/sql-files/upgrades/2014-01-06--17-22.sql +++ b/sql-files/upgrades/2014-01-06--17-22.sql @@ -1,16 +1,16 @@ #1389028967 CREATE TABLE IF NOT EXISTS `autotrade_merchants` ( - `account_id` int(11) NOT NULL default '0', - `char_id` int(11) NOT NULL default '0', - `sex` tinyint(2) NOT NULL default '0', - `title` varchar(80) NOT NULL default 'Buy From Me!', - PRIMARY KEY (`account_id`,`char_id`) + `account_id` INT(11) NOT NULL DEFAULT '0', + `char_id` INT(11) NOT NULL DEFAULT '0', + `sex` TINYINT(2) NOT NULL DEFAULT '0', + `title` varchar(80) NOT NULL DEFAULT 'Buy From Me!', + PRIMARY KEY (`account_id`,`char_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `autotrade_data` ( - `char_id` int(11) NOT NULL default '0', - `itemkey` int(11) NOT NULL default '0', - `amount` int(11) NOT NULL default '0', - `price` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`itemkey`) + `char_id` INT(11) NOT NULL DEFAULT '0', + `itemkey` INT(11) NOT NULL DEFAULT '0', + `amount` INT(11) NOT NULL DEFAULT '0', + `price` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`itemkey`) ) ENGINE=MyISAM; INSERT INTO `sql_updates` (`timestamp`) VALUES (1389028967); diff --git a/sql-files/upgrades/2014-02-19--17-57.sql b/sql-files/upgrades/2014-02-19--17-57.sql index 74cfdfe37..63abc335f 100644 --- a/sql-files/upgrades/2014-02-19--17-57.sql +++ b/sql-files/upgrades/2014-02-19--17-57.sql @@ -1,4 +1,4 @@ #1392832626 DELETE FROM `sc_data` WHERE `tick` = '-1'; -ALTER TABLE `sc_data` ADD PRIMARY KEY (`account_id`,`char_id`,`type`); +ALTER TABLE `sc_data` ADD PRIMARY KEY (`account_id`,`char_id`,`type`); INSERT INTO `sql_updates` (`timestamp`) VALUES (1392832626); diff --git a/sql-files/upgrades/2014-03-25--23-57.sql b/sql-files/upgrades/2014-03-25--23-57.sql index f5c3aad00..40d3fb2fc 100644 --- a/sql-files/upgrades/2014-03-25--23-57.sql +++ b/sql-files/upgrades/2014-03-25--23-57.sql @@ -1,3 +1,3 @@ #1395789302 -ALTER TABLE `charlog` ADD COLUMN `char_id` int(11) unsigned NOT NULL default '0' AFTER `account_id`; +ALTER TABLE `charlog` ADD COLUMN `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`; INSERT INTO `sql_updates` (`timestamp`) VALUES (1395789302); diff --git a/sql-files/upgrades/2014-04-07--22-04.sql b/sql-files/upgrades/2014-04-07--22-04.sql index 9e33d6aec..56c54eac4 100644 --- a/sql-files/upgrades/2014-04-07--22-04.sql +++ b/sql-files/upgrades/2014-04-07--22-04.sql @@ -1,3 +1,3 @@ #1396893866 -ALTER TABLE `char` ADD COLUMN `uniqueitem_counter` bigint(20) NOT NULL AFTER `unban_time`; +ALTER TABLE `char` ADD COLUMN `uniqueitem_counter` BIGINT(20) NOT NULL AFTER `unban_time`; INSERT INTO `sql_updates` (`timestamp`) VALUES (1396893866); diff --git a/sql-files/upgrades/2014-04-26--10-00.sql b/sql-files/upgrades/2014-04-26--10-00.sql index de3fbd4c8..0c0b571e0 100644 --- a/sql-files/upgrades/2014-04-26--10-00.sql +++ b/sql-files/upgrades/2014-04-26--10-00.sql @@ -1,3 +1,3 @@ #1398477600 -ALTER TABLE `char` CHANGE COLUMN `uniqueitem_counter` `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0' ; +ALTER TABLE `char` CHANGE COLUMN `uniqueitem_counter` `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'; INSERT INTO `sql_updates` (`timestamp`) VALUES (1398477600); diff --git a/sql-files/upgrades/eathena-upgrade.sql b/sql-files/upgrades/eathena-upgrade.sql index 63a0d1151..20678dc9f 100644 --- a/sql-files/upgrades/eathena-upgrade.sql +++ b/sql-files/upgrades/eathena-upgrade.sql @@ -1,78 +1,114 @@ -##### -#Upgrade file to be used when going from eAthena to Hercules -#Note: If you're not up to date with eAthena, go through their upgrade files first and run them before this file. -#Note: After runing this file run Hercules upgrade files. -##### +-- +-- Upgrade file to be used when going from eAthena to Hercules +-- Note: If you're not up to date with eAthena, go through their upgrade files first and run them before this file. +-- Note: After runing this file run Hercules upgrade files. +-- + ALTER TABLE `global_reg_value` MODIFY `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '3'; + -- Adds 'I' and 'X' to `type` in `picklog` table ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X') NOT NULL DEFAULT 'P'; + -- Adds 'D' and 'U' to `type` in `picklog` table ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL DEFAULT 'P'; + -- `ExpPer` column removed from `mob_db` and `mob_db2` tables ALTER TABLE `mob_db` DROP COLUMN `ExpPer`; ALTER TABLE `mob_db2` DROP COLUMN `ExpPer`; + -- Rename `level` column to `group_id` in `login` table ALTER TABLE `login` CHANGE COLUMN `level` `group_id` TINYINT(3) NOT NULL DEFAULT '0'; + -- Adds 'I' to `type` in `zenylog` ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I') NOT NULL DEFAULT 'S'; -ALTER TABLE `char` ADD COLUMN `elemental_id` int(11) unsigned NOT NULL default '0'; + +ALTER TABLE `char` ADD COLUMN `elemental_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'; + CREATE TABLE IF NOT EXISTS `elemental` ( - `ele_id` int(11) unsigned NOT NULL auto_increment, - `char_id` int(11) NOT NULL, - `class` mediumint(9) unsigned NOT NULL default '0', - `mode` int(11) unsigned NOT NULL default '1', - `hp` int(12) NOT NULL default '1', - `sp` int(12) NOT NULL default '1', - `max_hp` mediumint(8) unsigned NOT NULL default '0', - `max_sp` mediumint(6) unsigned NOT NULL default '0', - `str` smallint(4) unsigned NOT NULL default '0', - `agi` smallint(4) unsigned NOT NULL default '0', - `vit` smallint(4) unsigned NOT NULL default '0', - `int` smallint(4) unsigned NOT NULL default '0', - `dex` smallint(4) unsigned NOT NULL default '0', - `luk` smallint(4) unsigned NOT NULL default '0', - `life_time` int(11) NOT NULL default '0', - PRIMARY KEY (`ele_id`) + `ele_id` INT(11) UNSIGNED NOT NULL auto_increment, + `char_id` INT(11) NOT NULL, + `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', + `mode` INT(11) UNSIGNED NOT NULL DEFAULT '1', + `hp` INT(12) NOT NULL DEFAULT '1', + `sp` INT(12) NOT NULL DEFAULT '1', + `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', + `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', + `life_time` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`ele_id`) ) ENGINE=MyISAM; + -- Adds 'D' to `type` in `zenylog` ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I','D') NOT NULL DEFAULT 'S'; + ALTER TABLE `char` ADD CONSTRAINT `name_key` UNIQUE (`name`); + ALTER TABLE `inventory` ADD COLUMN `favorite` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time`; + ALTER TABLE `item_db_re` CHANGE `equip_level` `equip_level` VARCHAR(10) DEFAULT ''; + ALTER TABLE `item_db_re` MODIFY COLUMN `atk:matk` VARCHAR(11) DEFAULT ''; + ALTER TABLE `item_db_re` MODIFY COLUMN `defence` SMALLINT(5) UNSIGNED DEFAULT NULL; + ALTER TABLE `homunculus` ADD `prev_class` MEDIUMINT( 9 ) NOT NULL AFTER `class` + ALTER TABLE `item_db_re` MODIFY `defence` SMALLINT(5) DEFAULT NULL; + ALTER TABLE `item_db` MODIFY `defence` SMALLINT(5) DEFAULT NULL; + ALTER TABLE `zenylog` MODIFY `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B') NOT NULL DEFAULT 'S'; + ALTER TABLE `elemental` CHANGE COLUMN `str` `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `agi` `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `vit` `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `int` `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `dex` `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `luk` `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `life_time` `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - ADD COLUMN `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0 AFTER `flee`, - ADD COLUMN `life_time` INT(11) NOT NULL DEFAULT 0 AFTER `hit`; + CHANGE COLUMN `agi` `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, + CHANGE COLUMN `vit` `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, + CHANGE COLUMN `INT` `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, + CHANGE COLUMN `dex` `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, + CHANGE COLUMN `luk` `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, + CHANGE COLUMN `life_time` `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, + ADD COLUMN `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0 AFTER `flee`, + ADD COLUMN `life_time` INT(11) NOT NULL DEFAULT 0 AFTER `hit`; + ALTER TABLE `picklog` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0' AFTER `card3`; + CREATE TABLE IF NOT EXISTS `interreg` ( - `varname` varchar(11) NOT NULL, - `value` varchar(20) NOT NULL, + `varname` VARCHAR(11) NOT NULL, + `value` VARCHAR(20) NOT NULL, PRIMARY KEY (`varname`) ) ENGINE=InnoDB; -INSERT INTO `interreg` (`varname`, `value`) VALUES -('nsiuid', '0'); + +INSERT INTO `interreg` (`varname`, `value`) VALUES ('nsiuid', '0'); + ALTER TABLE `auction` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `cart_inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `guild_storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `mail` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; + ALTER TABLE `picklog` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + UPDATE `interreg` SET `varname` = 'unique_id' WHERE `interreg`.`varname` = 'nsiuid'; + ALTER TABLE `auction` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + ALTER TABLE `cart_inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + ALTER TABLE `guild_storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + ALTER TABLE `inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + ALTER TABLE `mail` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + ALTER TABLE `storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; + diff --git a/sql-files/upgrades/rAthena-main-upgrade.sql b/sql-files/upgrades/rAthena-main-upgrade.sql index cc198e834..37b961d54 100644 --- a/sql-files/upgrades/rAthena-main-upgrade.sql +++ b/sql-files/upgrades/rAthena-main-upgrade.sql @@ -15,40 +15,32 @@ TRUNCATE TABLE `sc_data`; -- Drop table `skillcooldown` since it's not used in Hercules DROP TABLE IF EXISTS `skillcooldown`; - -- Upgrades for table `cart_inventory` -ALTER TABLE `cart_inventory` MODIFY `bound` tinyint(1) unsigned NOT NULL default '0'; - +ALTER TABLE `cart_inventory` MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; -- Upgrades for table `char` -ALTER TABLE `char` CHANGE `moves` `slotchange` SMALLINT(3) UNSIGNED NOT NULL default '0', - ADD `char_opt` INT( 11 ) UNSIGNED NOT NULL default '0' AFTER `slotchange`, - ADD `font` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `char_opt`, +ALTER TABLE `char` CHANGE `moves` `slotchange` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', + ADD `char_opt` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `slotchange`, + ADD `font` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `char_opt`, MODIFY `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'; - -- Upgrades for table `charlog` -ALTER TABLE `charlog` ADD COLUMN `char_id` int(11) unsigned NOT NULL default '0' AFTER `account_id`; - +ALTER TABLE `charlog` ADD COLUMN `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`; -- Upgrades for table `guild_storage` -ALTER TABLE `guild_storage` MODIFY `bound` tinyint(1) unsigned NOT NULL default '0'; - +ALTER TABLE `guild_storage` MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; -- Upgrades for table `inventory` -ALTER TABLE `inventory` MODIFY `bound` tinyint(1) unsigned NOT NULL default '0'; - +ALTER TABLE `inventory` MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; -- Login table will be upgraded at a later point on this file -- so that we can save the bank vault. - -- Upgrades for table `mapreg` -ALTER TABLE `mapreg` MODIFY `varname` varchar(32) BINARY NOT NULL, +ALTER TABLE `mapreg` MODIFY `varname` VARCHAR(32) BINARY NOT NULL, DROP KEY `varname`, DROP KEY `index`, - ADD PRIMARY KEY (`varname`,`index`); - + ADD PRIMARY KEY (`varname`,`index`); -- Upgrades for table `sc_data` ALTER TABLE `pet` CHANGE `incuvate` `incubate` int(11) unsigned NOT NULL default '0'; @@ -57,14 +49,13 @@ ALTER TABLE `pet` CHANGE `incuvate` `incubate` int(11) unsigned NOT NULL default -- Upgrades for table `sc_data` ALTER TABLE `sc_data` ADD PRIMARY KEY (`account_id`,`char_id`,`type`); - -- -- Table structure for table `sql_updates` -- CREATE TABLE IF NOT EXISTS `sql_updates` ( - `timestamp` int(11) unsigned NOT NULL, - `ignored` enum('Yes','No') NOT NULL DEFAULT 'No', + `timestamp` INT(11) UNSIGNED NOT NULL, + `ignored` ENUM('Yes','No') NOT NULL DEFAULT 'No', PRIMARY KEY (`timestamp`) ) ENGINE=MyISAM; @@ -97,21 +88,19 @@ INSERT INTO `sql_updates` (`timestamp`) VALUES (1396893866); -- 2014-04-07--22-0 INSERT INTO `sql_updates` (`timestamp`) VALUES (1398477600); -- 2014-04-26--10-00.sql INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139); -- 2014-05-17--00-06.sql - -- Updates to table `storage` -ALTER TABLE `storage` MODIFY `bound` tinyint(1) unsigned NOT NULL default '0'; - +ALTER TABLE `storage` MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; -- -- Table structure for table `account_data` -- CREATE TABLE IF NOT EXISTS `account_data` ( - `account_id` int(11) unsigned NOT NULL default '0', - `bank_vault` int(11) unsigned NOT NULL default '0', - `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100', - `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100', - `base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bank_vault` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', + `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', + `base_death` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; @@ -119,29 +108,25 @@ CREATE TABLE IF NOT EXISTS `account_data` ( -- to our account_data table. There may be some not working cases. INSERT INTO `account_data` (`account_id`, `bank_vault`) SELECT `account_id`, `bank_vault` FROM `login` WHERE `bank_vault` > 0 ; - -- Upgrades for table `login` ALTER TABLE `login` DROP COLUMN `vip_time`, DROP COLUMN `old_group`, DROP COLUMN `bank_vault`; - -- Drop table `bonus_script` since it's not used in Hercules DROP TABLE IF EXISTS `bonus_script`; - -- -- Table structure for table `npc_market_data` -- CREATE TABLE IF NOT EXISTS `npc_market_data` ( - `name` varchar(24) NOT NULL default '', - `itemid` int(11) unsigned NOT NULL default '0', - `amount` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`name`,`itemid`) + `name` VARCHAR(24) NOT NULL DEFAULT '', + `itemid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + PRIMARY KEY (`name`,`itemid`) ) ENGINE=MyISAM; - -- Autotrade saving. Very special thanks to Dastgir Pojee! -- -- Vending Database Update @@ -163,7 +148,7 @@ ALTER TABLE `vending_items` MODIFY `price` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `vending_items` - ADD PRIMARY KEY( `char_id`, `itemkey`); + ADD PRIMARY KEY ( `char_id`, `itemkey`); RENAME TABLE `vending_items` TO `autotrade_data`; @@ -213,11 +198,11 @@ DROP TABLE IF EXISTS `buyingstores`, `buyingstore_items`; -- CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; @@ -227,71 +212,66 @@ CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( -- CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; - -- -- Table structure for table `char_reg_num_db` -- CREATE TABLE IF NOT EXISTS `char_reg_num_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; - -- -- Table structure for table `char_reg_str_db` -- CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( - `char_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`char_id`,`key`,`index`), + `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`char_id`,`key`,`index`), KEY `char_id` (`char_id`) ) ENGINE=MyISAM; - -- -- Table structure for table `global_acc_reg_num_db` -- CREATE TABLE IF NOT EXISTS `global_acc_reg_num_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` int(11) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; - -- -- Table structure for table `global_acc_reg_str_db` -- CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( - `account_id` int(11) unsigned NOT NULL default '0', - `key` varchar(32) BINARY NOT NULL default '', - `index` int(11) unsigned NOT NULL default '0', - `value` varchar(254) NOT NULL default '0', - PRIMARY KEY (`account_id`,`key`,`index`), + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR(32) BINARY NOT NULL DEFAULT '', + `index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `value` VARCHAR(254) NOT NULL DEFAULT '0', + PRIMARY KEY (`account_id`,`key`,`index`), KEY `account_id` (`account_id`) ) ENGINE=MyISAM; - -- Saving the data INSERT INTO `acc_reg_num_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` NOT LIKE '%$'; INSERT INTO `acc_reg_str_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` LIKE '%$'; @@ -302,3 +282,4 @@ INSERT INTO `global_acc_reg_str_db` (`account_id`, `key`, `index`, `value`) SELE -- Dropping now useless table DROP TABLE `global_reg_value`; + |