--
-- Структура таблицы `bashni`
--

CREATE TABLE IF NOT EXISTS `bashni` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `sila` int(11) NOT NULL,
  `health` int(11) NOT NULL,
  `max_health` int(11) NOT NULL,
  `lovk` int(11) NOT NULL,
  `zashit` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `boss`
--

CREATE TABLE IF NOT EXISTS `boss` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lvl` int(11) NOT NULL,
  `sila` int(11) NOT NULL,
  `health` int(11) NOT NULL,
  `lovk` int(11) NOT NULL,
  `zashit` int(11) NOT NULL,
  `gold` int(11) NOT NULL,
  `exp` int(11) NOT NULL,
  `image` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `chat`
--

CREATE TABLE IF NOT EXISTS `chat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `msg` varchar(1024) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `forum_comm`
--

CREATE TABLE IF NOT EXISTS `forum_comm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msg` varchar(10024) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_topic` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `forum_razdel`
--

CREATE TABLE IF NOT EXISTS `forum_razdel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(10024) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `forum_topic`
--

CREATE TABLE IF NOT EXISTS `forum_topic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(10024) DEFAULT NULL,
  `msg` varchar(10024) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_razdel` int(11) NOT NULL,
  `close` int(11) NOT NULL DEFAULT '0',
  `verh` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `gold_zapros`
--

CREATE TABLE IF NOT EXISTS `gold_zapros` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `sum` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `mail`
--

CREATE TABLE IF NOT EXISTS `mail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `id_kont` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `msg` varchar(1024) NOT NULL,
  `read` set('0','1') NOT NULL DEFAULT '0',
  `unlink` int(11) DEFAULT '0',
  `show_vk` int(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `id_user` (`id_user`,`id_kont`),
  KEY `read` (`read`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `news`
--

CREATE TABLE IF NOT EXISTS `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msg` varchar(10024) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `title` varchar(32) DEFAULT NULL,
  `main_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `time` (`time`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `news_kom`
--

CREATE TABLE IF NOT EXISTS `news_kom` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `msg` varchar(1024) NOT NULL,
  `time` int(11) NOT NULL,
  `id_news` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `timereg` int(11) DEFAULT NULL,
  `nick` varchar(20) DEFAULT NULL,
  `pol` int(11) DEFAULT NULL,
  `pass` varchar(100) DEFAULT NULL,
  `online` varchar(10) DEFAULT NULL,
  `level` varchar(10) DEFAULT '1',
  `exp` varchar(10) DEFAULT '0',
  `health` varchar(10) DEFAULT NULL,
  `max_health` varchar(10) DEFAULT NULL,
  `mana` varchar(10) DEFAULT NULL,
  `max_mana` varchar(10) DEFAULT NULL,
  `gold` varchar(10) DEFAULT '0',
  `silver` varchar(10) DEFAULT '0',
  `sila` int(11) NOT NULL DEFAULT '0',
  `lovk` int(11) NOT NULL DEFAULT '0',
  `zashit` int(11) NOT NULL DEFAULT '0',
  `param` int(11) NOT NULL DEFAULT '0',
  `avatar` int(11) NOT NULL DEFAULT '0',
  `prava` int(11) NOT NULL DEFAULT '0',
  `set_p_str` int(11) NOT NULL DEFAULT '10',
  `duel_rating` int(11) NOT NULL DEFAULT '0',
  `podarok` int(11) NOT NULL DEFAULT '0',
  `boss_pobed` int(11) NOT NULL DEFAULT '0',
  `baza_gold` int(11) NOT NULL DEFAULT '1',
  `baza_silver` int(11) NOT NULL DEFAULT '1',
  `baza_mana` int(11) NOT NULL DEFAULT '1',
  `baza_health` int(11) NOT NULL DEFAULT '1',
  `news_read` int(11) NOT NULL DEFAULT '0',
  `ban` int(11) NOT NULL DEFAULT '0',
  `boss_mission` int(11) NOT NULL DEFAULT '0',
  `duel_mission` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `nick` (`nick`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Структура таблицы `users_konts`
--

CREATE TABLE IF NOT EXISTS `users_konts` (
  `id_user` int(11) NOT NULL,
  `id_kont` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `new_msg` int(11) NOT NULL DEFAULT '0',
  `name` varchar(64) DEFAULT NULL,
  UNIQUE KEY `id_user` (`id_user`,`id_kont`),
  KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;