-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 139.99.102.101:3306
-- Generation Time: Oct 06, 2018 at 03:07 PM
-- Server version: 5.6.38
-- PHP Version: 7.1.18

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `crazyporing`
--

-- --------------------------------------------------------

--
-- Table structure for table `account_data`
--

CREATE TABLE `account_data` (
  `account_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `bank_vault` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `base_exp` smallint(6) UNSIGNED NOT NULL DEFAULT '100',
  `base_drop` smallint(6) UNSIGNED NOT NULL DEFAULT '100',
  `base_death` smallint(6) UNSIGNED NOT NULL DEFAULT '100'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `acc_reg_num_db`
--

CREATE TABLE `acc_reg_num_db` (
  `account_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `acc_reg_str_db`
--

CREATE TABLE `acc_reg_str_db` (
  `account_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` varchar(254) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `attrib_db`
--

CREATE TABLE `attrib_db` (
  `ID` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
  `Neutral` float NOT NULL DEFAULT '0',
  `Water` float NOT NULL DEFAULT '0',
  `Earth` float NOT NULL DEFAULT '0',
  `Fire` float NOT NULL DEFAULT '0',
  `Wind` float NOT NULL DEFAULT '0',
  `Poison` float NOT NULL DEFAULT '0',
  `Holy` float NOT NULL DEFAULT '0',
  `Shadow` float NOT NULL DEFAULT '0',
  `Ghost` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `Undead` smallint(5) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `auction`
--

CREATE TABLE `auction` (
  `auction_id` bigint(20) UNSIGNED NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) NOT NULL DEFAULT '0',
  `unique_id` bigint(20) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `autotrade_data`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `autotrade_merchants`
--

CREATE TABLE `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!'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cart_inventory`
--

CREATE TABLE `cart_inventory` (
  `id` int(11) NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `changelog`
--

CREATE TABLE `changelog` (
  `post_id` int(11) UNSIGNED NOT NULL,
  `ldate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmname` varchar(30) NOT NULL,
  `logtext` varchar(255) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `char`
--

CREATE TABLE `char` (
  `char_id` int(11) UNSIGNED NOT NULL,
  `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` int(9) UNSIGNED NOT NULL DEFAULT '0',
  `hp` int(9) UNSIGNED NOT NULL DEFAULT '0',
  `max_sp` int(9) UNSIGNED NOT NULL DEFAULT '0',
  `sp` int(9) 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',
  `clan_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',
  `body` 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_login` bigint(20) 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',
  `sex` enum('M','F','U') NOT NULL DEFAULT 'U',
  `hotkey_rowshift` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `attendance_count` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `attendance_timer` bigint(20) DEFAULT '0',
  `title_id` int(11) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `charlog`
--

CREATE TABLE `charlog` (
  `time` datetime DEFAULT NULL,
  `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',
  `class` mediumint(9) 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 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `char_achievements`
--

CREATE TABLE `char_achievements` (
  `char_id` int(11) UNSIGNED NOT NULL,
  `ach_id` int(11) UNSIGNED NOT NULL,
  `completed_at` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `rewarded_at` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_0` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_1` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_2` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_3` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_4` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_5` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_6` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_7` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_8` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `obj_9` int(10) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `char_reg_num_db`
--

CREATE TABLE `char_reg_num_db` (
  `char_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `char_reg_str_db`
--

CREATE TABLE `char_reg_str_db` (
  `char_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` varchar(254) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `claim_codes`
--

CREATE TABLE `claim_codes` (
  `code` varchar(50) NOT NULL DEFAULT '',
  `ref` varchar(32) DEFAULT '0',
  `nameid` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `item_name` varchar(45) NOT NULL DEFAULT '',
  `amount` smallint(6) UNSIGNED NOT NULL DEFAULT '0',
  `time_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `redeem_time` 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',
  `claimed` smallint(3) UNSIGNED DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_banlog`
--

CREATE TABLE `cp_banlog` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `banned_by` int(11) UNSIGNED DEFAULT NULL,
  `ban_type` tinyint(1) NOT NULL,
  `ban_until` datetime NOT NULL,
  `ban_date` datetime NOT NULL,
  `ban_reason` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_changelogcat`
--

CREATE TABLE `cp_changelogcat` (
  `cat_id` int(3) NOT NULL,
  `name` varchar(32) NOT NULL,
  `display` int(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_changelogs`
--

CREATE TABLE `cp_changelogs` (
  `cl_id` int(6) NOT NULL,
  `account_id` int(7) NOT NULL,
  `category` int(6) NOT NULL,
  `char_id` text NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sslink` text NOT NULL,
  `chatlink` text NOT NULL,
  `videolink` text NOT NULL,
  `subject` varchar(64) NOT NULL DEFAULT '0',
  `text` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_charprefs`
--

CREATE TABLE `cp_charprefs` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `char_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Character preferences.';

-- --------------------------------------------------------

--
-- Table structure for table `cp_createlog`
--

CREATE TABLE `cp_createlog` (
  `id` int(11) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `userid` varchar(23) NOT NULL,
  `user_pass` varchar(32) NOT NULL,
  `sex` enum('M','F','S') NOT NULL DEFAULT 'M',
  `email` varchar(39) NOT NULL,
  `reg_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `reg_ip` varchar(100) NOT NULL,
  `delete_date` datetime DEFAULT NULL,
  `confirmed` tinyint(1) NOT NULL DEFAULT '1',
  `confirm_code` varchar(32) DEFAULT NULL,
  `confirm_expire` datetime DEFAULT NULL,
  `country` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_credits`
--

CREATE TABLE `cp_credits` (
  `account_id` int(11) UNSIGNED NOT NULL,
  `balance` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `last_donation_date` datetime DEFAULT NULL,
  `last_donation_amount` float UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Donation credits balance for a given account.';

-- --------------------------------------------------------

--
-- Table structure for table `cp_emailchange`
--

CREATE TABLE `cp_emailchange` (
  `id` int(11) NOT NULL,
  `code` varchar(32) NOT NULL,
  `account_id` int(10) NOT NULL,
  `old_email` varchar(39) NOT NULL,
  `new_email` varchar(39) NOT NULL,
  `request_date` datetime NOT NULL,
  `request_ip` varchar(15) NOT NULL,
  `change_date` datetime DEFAULT NULL,
  `change_ip` varchar(15) DEFAULT NULL,
  `change_done` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_highest_peak`
--

CREATE TABLE `cp_highest_peak` (
  `id` int(10) UNSIGNED NOT NULL,
  `num_users` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `peak_date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_ipbanlog`
--

CREATE TABLE `cp_ipbanlog` (
  `id` int(10) UNSIGNED NOT NULL,
  `ip_address` varchar(15) NOT NULL,
  `banned_by` int(11) UNSIGNED DEFAULT NULL,
  `ban_type` tinyint(1) NOT NULL,
  `ban_until` datetime NOT NULL,
  `ban_date` datetime NOT NULL,
  `ban_reason` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_itemdesc`
--

CREATE TABLE `cp_itemdesc` (
  `itemid` int(10) UNSIGNED NOT NULL,
  `itemdesc` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stored item descriptions from parsed itemInfo.';

-- --------------------------------------------------------

--
-- Table structure for table `cp_itemshop`
--

CREATE TABLE `cp_itemshop` (
  `id` int(11) UNSIGNED NOT NULL,
  `nameid` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `category` int(11) DEFAULT NULL,
  `quantity` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `cost` int(11) UNSIGNED NOT NULL,
  `info` text,
  `use_existing` tinyint(4) NOT NULL DEFAULT '0',
  `create_date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Item shop';

-- --------------------------------------------------------

--
-- Table structure for table `cp_loginlog`
--

CREATE TABLE `cp_loginlog` (
  `id` int(11) NOT NULL,
  `account_id` int(10) DEFAULT NULL,
  `username` varchar(23) NOT NULL,
  `password` varchar(32) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `login_date` datetime NOT NULL,
  `error_code` tinyint(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_loginprefs`
--

CREATE TABLE `cp_loginprefs` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Account preferences';

-- --------------------------------------------------------

--
-- Table structure for table `cp_pwchange`
--

CREATE TABLE `cp_pwchange` (
  `id` int(11) NOT NULL,
  `account_id` int(10) NOT NULL,
  `old_password` varchar(32) NOT NULL,
  `new_password` varchar(32) DEFAULT NULL,
  `change_date` datetime NOT NULL,
  `change_ip` varchar(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_redeemlog`
--

CREATE TABLE `cp_redeemlog` (
  `id` int(11) UNSIGNED NOT NULL,
  `nameid` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `quantity` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `cost` int(11) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `char_id` int(11) UNSIGNED DEFAULT NULL,
  `redeemed` tinyint(1) UNSIGNED NOT NULL,
  `redemption_date` datetime DEFAULT NULL,
  `purchase_date` datetime NOT NULL,
  `credits_before` int(10) NOT NULL,
  `credits_after` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Log of redeemed donation items.';

-- --------------------------------------------------------

--
-- Table structure for table `cp_resetpass`
--

CREATE TABLE `cp_resetpass` (
  `id` int(11) NOT NULL,
  `code` varchar(32) NOT NULL,
  `account_id` int(10) NOT NULL,
  `old_password` varchar(32) NOT NULL,
  `new_password` varchar(32) DEFAULT NULL,
  `request_date` datetime NOT NULL,
  `request_ip` varchar(15) NOT NULL,
  `reset_date` datetime DEFAULT NULL,
  `reset_ip` varchar(15) DEFAULT NULL,
  `reset_done` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_servicedesk`
--

CREATE TABLE `cp_servicedesk` (
  `ticket_id` int(6) NOT NULL,
  `account_id` int(7) NOT NULL,
  `category` int(6) NOT NULL,
  `status` varchar(14) NOT NULL DEFAULT 'Pending',
  `char_id` text NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sslink` text NOT NULL,
  `chatlink` text NOT NULL,
  `videolink` text NOT NULL,
  `subject` varchar(64) NOT NULL DEFAULT '0',
  `text` text NOT NULL,
  `ip` varchar(15) NOT NULL DEFAULT '0',
  `team` int(1) NOT NULL DEFAULT '1',
  `curemail` text NOT NULL,
  `lastreply` varchar(24) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_servicedeska`
--

CREATE TABLE `cp_servicedeska` (
  `action_id` int(6) NOT NULL,
  `ticket_id` int(6) NOT NULL,
  `author` varchar(32) NOT NULL,
  `text` text NOT NULL,
  `action` text NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ip` varchar(15) NOT NULL DEFAULT '0',
  `isstaff` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_servicedeskcat`
--

CREATE TABLE `cp_servicedeskcat` (
  `cat_id` int(3) NOT NULL,
  `name` varchar(32) NOT NULL,
  `display` int(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_servicedesksettings`
--

CREATE TABLE `cp_servicedesksettings` (
  `account_id` int(7) NOT NULL,
  `account_name` varchar(32) NOT NULL,
  `prefered_name` varchar(32) NOT NULL,
  `team` int(1) NOT NULL,
  `emailalerts` int(1) NOT NULL DEFAULT '0',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_trusted`
--

CREATE TABLE `cp_trusted` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED NOT NULL,
  `email` varchar(255) NOT NULL,
  `create_date` datetime NOT NULL,
  `delete_date` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `cp_txnlog`
--

CREATE TABLE `cp_txnlog` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) UNSIGNED DEFAULT '0',
  `server_name` varchar(255) DEFAULT NULL,
  `credits` int(11) DEFAULT '0',
  `receiver_email` varchar(60) DEFAULT NULL,
  `item_name` varchar(100) DEFAULT NULL,
  `item_number` varchar(10) DEFAULT NULL,
  `quantity` varchar(6) DEFAULT NULL,
  `payment_status` varchar(20) DEFAULT NULL,
  `pending_reason` varchar(20) DEFAULT NULL,
  `payment_date` varchar(40) DEFAULT NULL,
  `mc_gross` varchar(20) DEFAULT NULL,
  `mc_fee` varchar(20) DEFAULT NULL,
  `tax` varchar(20) DEFAULT NULL,
  `mc_currency` varchar(3) DEFAULT NULL,
  `parent_txn_id` varchar(20) DEFAULT NULL,
  `txn_id` varchar(20) DEFAULT NULL,
  `txn_type` varchar(20) DEFAULT NULL,
  `first_name` varchar(30) DEFAULT NULL,
  `last_name` varchar(40) DEFAULT NULL,
  `address_street` varchar(60) DEFAULT NULL,
  `address_city` varchar(30) DEFAULT NULL,
  `address_state` varchar(30) DEFAULT NULL,
  `address_zip` varchar(20) DEFAULT NULL,
  `address_country` varchar(30) DEFAULT NULL,
  `address_status` varchar(10) DEFAULT NULL,
  `payer_email` varchar(60) DEFAULT NULL,
  `payer_status` varchar(10) DEFAULT NULL,
  `payment_type` varchar(10) DEFAULT NULL,
  `notify_version` varchar(10) DEFAULT NULL,
  `verify_sign` varchar(255) DEFAULT NULL,
  `referrer_id` varchar(20) DEFAULT NULL,
  `process_date` datetime DEFAULT NULL,
  `hold_until` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='All PayPal transactions that go through the IPN handler.';

-- --------------------------------------------------------

--
-- Table structure for table `cp_xferlog`
--

CREATE TABLE `cp_xferlog` (
  `id` int(10) UNSIGNED NOT NULL,
  `from_account_id` int(10) UNSIGNED NOT NULL,
  `target_account_id` int(10) UNSIGNED NOT NULL,
  `target_char_id` int(11) UNSIGNED NOT NULL,
  `amount` int(10) UNSIGNED NOT NULL,
  `for_free` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `transfer_date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Credit transfer log.';

-- --------------------------------------------------------

--
-- Table structure for table `elemental`
--

CREATE TABLE `elemental` (
  `ele_id` int(11) UNSIGNED NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `friends`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gepard_block`
--

CREATE TABLE `gepard_block` (
  `unique_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `unban_time` datetime NOT NULL,
  `reason` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gepard_block_log`
--

CREATE TABLE `gepard_block_log` (
  `id` int(11) UNSIGNED NOT NULL,
  `unique_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `block_time` datetime NOT NULL,
  `unban_time` datetime NOT NULL,
  `violator_name` varchar(24) NOT NULL,
  `violator_account_id` int(11) NOT NULL,
  `initiator_name` varchar(24) NOT NULL,
  `initiator_account_id` int(11) NOT NULL,
  `reason` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gepard_min_allowed_license_version`
--

CREATE TABLE `gepard_min_allowed_license_version` (
  `version` int(11) UNSIGNED NOT NULL DEFAULT '2018033001'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `global_acc_reg_num_db`
--

CREATE TABLE `global_acc_reg_num_db` (
  `account_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `global_acc_reg_str_db`
--

CREATE TABLE `global_acc_reg_str_db` (
  `account_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `key` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` varchar(254) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gm_reward`
--

CREATE TABLE `gm_reward` (
  `id` int(11) NOT NULL,
  `gm_aid` int(11) NOT NULL DEFAULT '0',
  `gm_name` varchar(30) NOT NULL DEFAULT '',
  `nameid` int(11) NOT NULL DEFAULT '0',
  `amount` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `refine` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `card1` smallint(4) UNSIGNED NOT NULL DEFAULT '0',
  `card2` smallint(4) UNSIGNED NOT NULL DEFAULT '0',
  `card3` smallint(4) UNSIGNED NOT NULL DEFAULT '0',
  `card4` smallint(4) UNSIGNED NOT NULL DEFAULT '0',
  `format_name` varchar(30) NOT NULL DEFAULT 'null',
  `reward_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `claim_aid` int(11) NOT NULL DEFAULT '0',
  `claim_name` varchar(30) NOT NULL DEFAULT '',
  `claim_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `note` varchar(255) NOT NULL DEFAULT 'none'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild`
--

CREATE TABLE `guild` (
  `guild_id` int(11) UNSIGNED NOT NULL,
  `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
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_alliance`
--

CREATE TABLE `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 ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_castle`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_expulsion`
--

CREATE TABLE `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 ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_member`
--

CREATE TABLE `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 ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_position`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_skill`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `guild_storage`
--

CREATE TABLE `guild_storage` (
  `id` int(10) UNSIGNED NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `homunculus`
--

CREATE TABLE `homunculus` (
  `homun_id` int(11) NOT NULL,
  `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',
  `autofeed` tinyint(2) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `hotkey`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `interlog`
--

CREATE TABLE `interlog` (
  `time` datetime DEFAULT NULL,
  `log` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `inventory`
--

CREATE TABLE `inventory` (
  `id` int(11) UNSIGNED NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ipbanlist`
--

CREATE TABLE `ipbanlist` (
  `list` varchar(255) NOT NULL DEFAULT '',
  `btime` datetime DEFAULT NULL,
  `rtime` datetime DEFAULT NULL,
  `reason` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `item_db`
--

CREATE TABLE `item_db` (
  `id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `name_english` varchar(50) NOT NULL DEFAULT '',
  `name_japanese` varchar(50) NOT NULL DEFAULT '',
  `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `subtype` tinyint(2) UNSIGNED DEFAULT NULL,
  `price_buy` mediumint(10) DEFAULT NULL,
  `price_sell` mediumint(10) DEFAULT NULL,
  `weight` smallint(5) UNSIGNED DEFAULT NULL,
  `atk` smallint(5) UNSIGNED DEFAULT NULL,
  `matk` smallint(5) UNSIGNED DEFAULT NULL,
  `defence` smallint(5) UNSIGNED DEFAULT NULL,
  `range` tinyint(2) UNSIGNED DEFAULT NULL,
  `slots` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL,
  `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL,
  `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL,
  `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,
  `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,
  `refineable` tinyint(1) UNSIGNED DEFAULT NULL,
  `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,
  `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,
  `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,
  `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,
  `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,
  `delay` mediumint(9) UNSIGNED DEFAULT NULL,
  `trade_flag` smallint(4) UNSIGNED DEFAULT NULL,
  `trade_group` smallint(3) UNSIGNED DEFAULT NULL,
  `nouse_flag` smallint(4) UNSIGNED DEFAULT NULL,
  `nouse_group` smallint(4) UNSIGNED DEFAULT NULL,
  `stack_amount` mediumint(6) UNSIGNED DEFAULT NULL,
  `stack_flag` tinyint(2) UNSIGNED DEFAULT NULL,
  `sprite` mediumint(6) UNSIGNED DEFAULT NULL,
  `script` text,
  `equip_script` text,
  `unequip_script` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `item_db2`
--

CREATE TABLE `item_db2` (
  `id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `name_english` varchar(50) NOT NULL DEFAULT '',
  `name_japanese` varchar(50) NOT NULL DEFAULT '',
  `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `subtype` tinyint(2) UNSIGNED DEFAULT NULL,
  `price_buy` mediumint(10) DEFAULT NULL,
  `price_sell` mediumint(10) DEFAULT NULL,
  `weight` smallint(5) UNSIGNED DEFAULT NULL,
  `atk` smallint(5) UNSIGNED DEFAULT NULL,
  `matk` smallint(5) UNSIGNED DEFAULT NULL,
  `defence` smallint(5) UNSIGNED DEFAULT NULL,
  `range` tinyint(2) UNSIGNED DEFAULT NULL,
  `slots` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL,
  `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL,
  `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL,
  `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,
  `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,
  `refineable` tinyint(1) UNSIGNED DEFAULT NULL,
  `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,
  `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,
  `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,
  `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,
  `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,
  `delay` mediumint(9) UNSIGNED DEFAULT NULL,
  `trade_flag` smallint(4) UNSIGNED DEFAULT NULL,
  `trade_group` smallint(3) UNSIGNED DEFAULT NULL,
  `nouse_flag` smallint(4) UNSIGNED DEFAULT NULL,
  `nouse_group` smallint(4) UNSIGNED DEFAULT NULL,
  `stack_amount` mediumint(6) UNSIGNED DEFAULT NULL,
  `stack_flag` tinyint(2) UNSIGNED DEFAULT NULL,
  `sprite` mediumint(6) UNSIGNED DEFAULT NULL,
  `script` text,
  `equip_script` text,
  `unequip_script` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `item_group`
--

CREATE TABLE `item_group` (
  `id` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `nameid` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `rate` smallint(5) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `item_reward`
--

CREATE TABLE `item_reward` (
  `id` int(11) NOT NULL,
  `nameid` int(11) NOT NULL DEFAULT '0',
  `qty` smallint(6) DEFAULT '1',
  `refine` smallint(2) DEFAULT '0',
  `card1` smallint(4) DEFAULT '0',
  `card2` smallint(4) DEFAULT '0',
  `card3` smallint(4) DEFAULT '0',
  `card4` smallint(4) DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `login`
--

CREATE TABLE `login` (
  `account_id` int(11) UNSIGNED NOT NULL,
  `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 DEFAULT NULL,
  `last_ip` varchar(100) NOT NULL DEFAULT '',
  `birthdate` date DEFAULT NULL,
  `character_slots` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `pincode` varchar(4) NOT NULL DEFAULT '',
  `pincode_change` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `last_unique_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `blocked_unique_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `country` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mail`
--

CREATE TABLE `mail` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) NOT NULL DEFAULT '0',
  `unique_id` bigint(20) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `maintenance`
--

CREATE TABLE `maintenance` (
  `id` int(11) NOT NULL,
  `account_id` int(11) DEFAULT NULL,
  `name` varchar(23) DEFAULT NULL,
  `reason` varchar(99) DEFAULT NULL,
  `minlv2connect` tinyint(4) DEFAULT NULL,
  `order_time` datetime DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mapreg`
--

CREATE TABLE `mapreg` (
  `varname` varchar(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `index` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `value` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `memo`
--

CREATE TABLE `memo` (
  `memo_id` int(11) UNSIGNED NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mercenary`
--

CREATE TABLE `mercenary` (
  `mer_id` int(11) UNSIGNED NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mercenary_owner`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `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` int(11) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `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` int(11) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mob_skill_db`
--

CREATE TABLE `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
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mob_skill_db2`
--

CREATE TABLE `mob_skill_db2` (
  `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 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `mob_spawns`
--

CREATE TABLE `mob_spawns` (
  `id` int(11) NOT NULL,
  `map` varchar(20) NOT NULL,
  `name` varchar(40) NOT NULL,
  `mob_id` smallint(5) NOT NULL,
  `count` smallint(4) NOT NULL,
  `time_to` int(11) NOT NULL,
  `time_from` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `npc_market_data`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `pad_main`
--

CREATE TABLE `pad_main` (
  `padding` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `party`
--

CREATE TABLE `party` (
  `party_id` int(11) UNSIGNED NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `pet`
--

CREATE TABLE `pet` (
  `pet_id` int(11) UNSIGNED NOT NULL,
  `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',
  `autofeed` tinyint(2) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quest`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ragsrvinfo`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rodex_items`
--

CREATE TABLE `rodex_items` (
  `id` int(11) NOT NULL,
  `mail_id` bigint(20) 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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) 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'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rodex_mail`
--

CREATE TABLE `rodex_mail` (
  `mail_id` bigint(20) NOT NULL,
  `sender_name` varchar(30) NOT NULL,
  `sender_id` int(11) NOT NULL,
  `receiver_name` varchar(30) NOT NULL,
  `receiver_id` int(11) NOT NULL,
  `receiver_accountid` int(11) NOT NULL,
  `title` varchar(50) NOT NULL,
  `body` varchar(510) NOT NULL,
  `zeny` bigint(20) NOT NULL,
  `type` tinyint(8) UNSIGNED NOT NULL,
  `is_read` tinyint(8) NOT NULL,
  `sender_read` tinyint(2) NOT NULL,
  `send_date` int(11) NOT NULL,
  `expire_date` int(11) NOT NULL,
  `weight` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sc_data`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `shops_sells`
--

CREATE TABLE `shops_sells` (
  `id_shop` int(11) NOT NULL,
  `item` int(11) NOT NULL,
  `price` int(11) NOT NULL,
  `name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `skill`
--

CREATE TABLE `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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `skill_homunculus`
--

CREATE TABLE `skill_homunculus` (
  `homun_id` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  `lv` smallint(6) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sql_updates`
--

CREATE TABLE `sql_updates` (
  `timestamp` int(11) UNSIGNED NOT NULL,
  `ignored` enum('Yes','No') NOT NULL DEFAULT 'No'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `storage`
--

CREATE TABLE `storage` (
  `id` int(11) UNSIGNED NOT NULL,
  `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` 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',
  `opt_idx0` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val0` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx1` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val1` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx2` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val2` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx3` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val3` smallint(5) NOT NULL DEFAULT '0',
  `opt_idx4` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `opt_val4` smallint(5) 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `trading`
--

CREATE TABLE `trading` (
  `id` smallint(5) UNSIGNED NOT NULL DEFAULT '0',
  `name_english` varchar(50) NOT NULL DEFAULT '',
  `name_japanese` varchar(50) NOT NULL DEFAULT '',
  `refineable` tinyint(1) UNSIGNED DEFAULT NULL,
  `slots` tinyint(2) UNSIGNED DEFAULT NULL,
  `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL,
  `elemental` tinyint(1) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `account_data`
--
ALTER TABLE `account_data`
  ADD PRIMARY KEY (`account_id`);

--
-- Indexes for table `acc_reg_num_db`
--
ALTER TABLE `acc_reg_num_db`
  ADD PRIMARY KEY (`account_id`,`key`,`index`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `acc_reg_str_db`
--
ALTER TABLE `acc_reg_str_db`
  ADD PRIMARY KEY (`account_id`,`key`,`index`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `attrib_db`
--
ALTER TABLE `attrib_db`
  ADD PRIMARY KEY (`ID`);

--
-- Indexes for table `auction`
--
ALTER TABLE `auction`
  ADD PRIMARY KEY (`auction_id`);

--
-- Indexes for table `autotrade_data`
--
ALTER TABLE `autotrade_data`
  ADD PRIMARY KEY (`char_id`,`itemkey`);

--
-- Indexes for table `autotrade_merchants`
--
ALTER TABLE `autotrade_merchants`
  ADD PRIMARY KEY (`account_id`,`char_id`);

--
-- Indexes for table `cart_inventory`
--
ALTER TABLE `cart_inventory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `changelog`
--
ALTER TABLE `changelog`
  ADD PRIMARY KEY (`post_id`);

--
-- Indexes for table `char`
--
ALTER TABLE `char`
  ADD PRIMARY KEY (`char_id`),
  ADD UNIQUE KEY `name_key` (`name`),
  ADD KEY `account_id` (`account_id`),
  ADD KEY `party_id` (`party_id`),
  ADD KEY `guild_id` (`guild_id`),
  ADD KEY `online` (`online`);

--
-- Indexes for table `char_achievements`
--
ALTER TABLE `char_achievements`
  ADD PRIMARY KEY (`char_id`,`ach_id`);

--
-- Indexes for table `char_reg_num_db`
--
ALTER TABLE `char_reg_num_db`
  ADD PRIMARY KEY (`char_id`,`key`,`index`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `char_reg_str_db`
--
ALTER TABLE `char_reg_str_db`
  ADD PRIMARY KEY (`char_id`,`key`,`index`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `cp_banlog`
--
ALTER TABLE `cp_banlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`,`banned_by`);

--
-- Indexes for table `cp_changelogcat`
--
ALTER TABLE `cp_changelogcat`
  ADD PRIMARY KEY (`cat_id`);

--
-- Indexes for table `cp_changelogs`
--
ALTER TABLE `cp_changelogs`
  ADD PRIMARY KEY (`cl_id`);

--
-- Indexes for table `cp_charprefs`
--
ALTER TABLE `cp_charprefs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`,`char_id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `cp_createlog`
--
ALTER TABLE `cp_createlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `name` (`userid`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_credits`
--
ALTER TABLE `cp_credits`
  ADD PRIMARY KEY (`account_id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_emailchange`
--
ALTER TABLE `cp_emailchange`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_highest_peak`
--
ALTER TABLE `cp_highest_peak`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cp_ipbanlog`
--
ALTER TABLE `cp_ipbanlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ip_address` (`ip_address`),
  ADD KEY `banned_by` (`banned_by`);

--
-- Indexes for table `cp_itemdesc`
--
ALTER TABLE `cp_itemdesc`
  ADD PRIMARY KEY (`itemid`);

--
-- Indexes for table `cp_itemshop`
--
ALTER TABLE `cp_itemshop`
  ADD PRIMARY KEY (`id`),
  ADD KEY `nameid` (`nameid`);

--
-- Indexes for table `cp_loginlog`
--
ALTER TABLE `cp_loginlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_loginprefs`
--
ALTER TABLE `cp_loginprefs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_pwchange`
--
ALTER TABLE `cp_pwchange`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_redeemlog`
--
ALTER TABLE `cp_redeemlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `nameid` (`nameid`,`account_id`,`char_id`);

--
-- Indexes for table `cp_resetpass`
--
ALTER TABLE `cp_resetpass`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_servicedesk`
--
ALTER TABLE `cp_servicedesk`
  ADD PRIMARY KEY (`ticket_id`);

--
-- Indexes for table `cp_servicedeska`
--
ALTER TABLE `cp_servicedeska`
  ADD PRIMARY KEY (`action_id`);

--
-- Indexes for table `cp_servicedeskcat`
--
ALTER TABLE `cp_servicedeskcat`
  ADD PRIMARY KEY (`cat_id`);

--
-- Indexes for table `cp_servicedesksettings`
--
ALTER TABLE `cp_servicedesksettings`
  ADD PRIMARY KEY (`account_id`);

--
-- Indexes for table `cp_trusted`
--
ALTER TABLE `cp_trusted`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `cp_txnlog`
--
ALTER TABLE `cp_txnlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`),
  ADD KEY `parent_txn_id` (`parent_txn_id`),
  ADD KEY `txn_id` (`txn_id`);

--
-- Indexes for table `cp_xferlog`
--
ALTER TABLE `cp_xferlog`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_account_id` (`from_account_id`,`target_account_id`,`target_char_id`);

--
-- Indexes for table `elemental`
--
ALTER TABLE `elemental`
  ADD PRIMARY KEY (`ele_id`);

--
-- Indexes for table `friends`
--
ALTER TABLE `friends`
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `gepard_block`
--
ALTER TABLE `gepard_block`
  ADD UNIQUE KEY `unique_id` (`unique_id`);

--
-- Indexes for table `gepard_block_log`
--
ALTER TABLE `gepard_block_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `global_acc_reg_num_db`
--
ALTER TABLE `global_acc_reg_num_db`
  ADD PRIMARY KEY (`account_id`,`key`,`index`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `global_acc_reg_str_db`
--
ALTER TABLE `global_acc_reg_str_db`
  ADD PRIMARY KEY (`account_id`,`key`,`index`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `gm_reward`
--
ALTER TABLE `gm_reward`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `guild`
--
ALTER TABLE `guild`
  ADD PRIMARY KEY (`guild_id`,`char_id`),
  ADD UNIQUE KEY `guild_id` (`guild_id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `guild_alliance`
--
ALTER TABLE `guild_alliance`
  ADD PRIMARY KEY (`guild_id`,`alliance_id`),
  ADD KEY `alliance_id` (`alliance_id`);

--
-- Indexes for table `guild_castle`
--
ALTER TABLE `guild_castle`
  ADD PRIMARY KEY (`castle_id`),
  ADD KEY `guild_id` (`guild_id`);

--
-- Indexes for table `guild_expulsion`
--
ALTER TABLE `guild_expulsion`
  ADD PRIMARY KEY (`guild_id`,`name`);

--
-- Indexes for table `guild_member`
--
ALTER TABLE `guild_member`
  ADD PRIMARY KEY (`guild_id`,`char_id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `guild_position`
--
ALTER TABLE `guild_position`
  ADD PRIMARY KEY (`guild_id`,`position`);

--
-- Indexes for table `guild_skill`
--
ALTER TABLE `guild_skill`
  ADD PRIMARY KEY (`guild_id`,`id`);

--
-- Indexes for table `guild_storage`
--
ALTER TABLE `guild_storage`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guild_id` (`guild_id`);

--
-- Indexes for table `homunculus`
--
ALTER TABLE `homunculus`
  ADD PRIMARY KEY (`homun_id`);

--
-- Indexes for table `hotkey`
--
ALTER TABLE `hotkey`
  ADD PRIMARY KEY (`char_id`,`hotkey`);

--
-- Indexes for table `inventory`
--
ALTER TABLE `inventory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `ipbanlist`
--
ALTER TABLE `ipbanlist`
  ADD KEY `list` (`list`);

--
-- Indexes for table `item_db`
--
ALTER TABLE `item_db`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `item_db2`
--
ALTER TABLE `item_db2`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `item_reward`
--
ALTER TABLE `item_reward`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `login`
--
ALTER TABLE `login`
  ADD PRIMARY KEY (`account_id`),
  ADD KEY `name` (`userid`);

--
-- Indexes for table `mail`
--
ALTER TABLE `mail`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `maintenance`
--
ALTER TABLE `maintenance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mapreg`
--
ALTER TABLE `mapreg`
  ADD PRIMARY KEY (`varname`,`index`);

--
-- Indexes for table `memo`
--
ALTER TABLE `memo`
  ADD PRIMARY KEY (`memo_id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `mercenary`
--
ALTER TABLE `mercenary`
  ADD PRIMARY KEY (`mer_id`);

--
-- Indexes for table `mercenary_owner`
--
ALTER TABLE `mercenary_owner`
  ADD PRIMARY KEY (`char_id`);

--
-- Indexes for table `mob_db`
--
ALTER TABLE `mob_db`
  ADD PRIMARY KEY (`ID`);

--
-- Indexes for table `mob_db2`
--
ALTER TABLE `mob_db2`
  ADD PRIMARY KEY (`ID`);

--
-- Indexes for table `mob_spawns`
--
ALTER TABLE `mob_spawns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `map` (`map`),
  ADD KEY `mob_id` (`mob_id`);

--
-- Indexes for table `npc_market_data`
--
ALTER TABLE `npc_market_data`
  ADD PRIMARY KEY (`name`,`itemid`);

--
-- Indexes for table `pad_main`
--
ALTER TABLE `pad_main`
  ADD PRIMARY KEY (`padding`);

--
-- Indexes for table `party`
--
ALTER TABLE `party`
  ADD PRIMARY KEY (`party_id`);

--
-- Indexes for table `pet`
--
ALTER TABLE `pet`
  ADD PRIMARY KEY (`pet_id`);

--
-- Indexes for table `quest`
--
ALTER TABLE `quest`
  ADD PRIMARY KEY (`char_id`,`quest_id`);

--
-- Indexes for table `rodex_items`
--
ALTER TABLE `rodex_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `mail_id` (`mail_id`);

--
-- Indexes for table `rodex_mail`
--
ALTER TABLE `rodex_mail`
  ADD PRIMARY KEY (`mail_id`),
  ADD KEY `sender_id` (`sender_id`),
  ADD KEY `receiver_id` (`receiver_id`),
  ADD KEY `receiver_accountid` (`receiver_accountid`),
  ADD KEY `send_date` (`send_date`),
  ADD KEY `expire_date` (`expire_date`);

--
-- Indexes for table `sc_data`
--
ALTER TABLE `sc_data`
  ADD PRIMARY KEY (`account_id`,`char_id`,`type`),
  ADD KEY `account_id` (`account_id`),
  ADD KEY `char_id` (`char_id`);

--
-- Indexes for table `shops_sells`
--
ALTER TABLE `shops_sells`
  ADD KEY `id_shop` (`id_shop`);

--
-- Indexes for table `skill`
--
ALTER TABLE `skill`
  ADD PRIMARY KEY (`char_id`,`id`);

--
-- Indexes for table `skill_homunculus`
--
ALTER TABLE `skill_homunculus`
  ADD PRIMARY KEY (`homun_id`,`id`);

--
-- Indexes for table `sql_updates`
--
ALTER TABLE `sql_updates`
  ADD PRIMARY KEY (`timestamp`);

--
-- Indexes for table `storage`
--
ALTER TABLE `storage`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `auction`
--
ALTER TABLE `auction`
  MODIFY `auction_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cart_inventory`
--
ALTER TABLE `cart_inventory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=458;

--
-- AUTO_INCREMENT for table `changelog`
--
ALTER TABLE `changelog`
  MODIFY `post_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `char`
--
ALTER TABLE `char`
  MODIFY `char_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=150346;

--
-- AUTO_INCREMENT for table `cp_banlog`
--
ALTER TABLE `cp_banlog`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=425;

--
-- AUTO_INCREMENT for table `cp_charprefs`
--
ALTER TABLE `cp_charprefs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `cp_createlog`
--
ALTER TABLE `cp_createlog`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=297;

--
-- AUTO_INCREMENT for table `cp_emailchange`
--
ALTER TABLE `cp_emailchange`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_highest_peak`
--
ALTER TABLE `cp_highest_peak`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `cp_ipbanlog`
--
ALTER TABLE `cp_ipbanlog`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_itemdesc`
--
ALTER TABLE `cp_itemdesc`
  MODIFY `itemid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31060;

--
-- AUTO_INCREMENT for table `cp_itemshop`
--
ALTER TABLE `cp_itemshop`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_loginlog`
--
ALTER TABLE `cp_loginlog`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=255;

--
-- AUTO_INCREMENT for table `cp_loginprefs`
--
ALTER TABLE `cp_loginprefs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_pwchange`
--
ALTER TABLE `cp_pwchange`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `cp_redeemlog`
--
ALTER TABLE `cp_redeemlog`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_resetpass`
--
ALTER TABLE `cp_resetpass`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `cp_trusted`
--
ALTER TABLE `cp_trusted`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cp_txnlog`
--
ALTER TABLE `cp_txnlog`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `cp_xferlog`
--
ALTER TABLE `cp_xferlog`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `elemental`
--
ALTER TABLE `elemental`
  MODIFY `ele_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gepard_block_log`
--
ALTER TABLE `gepard_block_log`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gm_reward`
--
ALTER TABLE `gm_reward`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66;

--
-- AUTO_INCREMENT for table `guild`
--
ALTER TABLE `guild`
  MODIFY `guild_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `guild_storage`
--
ALTER TABLE `guild_storage`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `homunculus`
--
ALTER TABLE `homunculus`
  MODIFY `homun_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `inventory`
--
ALTER TABLE `inventory`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37498;

--
-- AUTO_INCREMENT for table `item_reward`
--
ALTER TABLE `item_reward`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `login`
--
ALTER TABLE `login`
  MODIFY `account_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2000300;

--
-- AUTO_INCREMENT for table `mail`
--
ALTER TABLE `mail`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `maintenance`
--
ALTER TABLE `maintenance`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `memo`
--
ALTER TABLE `memo`
  MODIFY `memo_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `mercenary`
--
ALTER TABLE `mercenary`
  MODIFY `mer_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mob_spawns`
--
ALTER TABLE `mob_spawns`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2419;

--
-- AUTO_INCREMENT for table `party`
--
ALTER TABLE `party`
  MODIFY `party_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64;

--
-- AUTO_INCREMENT for table `pet`
--
ALTER TABLE `pet`
  MODIFY `pet_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `rodex_items`
--
ALTER TABLE `rodex_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=109;

--
-- AUTO_INCREMENT for table `rodex_mail`
--
ALTER TABLE `rodex_mail`
  MODIFY `mail_id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=112;

--
-- AUTO_INCREMENT for table `storage`
--
ALTER TABLE `storage`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7480;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
