-- phpMyAdmin SQL Dump
-- version 3.4.7
-- [url=http://www.phpmyadmin.net]phpMyAdmin[/url]
--
-- Host: localhost
-- Czas wygenerowania: 24 Gru 2011, 09:07
-- Wersja serwera: 5.5.17
-- Wersja PHP: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Baza danych: `theforgottenserver`
--
-- --------------------------------------------------------
--
-- Struktura tabeli dla `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL,
`premdays` int(11) NOT NULL DEFAULT '0',
`lastday` int(10) unsigned NOT NULL DEFAULT '0',
`email` varchar(255) NOT NULL DEFAULT '[email protected]',
`key` varchar(20) NOT NULL DEFAULT '0',
`blocked` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'internal usage',
`warnings` int(11) NOT NULL DEFAULT '0',
`group_id` int(11) NOT NULL DEFAULT '1',
`page_lastday` int(11) NOT NULL DEFAULT '0',
`email_new` varchar(255) NOT NULL DEFAULT 'test',
`email_new_time` int(15) DEFAULT NULL,
`created` int(11) NOT NULL DEFAULT '0',
`rlname` varchar(255) NOT NULL DEFAULT '',
`location` varchar(255) NOT NULL DEFAULT '',
`page_access` int(11) NOT NULL DEFAULT '0',
`email_code` varchar(255) NOT NULL DEFAULT '0',
`next_email` int(11) NOT NULL DEFAULT '0',
`premium_points` int(11) NOT NULL DEFAULT '0',
`vote` int(11) DEFAULT NULL,
`last_post` int(11) DEFAULT NULL,
`flag` varchar(255) DEFAULT NULL,
`vip_time` bigint(20) DEFAULT NULL,
`referral` int(10) DEFAULT NULL,
`referral2` int(10) DEFAULT NULL,
`vip_time2` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8814087 ;
--
-- Wyzwalacze `accounts`
--
DROP TRIGGER IF EXISTS `ondelete_accounts`;
DELIMITER //
CREATE TRIGGER `ondelete_accounts` BEFORE DELETE ON `accounts`
FOR EACH ROW BEGIN
DELETE FROM `bans` WHERE `type` IN (3, 4) AND `value` = OLD.`id`;
END
//
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `account_viplist`
--
CREATE TABLE IF NOT EXISTS `account_viplist` (
`account_id` int(11) NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`player_id` int(11) NOT NULL,
UNIQUE KEY `account_id_2` (`account_id`,`player_id`),
KEY `account_id` (`account_id`),
KEY `player_id` (`player_id`),
KEY `world_id` (`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `bans`
--
CREATE TABLE IF NOT EXISTS `bans` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion',
`value` int(10) unsigned NOT NULL COMMENT 'ip address (integer), player guid or account number',
`param` int(10) unsigned NOT NULL DEFAULT '4294967295' COMMENT 'used only for ip banishment mask (integer)',
`active` tinyint(1) NOT NULL DEFAULT '1',
`expires` int(11) NOT NULL,
`added` int(10) unsigned NOT NULL,
`admin_id` int(10) unsigned NOT NULL DEFAULT '0',
`comment` text NOT NULL,
`reason` int(10) unsigned NOT NULL DEFAULT '0',
`action` int(10) unsigned NOT NULL DEFAULT '0',
`statement` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `type` (`type`,`value`),
KEY `active` (`active`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `environment_killers`
--
CREATE TABLE IF NOT EXISTS `environment_killers` (
`kill_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
KEY `kill_id` (`kill_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `global_storage`
--
CREATE TABLE IF NOT EXISTS `global_storage` (
`key` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '0',
UNIQUE KEY `key` (`key`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `guilds`
--
CREATE TABLE IF NOT EXISTS `guilds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`ownerid` int(11) NOT NULL,
`creationdata` int(11) NOT NULL,
`motd` varchar(255) NOT NULL,
`logo_gfx_name` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Wyzwalacze `guilds`
--
DROP TRIGGER IF EXISTS `oncreate_guilds`;
DELIMITER //
CREATE TRIGGER `oncreate_guilds` AFTER INSERT ON `guilds`
FOR EACH ROW BEGIN
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Leader', 3, NEW.`id`);
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Vice-Leader', 2, NEW.`id`);
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Member', 1, NEW.`id`);
END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ondelete_guilds`;
DELIMITER //
CREATE TRIGGER `ondelete_guilds` BEFORE DELETE ON `guilds`
FOR EACH ROW BEGIN
UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`);
END
//
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `guild_invites`
--
CREATE TABLE IF NOT EXISTS `guild_invites` (
`player_id` int(11) NOT NULL DEFAULT '0',
`guild_id` int(11) NOT NULL DEFAULT '0',
UNIQUE KEY `player_id` (`player_id`,`guild_id`),
KEY `guild_id` (`guild_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `guild_ranks`
--
CREATE TABLE IF NOT EXISTS `guild_ranks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`level` int(11) NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
PRIMARY KEY (`id`),
KEY `guild_id` (`guild_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `houses`
--
CREATE TABLE IF NOT EXISTS `houses` (
`id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`owner` int(11) NOT NULL,
`paid` int(10) unsigned NOT NULL DEFAULT '0',
`warnings` int(11) NOT NULL DEFAULT '0',
`lastwarning` int(10) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`town` int(10) unsigned NOT NULL DEFAULT '0',
`size` int(10) unsigned NOT NULL DEFAULT '0',
`price` int(10) unsigned NOT NULL DEFAULT '0',
`rent` int(10) unsigned NOT NULL DEFAULT '0',
`doors` int(10) unsigned NOT NULL DEFAULT '0',
`beds` int(10) unsigned NOT NULL DEFAULT '0',
`tiles` int(10) unsigned NOT NULL DEFAULT '0',
`guild` tinyint(1) unsigned NOT NULL DEFAULT '0',
`clear` tinyint(1) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `id` (`id`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `house_auctions`
--
CREATE TABLE IF NOT EXISTS `house_auctions` (
`house_id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`player_id` int(11) NOT NULL,
`bid` int(10) unsigned NOT NULL DEFAULT '0',
`limit` int(10) unsigned NOT NULL DEFAULT '0',
`endtime` bigint(20) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `house_id` (`house_id`,`world_id`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `house_data`
--
CREATE TABLE IF NOT EXISTS `house_data` (
`house_id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`data` longblob NOT NULL,
UNIQUE KEY `house_id` (`house_id`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `house_lists`
--
CREATE TABLE IF NOT EXISTS `house_lists` (
`house_id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`listid` int(11) NOT NULL,
`list` text NOT NULL,
UNIQUE KEY `house_id` (`house_id`,`world_id`,`listid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `killers`
--
CREATE TABLE IF NOT EXISTS `killers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`death_id` int(11) NOT NULL,
`final_hit` tinyint(1) unsigned NOT NULL DEFAULT '0',
`unjustified` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `death_id` (`death_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `players`
--
CREATE TABLE IF NOT EXISTS `players` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`group_id` int(11) NOT NULL DEFAULT '1',
`account_id` int(11) NOT NULL DEFAULT '0',
`level` int(11) NOT NULL DEFAULT '1',
`vocation` int(11) NOT NULL DEFAULT '0',
`health` int(11) NOT NULL DEFAULT '150',
`healthmax` int(11) NOT NULL DEFAULT '150',
`experience` bigint(20) NOT NULL DEFAULT '0',
`lookbody` int(11) NOT NULL DEFAULT '0',
`lookfeet` int(11) NOT NULL DEFAULT '0',
`lookhead` int(11) NOT NULL DEFAULT '0',
`looklegs` int(11) NOT NULL DEFAULT '0',
`looktype` int(11) NOT NULL DEFAULT '136',
`lookaddons` int(11) NOT NULL DEFAULT '0',
`maglevel` int(11) NOT NULL DEFAULT '0',
`mana` int(11) NOT NULL DEFAULT '0',
`manamax` int(11) NOT NULL DEFAULT '0',
`manaspent` int(11) NOT NULL DEFAULT '0',
`soul` int(10) unsigned NOT NULL DEFAULT '0',
`town_id` int(11) NOT NULL DEFAULT '0',
`posx` int(11) NOT NULL DEFAULT '0',
`posy` int(11) NOT NULL DEFAULT '0',
`posz` int(11) NOT NULL DEFAULT '0',
`conditions` blob NOT NULL,
`cap` int(11) NOT NULL DEFAULT '0',
`sex` int(11) NOT NULL DEFAULT '0',
`lastlogin` bigint(20) unsigned NOT NULL DEFAULT '0',
`lastip` int(10) unsigned NOT NULL DEFAULT '0',
`save` tinyint(1) NOT NULL DEFAULT '1',
`skull` tinyint(1) unsigned NOT NULL DEFAULT '0',
`skulltime` int(11) NOT NULL DEFAULT '0',
`rank_id` int(11) NOT NULL DEFAULT '0',
`guildnick` varchar(255) NOT NULL DEFAULT '',
`lastlogout` bigint(20) unsigned NOT NULL DEFAULT '0',
`blessings` tinyint(2) NOT NULL DEFAULT '0',
`balance` bigint(20) NOT NULL DEFAULT '0',
`stamina` bigint(20) NOT NULL DEFAULT '151200000' COMMENT 'stored in miliseconds',
`direction` int(11) NOT NULL DEFAULT '2',
`loss_experience` int(11) NOT NULL DEFAULT '100',
`loss_mana` int(11) NOT NULL DEFAULT '100',
`loss_skills` int(11) NOT NULL DEFAULT '100',
`loss_containers` int(11) NOT NULL DEFAULT '100',
`loss_items` int(11) NOT NULL DEFAULT '100',
`premend` int(11) NOT NULL DEFAULT '0' COMMENT 'NOT IN USE BY THE SERVER',
`online` tinyint(1) NOT NULL DEFAULT '0',
`marriage` int(10) unsigned NOT NULL DEFAULT '0',
`promotion` int(11) NOT NULL DEFAULT '0',
`deleted` tinyint(1) NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL DEFAULT '',
`created` int(11) NOT NULL DEFAULT '0',
`nick_verify` int(11) NOT NULL DEFAULT '0',
`old_name` varchar(255) NOT NULL DEFAULT '',
`hide_char` int(11) NOT NULL DEFAULT '0',
`worldtransfer` int(11) NOT NULL DEFAULT '0',
`comment` text,
`show_outfit` tinyint(4) NOT NULL DEFAULT '1',
`show_eq` tinyint(4) NOT NULL DEFAULT '1',
`show_bars` tinyint(4) NOT NULL DEFAULT '1',
`show_skills` tinyint(4) NOT NULL DEFAULT '1',
`show_quests` tinyint(4) NOT NULL DEFAULT '1',
`guildjoin` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`deleted`),
KEY `account_id` (`account_id`),
KEY `group_id` (`group_id`),
KEY `online` (`online`),
KEY `deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
--
-- Wyzwalacze `players`
--
DROP TRIGGER IF EXISTS `oncreate_players`;
DELIMITER //
CREATE TRIGGER `oncreate_players` AFTER INSERT ON `players`
FOR EACH ROW BEGIN
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END
//
DELIMITER ;
DROP TRIGGER IF EXISTS `ondelete_players`;
DELIMITER //
CREATE TRIGGER `ondelete_players` BEFORE DELETE ON `players`
FOR EACH ROW BEGIN
DELETE FROM `bans` WHERE `type` IN (2, 5) AND `value` = OLD.`id`;
UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END
//
DELIMITER ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_deaths`
--
CREATE TABLE IF NOT EXISTS `player_deaths` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_id` int(11) NOT NULL,
`date` bigint(20) unsigned NOT NULL,
`level` int(10) unsigned NOT NULL,
`time` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `date` (`date`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_depotitems`
--
CREATE TABLE IF NOT EXISTS `player_depotitems` (
`player_id` int(11) NOT NULL,
`sid` int(11) NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
`pid` int(11) NOT NULL DEFAULT '0',
`itemtype` int(11) NOT NULL,
`count` int(11) NOT NULL DEFAULT '0',
`attributes` blob NOT NULL,
UNIQUE KEY `player_id_2` (`player_id`,`sid`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_items`
--
CREATE TABLE IF NOT EXISTS `player_items` (
`player_id` int(11) NOT NULL DEFAULT '0',
`pid` int(11) NOT NULL DEFAULT '0',
`sid` int(11) NOT NULL DEFAULT '0',
`itemtype` int(11) NOT NULL DEFAULT '0',
`count` int(11) NOT NULL DEFAULT '0',
`attributes` blob NOT NULL,
UNIQUE KEY `player_id_2` (`player_id`,`sid`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_killers`
--
CREATE TABLE IF NOT EXISTS `player_killers` (
`kill_id` int(11) NOT NULL,
`player_id` int(11) NOT NULL,
KEY `kill_id` (`kill_id`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_namelocks`
--
CREATE TABLE IF NOT EXISTS `player_namelocks` (
`player_id` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`new_name` varchar(255) NOT NULL,
`date` bigint(20) NOT NULL DEFAULT '0',
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_skills`
--
CREATE TABLE IF NOT EXISTS `player_skills` (
`player_id` int(11) NOT NULL DEFAULT '0',
`skillid` tinyint(2) NOT NULL DEFAULT '0',
`value` int(10) unsigned NOT NULL DEFAULT '0',
`count` int(10) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `player_id_2` (`player_id`,`skillid`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_spells`
--
CREATE TABLE IF NOT EXISTS `player_spells` (
`player_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
UNIQUE KEY `player_id_2` (`player_id`,`name`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_storage`
--
CREATE TABLE IF NOT EXISTS `player_storage` (
`player_id` int(11) NOT NULL DEFAULT '0',
`key` int(10) unsigned NOT NULL DEFAULT '0',
`value` varchar(255) NOT NULL DEFAULT '0',
UNIQUE KEY `player_id_2` (`player_id`,`key`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `player_viplist`
--
CREATE TABLE IF NOT EXISTS `player_viplist` (
`player_id` int(11) NOT NULL,
`vip_id` int(11) NOT NULL,
UNIQUE KEY `player_id_2` (`player_id`,`vip_id`),
KEY `player_id` (`player_id`),
KEY `vip_id` (`vip_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `server_config`
--
CREATE TABLE IF NOT EXISTS `server_config` (
`config` varchar(35) NOT NULL DEFAULT '',
`value` int(11) NOT NULL,
UNIQUE KEY `config` (`config`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `server_motd`
--
CREATE TABLE IF NOT EXISTS `server_motd` (
`id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`text` text NOT NULL,
UNIQUE KEY `id` (`id`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `server_record`
--
CREATE TABLE IF NOT EXISTS `server_record` (
`record` int(11) NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`timestamp` bigint(20) NOT NULL,
UNIQUE KEY `record` (`record`,`world_id`,`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `server_reports`
--
CREATE TABLE IF NOT EXISTS `server_reports` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`player_id` int(11) NOT NULL DEFAULT '1',
`posx` int(11) NOT NULL DEFAULT '0',
`posy` int(11) NOT NULL DEFAULT '0',
`posz` int(11) NOT NULL DEFAULT '0',
`timestamp` bigint(20) NOT NULL DEFAULT '0',
`report` text NOT NULL,
`reads` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `world_id` (`world_id`),
KEY `reads` (`reads`),
KEY `player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `tiles`
--
CREATE TABLE IF NOT EXISTS `tiles` (
`id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`house_id` int(10) unsigned NOT NULL,
`x` int(5) unsigned NOT NULL,
`y` int(5) unsigned NOT NULL,
`z` tinyint(2) unsigned NOT NULL,
UNIQUE KEY `id` (`id`,`world_id`),
KEY `x` (`x`,`y`,`z`),
KEY `house_id` (`house_id`,`world_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `tile_items`
--
CREATE TABLE IF NOT EXISTS `tile_items` (
`tile_id` int(10) unsigned NOT NULL,
`world_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
`sid` int(11) NOT NULL,
`pid` int(11) NOT NULL DEFAULT '0',
`itemtype` int(11) NOT NULL,
`count` int(11) NOT NULL DEFAULT '0',
`attributes` blob NOT NULL,
UNIQUE KEY `tile_id` (`tile_id`,`world_id`,`sid`),
KEY `sid` (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `zaypay_payment`
--
CREATE TABLE IF NOT EXISTS `zaypay_payment` (
`payID` bigint(30) NOT NULL,
`account_id` int(20) NOT NULL,
`status` varchar(255) NOT NULL,
PRIMARY KEY (`payID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_bug_tracker`
--
CREATE TABLE IF NOT EXISTS `z_bug_tracker` (
`account` varchar(255) NOT NULL,
`type` int(11) NOT NULL,
`status` int(11) NOT NULL,
`text` text NOT NULL,
`id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL,
`priority` int(11) NOT NULL,
`reply` int(11) NOT NULL,
`who` int(11) NOT NULL,
`uid` int(11) NOT NULL AUTO_INCREMENT,
`tag` int(11) NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_changelog`
--
CREATE TABLE IF NOT EXISTS `z_changelog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) NOT NULL DEFAULT '',
`where` varchar(255) NOT NULL DEFAULT '',
`date` int(11) NOT NULL DEFAULT '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_forum`
--
CREATE TABLE IF NOT EXISTS `z_forum` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sticky` tinyint(1) NOT NULL DEFAULT '0',
`closed` tinyint(1) NOT NULL DEFAULT '0',
`first_post` int(11) NOT NULL DEFAULT '0',
`last_post` int(11) NOT NULL DEFAULT '0',
`section` int(3) NOT NULL DEFAULT '0',
`icon_id` int(3) NOT NULL DEFAULT '1',
`replies` int(20) NOT NULL DEFAULT '0',
`views` int(20) NOT NULL DEFAULT '0',
`author_aid` int(20) NOT NULL DEFAULT '0',
`author_guid` int(20) NOT NULL DEFAULT '0',
`post_text` text NOT NULL,
`post_topic` varchar(255) NOT NULL,
`post_smile` tinyint(1) NOT NULL DEFAULT '0',
`post_date` int(20) NOT NULL DEFAULT '0',
`last_edit_aid` int(20) NOT NULL DEFAULT '0',
`edit_date` int(20) NOT NULL DEFAULT '0',
`post_ip` varchar(32) NOT NULL DEFAULT '0.0.0.0',
PRIMARY KEY (`id`),
KEY `section` (`section`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_monsters`
--
CREATE TABLE IF NOT EXISTS `z_monsters` (
`hide_creature` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`mana` int(11) NOT NULL,
`exp` int(11) NOT NULL,
`health` int(11) NOT NULL,
`speed_lvl` int(11) NOT NULL DEFAULT '1',
`use_haste` tinyint(1) NOT NULL,
`voices` text NOT NULL,
`immunities` varchar(255) NOT NULL,
`summonable` tinyint(1) NOT NULL,
`convinceable` tinyint(1) NOT NULL,
`race` varchar(255) NOT NULL,
`gfx_name` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_news_tickers`
--
CREATE TABLE IF NOT EXISTS `z_news_tickers` (
`date` int(11) NOT NULL DEFAULT '1',
`author` int(11) NOT NULL,
`image_id` int(3) NOT NULL DEFAULT '0',
`text` text NOT NULL,
`hide_ticker` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_ots_comunication`
--
CREATE TABLE IF NOT EXISTS `z_ots_comunication` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_polls`
--
CREATE TABLE IF NOT EXISTS `z_polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` varchar(255) NOT NULL,
`end` int(11) NOT NULL,
`start` int(11) NOT NULL,
`answers` int(11) NOT NULL,
`votes_all` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_polls_answers`
--
CREATE TABLE IF NOT EXISTS `z_polls_answers` (
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`answer` varchar(255) NOT NULL,
`votes` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_shop_history_item`
--
CREATE TABLE IF NOT EXISTS `z_shop_history_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`to_name` varchar(255) NOT NULL DEFAULT '0',
`to_account` int(11) NOT NULL DEFAULT '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL DEFAULT '0',
`price` int(11) NOT NULL DEFAULT '0',
`offer_id` int(11) NOT NULL DEFAULT '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL DEFAULT '0',
`trans_real` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_shop_history_pacc`
--
CREATE TABLE IF NOT EXISTS `z_shop_history_pacc` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`to_name` varchar(255) NOT NULL DEFAULT '0',
`to_account` int(11) NOT NULL DEFAULT '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL DEFAULT '0',
`price` int(11) NOT NULL DEFAULT '0',
`pacc_days` int(11) NOT NULL DEFAULT '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL DEFAULT '0',
`trans_real` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_shop_offer`
--
CREATE TABLE IF NOT EXISTS `z_shop_offer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`points` int(11) NOT NULL DEFAULT '0',
`itemid1` int(11) NOT NULL DEFAULT '0',
`count1` int(11) NOT NULL DEFAULT '0',
`itemid2` int(11) NOT NULL DEFAULT '0',
`count2` int(11) NOT NULL DEFAULT '0',
`offer_type` varchar(255) DEFAULT NULL,
`offer_description` text NOT NULL,
`offer_name` varchar(255) NOT NULL,
`pid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Struktura tabeli dla `z_spells`
--
CREATE TABLE IF NOT EXISTS `z_spells` (
`name` varchar(255) NOT NULL,
`spell` varchar(255) NOT NULL,
`spell_type` varchar(255) NOT NULL,
`mana` int(11) NOT NULL DEFAULT '0',
`lvl` int(11) NOT NULL DEFAULT '0',
`mlvl` int(11) NOT NULL DEFAULT '0',
`soul` int(11) NOT NULL DEFAULT '0',
`pacc` varchar(255) NOT NULL,
`vocations` varchar(255) NOT NULL,
`conj_count` int(11) NOT NULL DEFAULT '0',
`hide_spell` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Ograniczenia dla zrzutów tabel
--
--
-- Ograniczenia dla tabeli `account_viplist`
--
ALTER TABLE `account_viplist`
ADD CONSTRAINT `account_viplist_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `account_viplist_ibfk_2` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `environment_killers`
--
ALTER TABLE `environment_killers`
ADD CONSTRAINT `environment_killers_ibfk_1` FOREIGN KEY (`kill_id`) REFERENCES `killers` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `guild_invites`
--
ALTER TABLE `guild_invites`
ADD CONSTRAINT `guild_invites_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `guild_invites_ibfk_2` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `guild_ranks`
--
ALTER TABLE `guild_ranks`
ADD CONSTRAINT `guild_ranks_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `house_auctions`
--
ALTER TABLE `house_auctions`
ADD CONSTRAINT `house_auctions_ibfk_1` FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE,
ADD CONSTRAINT `house_auctions_ibfk_2` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `house_data`
--
ALTER TABLE `house_data`
ADD CONSTRAINT `house_data_ibfk_1` FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `house_lists`
--
ALTER TABLE `house_lists`
ADD CONSTRAINT `house_lists_ibfk_1` FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `killers`
--
ALTER TABLE `killers`
ADD CONSTRAINT `killers_ibfk_1` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `players`
--
ALTER TABLE `players`
ADD CONSTRAINT `players_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_deaths`
--
ALTER TABLE `player_deaths`
ADD CONSTRAINT `player_deaths_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_depotitems`
--
ALTER TABLE `player_depotitems`
ADD CONSTRAINT `player_depotitems_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_items`
--
ALTER TABLE `player_items`
ADD CONSTRAINT `player_items_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_killers`
--
ALTER TABLE `player_killers`
ADD CONSTRAINT `player_killers_ibfk_1` FOREIGN KEY (`kill_id`) REFERENCES `killers` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `player_killers_ibfk_2` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_namelocks`
--
ALTER TABLE `player_namelocks`
ADD CONSTRAINT `player_namelocks_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_skills`
--
ALTER TABLE `player_skills`
ADD CONSTRAINT `player_skills_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_spells`
--
ALTER TABLE `player_spells`
ADD CONSTRAINT `player_spells_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_storage`
--
ALTER TABLE `player_storage`
ADD CONSTRAINT `player_storage_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `player_viplist`
--
ALTER TABLE `player_viplist`
ADD CONSTRAINT `player_viplist_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `player_viplist_ibfk_2` FOREIGN KEY (`vip_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `server_reports`
--
ALTER TABLE `server_reports`
ADD CONSTRAINT `server_reports_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `tiles`
--
ALTER TABLE `tiles`
ADD CONSTRAINT `tiles_ibfk_1` FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE;
--
-- Ograniczenia dla tabeli `tile_items`
--
ALTER TABLE `tile_items`
ADD CONSTRAINT `tile_items_ibfk_1` FOREIGN KEY (`tile_id`) REFERENCES `tiles` (`id`) ON DELETE CASCADE;
/*!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 */;