
-- SQL Database Install {install.sql} --

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

CREATE TABLE IF NOT EXISTS `galaxy_ads` (
  `id` INT(11) NOT NULL auto_increment,
  `time` INT(11) NOT NULL DEFAULT '0',
  `expires` INT(11) NOT NULL DEFAULT '0',
  `status` INT(6) NOT NULL DEFAULT '0',
  `lang` VARCHAR(6) NOT NULL DEFAULT '',
  `class` VARCHAR(16) NOT NULL DEFAULT '',
  `type` VARCHAR(12) NOT NULL DEFAULT '',
  `notify` INT(11) NOT NULL DEFAULT '0',
  `replies` VARCHAR(12) NOT NULL DEFAULT '0',
  `author` VARCHAR(64) NOT NULL DEFAULT '',
  `title` VARCHAR(35) NOT NULL DEFAULT '',
  `expired` TINYINT(1) NOT NULL DEFAULT '0',
  `content` mediumtext NOT NULL,
   PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

CREATE TABLE IF NOT EXISTS `galaxy_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `location` int(11) NOT NULL,
  `parent` int(11) DEFAULT NULL,
  `x` int(11) NOT NULL DEFAULT '0',
  `y` int(11) NOT NULL DEFAULT '0',
  `owner` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

CREATE TABLE IF NOT EXISTS `galaxy_attacks` (
  `id` INT(11) NOT NULL auto_increment,
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `owner` VARCHAR(32) NOT NULL DEFAULT '',
  `target` VARCHAR(32) NOT NULL DEFAULT '',
  `status` INT(11) NOT NULL DEFAULT '0',
  `communicationlost` TINYINT(1) NOT NULL DEFAULT '0',
  `efficacy` FLOAT NOT NULL DEFAULT '0',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `strategy` INT(11) NOT NULL DEFAULT '0',
  `bonus` INT(11) NOT NULL DEFAULT '0',
  `colonistskilled` INT(11) NOT NULL DEFAULT '0',
  `scientistskilled` INT(11) NOT NULL DEFAULT '0',
  `soldiers` INT(11) NOT NULL DEFAULT '0',
  `soldierslost` INT(11) NOT NULL DEFAULT '0',
  `soldierskilled` INT(11) NOT NULL DEFAULT '0',
  `bx1killed` INT(11) NOT NULL DEFAULT '0',
  `bx2killed` INT(11) NOT NULL DEFAULT '0',
  `bx5killed` INT(11) NOT NULL DEFAULT '0',
  `bx10` INT(11) NOT NULL DEFAULT '0',
  `bx10lost` INT(11) NOT NULL DEFAULT '0',
  `bx10killed` INT(11) NOT NULL DEFAULT '0',
  `walker` INT(11) NOT NULL DEFAULT '0',
  `walkerlost` INT(11) NOT NULL DEFAULT '0',
  `walkerkilled` INT(11) NOT NULL DEFAULT '0',
  `hawk` INT(11) NOT NULL DEFAULT '0',
  `hawklost` INT(11) NOT NULL DEFAULT '0',
  `hawkkilled` INT(11) NOT NULL DEFAULT '0',
  `valkyrie` INT(11) NOT NULL DEFAULT '0',
  `valkyrielost` INT(11) NOT NULL DEFAULT '0',
  `valkyriekilled` INT(11) NOT NULL DEFAULT '0',
  `crusader` INT(11) NOT NULL DEFAULT '0',
  `crusaderlost` INT(11) NOT NULL DEFAULT '0',
  `crusaderkilled` INT(11) NOT NULL DEFAULT '0',
  `warrior` INT(11) NOT NULL DEFAULT '0',
  `warriorlost` INT(11) NOT NULL DEFAULT '0',
  `warriorkilled` INT(11) NOT NULL DEFAULT '0',
  `dragon` INT(11) NOT NULL DEFAULT '0',
  `dragonlost` INT(11) NOT NULL DEFAULT '0',
  `dragonkilled` INT(11) NOT NULL DEFAULT '0',
  `whisper` INT(11) NOT NULL DEFAULT '0',
  `whisperlost` INT(11) NOT NULL DEFAULT '0',
  `whisperkilled` INT(11) NOT NULL DEFAULT '0',
  `nemesis` INT(11) NOT NULL DEFAULT '0',
  `nemesislost` INT(11) NOT NULL DEFAULT '0',
  `nemesiskilled` INT(11) NOT NULL DEFAULT '0',
  `scavenger` INT(11) NOT NULL DEFAULT '0',
  `scavengerlost` INT(11) NOT NULL DEFAULT '0',
  `scavengerkilled` INT(11) NOT NULL DEFAULT '0',
  `carrier` INT(11) NOT NULL DEFAULT '0',
  `carrierlost` INT(11) NOT NULL DEFAULT '0',
  `carrierkilled` INT(11) NOT NULL DEFAULT '0',
  `vesselkilled` INT(11) NOT NULL DEFAULT '0',
  `detectorkilled` INT(11) NOT NULL DEFAULT '0',
  `satellitekilled` INT(11) NOT NULL DEFAULT '0',
  `bee` INT(11) NOT NULL DEFAULT '0',
  `beelost` INT(11) NOT NULL DEFAULT '0',
  `beekilled` INT(11) NOT NULL DEFAULT '0',
  `windgenerator` INT(11) NOT NULL DEFAULT '0',
  `solarbattery` INT(11) NOT NULL DEFAULT '0',
  `fusionreactor` INT(11) NOT NULL DEFAULT '0',
  `bunker` INT(11) NOT NULL DEFAULT '0',
  `score` INT(11) NOT NULL DEFAULT '0',
  `metal` INT(11) NOT NULL DEFAULT '0',
  `uran` INT(11) NOT NULL DEFAULT '0',
  `crystals` INT(11) NOT NULL DEFAULT '0',
  `credits` BIGINT(20) NOT NULL DEFAULT '0',
  `exp` VARCHAR(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `login` (`login`),
  KEY `target` (`target`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_buildings`
--

CREATE TABLE IF NOT EXISTS `galaxy_buildings` (
  `id` INT(11) NOT NULL auto_increment,
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `name` VARCHAR(32) NOT NULL DEFAULT '0',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `amount` INT(11) NOT NULL DEFAULT '1',
  `score` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_chat`
--

CREATE TABLE IF NOT EXISTS `galaxy_chat` (
  `id` INT(11) NOT NULL auto_increment,
  `timestamp` VARCHAR(14) NOT NULL DEFAULT '',
  `hidden` TINYINT(1) not null DEFAULT 0,
  `author` VARCHAR(64) NOT NULL DEFAULT '',
  `message` mediumtext NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_clanmessages`
--

CREATE TABLE IF NOT EXISTS `galaxy_clanmessages` (
  `id` INT(11) NOT NULL auto_increment,
  `type` ENUM('','attack','reject','donate','admit','join','recultivation','leave','councildismiss','ownerchange','counciladmit','namechange','statuschange') NOT NULL,
  `timestamp` timestamp NOT NULL,
  `time` INT(11) NOT NULL DEFAULT '0',
  `clan` VARCHAR(32) NOT NULL DEFAULT '',
  `from` VARCHAR(32) NOT NULL DEFAULT '',
  `to` VARCHAR(32) NOT NULL DEFAULT '',
  `subject` VARCHAR(120) NOT NULL DEFAULT '',
  `credits` INT(11) NOT NULL DEFAULT '0',
  `crystals` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `clan` (`clan`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_colonies`
--

CREATE TABLE IF NOT EXISTS `galaxy_colonies` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `owner` VARCHAR(32) NOT NULL DEFAULT '',
  `planet` VARCHAR(32) NOT NULL DEFAULT '',
  `oldplanet` VARCHAR(32) NOT NULL DEFAULT '',
  `jailto` VARCHAR(14) NOT NULL DEFAULT '',
  `avatar` VARCHAR(128) NOT NULL DEFAULT '',
  `thicks` INT(11) NOT NULL DEFAULT '0',
  `description` VARCHAR(240) NOT NULL DEFAULT '',
  `attacked` INT(11) NOT NULL DEFAULT '0',
  `damage` FLOAT NOT NULL DEFAULT '0',
  `energy` FLOAT NOT NULL DEFAULT '0',
  `metal` FLOAT NOT NULL DEFAULT '0',
  `silicon` FLOAT NOT NULL DEFAULT '0',
  `deuterium` FLOAT NOT NULL DEFAULT '0',
  `uran` FLOAT NOT NULL DEFAULT '0',
  `plutonium` FLOAT NOT NULL DEFAULT '0',
  `organics` FLOAT NOT NULL DEFAULT '0',
  `food` FLOAT NOT NULL DEFAULT '0',
  `crystals` INT(10) unsigned NOT NULL DEFAULT '0',
  `metalsources` INT(11) NOT NULL DEFAULT '0',
  `uransources` INT(11) NOT NULL DEFAULT '0',
  `geosources` INT(11) NOT NULL DEFAULT '0',
  `siliconsources` INT(11) NOT NULL DEFAULT '0',
  `plutoniumsources` INT(11) NOT NULL DEFAULT '0',
  `base` INT(11) NOT NULL DEFAULT '0',
  `tron` INT(11) NOT NULL DEFAULT '0',
  `ami` INT(11) NOT NULL DEFAULT '0',
  `cyber` INT(11) NOT NULL DEFAULT '0',
  `necro` INT(11) NOT NULL DEFAULT '0',
  `infrastructure` INT(11) NOT NULL DEFAULT '50',
  `science` INT(11) NOT NULL DEFAULT '25',
  `military` INT(11) NOT NULL DEFAULT '25',
  `colonists` INT(11) NOT NULL DEFAULT '0',
  `scientists` INT(11) NOT NULL DEFAULT '0',
  `soldiers` INT(11) NOT NULL DEFAULT '0',
  `clones` INT(11) NOT NULL DEFAULT '0',
  `drones` INT(11) NOT NULL DEFAULT '0',
  `souls` INT(11) NOT NULL DEFAULT '0',
  `satisfaction` FLOAT NOT NULL DEFAULT '0',
  `lost` INT(11) NOT NULL DEFAULT '0',
  `ax3` INT(11) NOT NULL DEFAULT '0',
  `ax6` INT(11) NOT NULL DEFAULT '0',
  `bx1` INT(11) NOT NULL DEFAULT '0',
  `bx2` INT(11) NOT NULL DEFAULT '0',
  `bx5` INT(11) NOT NULL DEFAULT '0',
  `bx10` INT(11) NOT NULL DEFAULT '0',
  `cx7` INT(11) NOT NULL DEFAULT '0',
  `cx13` INT(11) NOT NULL DEFAULT '0',
  `walker` INT(11) NOT NULL DEFAULT '0',
  `factory` INT(11) NOT NULL DEFAULT '0',
  `flats` INT(11) NOT NULL DEFAULT '0',
  `barracks` INT(11) NOT NULL DEFAULT '0',
  `laboratory` INT(11) NOT NULL DEFAULT '0',
  `databank` INT(11) NOT NULL DEFAULT '0',
  `depot` INT(11) NOT NULL DEFAULT '1',
  `bunker` INT(11) NOT NULL DEFAULT '0',
  `lasertower` INT(11) NOT NULL DEFAULT '0',
  `plasmatower` INT(11) NOT NULL DEFAULT '0',
  `academy` INT(11) NOT NULL DEFAULT '0',
  `spacedepot` INT(11) NOT NULL DEFAULT '0',
  `windgenerator` INT(11) NOT NULL DEFAULT '0',
  `solarbattery` INT(11) NOT NULL DEFAULT '0',
  `fusionreactor` INT(11) NOT NULL DEFAULT '0',
  `fusionreactoroff` TINYINT(4) NOT NULL DEFAULT '0',
  `metalextractor` INT(11) NOT NULL DEFAULT '0',
  `foodplanting` INT(11) NOT NULL DEFAULT '0',
  `uranmine` INT(11) NOT NULL DEFAULT '0',
  `uranmineoff` TINYINT(4) NOT NULL DEFAULT '0',
  `energysilo` INT(11) NOT NULL DEFAULT '0',
  `metalsilo` INT(11) NOT NULL DEFAULT '0',
  `uransilo` INT(11) NOT NULL DEFAULT '0',
  `foodsilo` INT(11) NOT NULL DEFAULT '0',
  `hawk` INT(11) NOT NULL DEFAULT '0',
  `scavenger` INT(11) NOT NULL DEFAULT '0',
  `crusader` INT(11) NOT NULL DEFAULT '0',
  `vessel` INT(11) NOT NULL DEFAULT '0',
  `carrier` INT(11) NOT NULL DEFAULT '0',
  `valkyrie` INT(11) NOT NULL DEFAULT '0',
  `punisher` INT(11) NOT NULL DEFAULT '0',
  `anathema` INT(11) NOT NULL DEFAULT '0',
  `grandfather` INT(11) NOT NULL DEFAULT '0',
  `firebird` INT(11) NOT NULL DEFAULT '0',
  `warrior` INT(11) NOT NULL DEFAULT '0',
  `dragon` INT(11) NOT NULL DEFAULT '0',
  `whisper` INT(11) NOT NULL DEFAULT '0',
  `mystic` INT(11) NOT NULL DEFAULT '0',
  `detector` INT(11) NOT NULL DEFAULT '0',
  `satellite` INT(11) NOT NULL DEFAULT '0',
  `nemesis` INT(11) NOT NULL DEFAULT '0',
  `mmu` INT(11) NOT NULL DEFAULT '0',
  `worker` INT(11) NOT NULL DEFAULT '0',
  `scout` INT(11) NOT NULL DEFAULT '0',
  `cage` INT(11) NOT NULL DEFAULT '0',
  `bee` INT(11) NOT NULL DEFAULT '0',
  `bxtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `hawktechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `crusadertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `vesseltechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `scavengertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `warriortechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `dragontechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `whispertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `nemesistechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `carriertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `detectortechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `corthosiumtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `spaceshipstechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `tacticstechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `communicationstechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `atomtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `biotechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `resourcestechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `cryogenictechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `weapontechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `plasmatechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `moleculartechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `nanotechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `databankstechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `warptechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `mutationtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `procreationtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `regenerationtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `hyperwavestechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `dimensionstechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `uimtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `teleportationtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `collectivetechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `crystaltechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `advancedweapontechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `energycentertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `metalcentertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `urancentertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `foodcentertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `crystalcentertechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `advancedscanningtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `militarytechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `satellitestechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `defensivetechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `offensivetechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `trontechnology` TINYINT(4) NOT NULL DEFAULT '0',
  `managementtechnology` TINYINT(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `owner` (`owner`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_config`
--

CREATE TABLE IF NOT EXISTS `galaxy_config` (
  `config_key` VARCHAR(255) NOT NULL,
  `config_value` VARCHAR(255) NOT NULL,
  PRIMARY KEY  (`config_key`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_descriptions`
--

CREATE TABLE IF NOT EXISTS `galaxy_descriptions` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `locale` VARCHAR(16) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_equipment`
--

CREATE TABLE IF NOT EXISTS `galaxy_equipment` (
  `id` INT(11) NOT NULL auto_increment,
  `owner` VARCHAR(32) NOT NULL DEFAULT '',
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `type` VARCHAR(16) DEFAULT NULL,
  `class` ENUM('','gold','silver','bronze') NOT NULL DEFAULT '',
  `count` INT(11) NOT NULL DEFAULT '0',
  `damaged` TINYINT(4) NOT NULL DEFAULT '0',
  `active` TINYINT(4) NOT NULL DEFAULT '0',
  `level` INT(11) NOT NULL DEFAULT '0',
  `levelmax` INT(11) NOT NULL DEFAULT '0',
  `price` INT(11) NOT NULL DEFAULT '0',
  `distance` INT(11) NOT NULL DEFAULT '0',
  `req_level` INT(11) NOT NULL DEFAULT '0',
  `req_strength` INT(11) NOT NULL DEFAULT '0',
  `req_agility` INT(11) NOT NULL DEFAULT '0',
  `req_psi` INT(11) NOT NULL DEFAULT '0',
  `req_force` INT(11) NOT NULL DEFAULT '0',
  `req_mp` INT(11) NOT NULL DEFAULT '0',
  `req_hp` INT(11) NOT NULL DEFAULT '0',
  `req_intellect` INT(11) NOT NULL DEFAULT '0',
  `req_knowledge` INT(11) NOT NULL DEFAULT '0',
  `req_pocketstealing` INT(11) NOT NULL DEFAULT '0',
  `req_hacking` INT(11) NOT NULL DEFAULT '0',
  `req_alcoholism` INT(11) NOT NULL DEFAULT '0',
  `weight` FLOAT NOT NULL DEFAULT '0',
  `min` FLOAT NOT NULL DEFAULT '0',
  `max` FLOAT NOT NULL DEFAULT '0',
  `armor` FLOAT NOT NULL DEFAULT '0',
  `hit` INT(11) NOT NULL DEFAULT '0',
  `criticalhit` INT(11) NOT NULL DEFAULT '0',
  `critical` FLOAT NOT NULL DEFAULT '0',
  `block` INT(11) NOT NULL DEFAULT '0',
  `speed` INT(11) NOT NULL DEFAULT '0',
  `deaf` INT(11) NOT NULL DEFAULT '0',
  `hide` INT(11) NOT NULL DEFAULT '0',
  `protection` INT(11) NOT NULL DEFAULT '0',
  `hp` INT(11) NOT NULL DEFAULT '0',
  `mp` INT(11) NOT NULL DEFAULT '0',
  `parameters` VARCHAR(32) NOT NULL DEFAULT '',
  `use` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_events`
--

CREATE TABLE IF NOT EXISTS `galaxy_events` (
  `event_timestamp` VARCHAR(14) NOT NULL,
  `event_from` VARCHAR(32) NOT NULL,
  `event_subject` VARCHAR(32) NOT NULL,
  `event_message` VARCHAR(255) NOT NULL,
  KEY `event_timestamp` (`event_timestamp`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_exploration`
--

CREATE TABLE IF NOT EXISTS `galaxy_exploration` (
  `id` INT(11) NOT NULL auto_increment,
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `type` ENUM('planet','galaxy') NOT NULL DEFAULT 'planet',
  `target` VARCHAR(16) NOT NULL DEFAULT '',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `colonists` INT(11) NOT NULL DEFAULT '0',
  `scientists` INT(11) NOT NULL DEFAULT '0',
  `soldiers` INT(11) NOT NULL DEFAULT '0',
  `vessels` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_groups`
--

CREATE TABLE IF NOT EXISTS `galaxy_groups` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `created` date NOT NULL DEFAULT '0000-00-00',
  `description` VARCHAR(240) NOT NULL DEFAULT '',
  `avatar` VARCHAR(128) NOT NULL DEFAULT '',
  `owner` VARCHAR(32) NOT NULL DEFAULT '',
  `co1` VARCHAR(32) NOT NULL DEFAULT '',
  `co2` VARCHAR(32) NOT NULL DEFAULT '',
  `credits` INT(11) NOT NULL DEFAULT '0',
  `crystals` INT(11) NOT NULL DEFAULT '0',
  `score` INT(11) NOT NULL DEFAULT '0',
  `level` FLOAT NOT NULL DEFAULT '1',
  `tax` INT(11) NOT NULL DEFAULT '15',
  `attack` INT(11) NOT NULL DEFAULT '500',
  `defense` INT(11) NOT NULL DEFAULT '500',
  `www` VARCHAR(160) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_hero`
--

CREATE TABLE IF NOT EXISTS `galaxy_hero` (
  `key` BIGINT NOT NULL AUTO_INCREMENT,
  `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` TIMESTAMP NULL,
  `owner` INT NULL,
  `name` VARCHAR(50) NULL,
  `age` INT NULL,
  `level` INT NULL,
  `location` VARCHAR(50) NULL,
  `area` VARCHAR(50) NULL,
  `x` FLOAT NULL,
  `y` FLOAT NULL,
  `z` FLOAT NULL,
  `action` VARCHAR(50) NULL,
  `object` VARCHAR(50) NULL,
  `card` MEDIUMTEXT NULL,
  PRIMARY KEY (`key`),
  KEY (`owner`),
  KEY (`area`)
);

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

--
-- Table structure for table `galaxy_items`
--

CREATE TABLE IF NOT EXISTS `galaxy_items` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `type` VARCHAR(16) DEFAULT NULL,
  `class` ENUM('','gold','silver','bronze') NOT NULL DEFAULT '',
  `count` INT(11) NOT NULL DEFAULT '0',
  `price` INT(11) NOT NULL DEFAULT '0',
  `distance` INT(11) NOT NULL DEFAULT '0',
  `req_level` INT(11) NOT NULL DEFAULT '0',
  `req_strength` INT(11) NOT NULL DEFAULT '0',
  `req_agility` INT(11) NOT NULL DEFAULT '0',
  `req_psi` INT(11) NOT NULL DEFAULT '0',
  `req_force` INT(11) NOT NULL DEFAULT '0',
  `req_mp` INT(11) NOT NULL DEFAULT '0',
  `req_hp` INT(11) NOT NULL DEFAULT '0',
  `req_intellect` INT(11) NOT NULL DEFAULT '0',
  `req_knowledge` INT(11) NOT NULL DEFAULT '0',
  `req_pocketstealing` INT(11) NOT NULL DEFAULT '0',
  `req_hacking` INT(11) NOT NULL DEFAULT '0',
  `req_alcoholism` INT(11) NOT NULL DEFAULT '0',
  `weight` FLOAT NOT NULL DEFAULT '0',
  `min` FLOAT NOT NULL DEFAULT '0',
  `max` FLOAT NOT NULL DEFAULT '0',
  `armor` FLOAT NOT NULL DEFAULT '0',
  `hit` INT(11) NOT NULL DEFAULT '0',
  `criticalhit` INT(11) NOT NULL DEFAULT '0',
  `critical` FLOAT NOT NULL DEFAULT '0',
  `block` INT(11) NOT NULL DEFAULT '0',
  `speed` INT(11) NOT NULL DEFAULT '0',
  `deaf` INT(11) NOT NULL DEFAULT '0',
  `hide` INT(11) NOT NULL DEFAULT '0',
  `protection` INT(11) NOT NULL DEFAULT '0',
  `hp` INT(11) NOT NULL DEFAULT '0',
  `mp` INT(11) NOT NULL DEFAULT '0',
  `parameters` VARCHAR(32) NOT NULL DEFAULT '',
  `use` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_name` (`name`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_markets`
--

CREATE TABLE IF NOT EXISTS `galaxy_markets` (
  `id` INT(11) NOT NULL auto_increment,
  `position` VARCHAR(32) NOT NULL DEFAULT '',
  `level` INT(11) NOT NULL DEFAULT '0',
  `reputation` INT(11) NOT NULL DEFAULT '0',
  `energybuyaverage` FLOAT NOT NULL DEFAULT '0',
  `energybuy` FLOAT NOT NULL DEFAULT '0',
  `energysellaverage` FLOAT NOT NULL DEFAULT '0',
  `energysell` FLOAT NOT NULL DEFAULT '0',
  `siliconbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `siliconbuy` FLOAT NOT NULL DEFAULT '0',
  `siliconsellaverage` FLOAT NOT NULL DEFAULT '0',
  `siliconsell` FLOAT NOT NULL DEFAULT '0',
  `metalbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `metalbuy` FLOAT NOT NULL DEFAULT '0',
  `metalsellaverage` FLOAT NOT NULL DEFAULT '0',
  `metalsell` FLOAT NOT NULL DEFAULT '0',
  `uranbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `uranbuy` FLOAT NOT NULL DEFAULT '0',
  `uransellaverage` FLOAT NOT NULL DEFAULT '0',
  `uransell` FLOAT NOT NULL DEFAULT '0',
  `plutoniumbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `plutoniumbuy` FLOAT NOT NULL DEFAULT '0',
  `plutoniumsellaverage` FLOAT NOT NULL DEFAULT '0',
  `plutoniumsell` FLOAT NOT NULL DEFAULT '0',
  `deuteriumbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `deuteriumbuy` FLOAT NOT NULL DEFAULT '0',
  `deuteriumsellaverage` FLOAT NOT NULL DEFAULT '0',
  `deuteriumsell` FLOAT NOT NULL DEFAULT '0',
  `foodbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `foodbuy` FLOAT NOT NULL DEFAULT '0',
  `foodsellaverage` FLOAT NOT NULL DEFAULT '0',
  `foodsell` FLOAT NOT NULL DEFAULT '0',
  `crystalsbuyaverage` FLOAT NOT NULL DEFAULT '0',
  `crystalsbuy` FLOAT NOT NULL DEFAULT '0',
  `crystalssellaverage` FLOAT NOT NULL DEFAULT '0',
  `crystalssell` FLOAT NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI_position` (`position`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_messages`
--

CREATE TABLE IF NOT EXISTS `galaxy_messages` (
  `id` INT(11) NOT NULL auto_increment,
  `type` ENUM('message','report') NOT NULL DEFAULT 'message',
  `from` VARCHAR(32) NOT NULL DEFAULT '',
  `to` VARCHAR(32) NOT NULL DEFAULT '',
  `subject` VARCHAR(120) NOT NULL DEFAULT '',
  `message` text NOT NULL,
  `read` TINYINT(1) NOT NULL DEFAULT '0',
  `timestamp` VARCHAR(14) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `to` (`to`),
  KEY `read` (`read`)
)
ENGINE = MYISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_news`
--

CREATE TABLE IF NOT EXISTS `galaxy_news` (
  `id` INT(11) NOT NULL auto_increment,
  `timestamp` VARCHAR(14) NOT NULL DEFAULT '',
  `from` VARCHAR(32) NOT NULL DEFAULT '',
  `locale` VARCHAR(16) NOT NULL DEFAULT '',
  `message` text NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_places`
--

CREATE TABLE IF NOT EXISTS `galaxy_places` (
  `id` INT(11) NOT NULL auto_increment,
  `position` VARCHAR(32) NOT NULL DEFAULT '',
  `type` VARCHAR(32) NOT NULL DEFAULT '',
  `parameters` VARCHAR(240) NOT NULL DEFAULT '',
  `extra` VARCHAR(64) NOT NULL DEFAULT '',
  `level` INT(11) NOT NULL DEFAULT '0',
  `reputation` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI` (`position`,`type`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_productions`
--

CREATE TABLE IF NOT EXISTS `galaxy_productions` (
  `id` INT(11) NOT NULL auto_increment,
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `amount` MEDIUMINT(9) NOT NULL DEFAULT '0',
  `score` MEDIUMINT(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_researches`
--

CREATE TABLE IF NOT EXISTS `galaxy_researches` (
  `id` INT(11) NOT NULL auto_increment,
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `name` VARCHAR(32) NOT NULL DEFAULT '',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `score` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_space`
--
CREATE TABLE IF NOT EXISTS `galaxy_space` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(20) NOT NULL DEFAULT '',
  `type` ENUM('planet','asteroid','meteor','moon') NOT NULL DEFAULT 'planet',
  `class` ENUM('small','medium','big','huge','giant') NOT NULL DEFAULT 'medium',
  `technology` ENUM('none','human','tron','ami','cyber','necro','unknown') NOT NULL DEFAULT 'human',
  `galaxy` VARCHAR(10) NOT NULL DEFAULT '',
  `system` VARCHAR(20) NOT NULL DEFAULT '',
  `x` INT(11) NOT NULL DEFAULT '0',
  `y` INT(11) NOT NULL DEFAULT '0',
  `z` INT(11) NOT NULL DEFAULT '0',
  `explored` FLOAT NOT NULL DEFAULT '0',
  `abandoned` INT(11) NOT NULL DEFAULT '0',
  `wind` TINYINT(4) NOT NULL DEFAULT '15',
  `life` INT(11) NOT NULL DEFAULT '30',
  `terrain` VARCHAR(50) NOT NULL DEFAULT '50',
  `gravity` FLOAT NOT NULL DEFAULT '2.5',
  `moons` INT(11) NOT NULL DEFAULT '0',
  `illumination` INT(11) NOT NULL DEFAULT '15',
  `link` VARCHAR(200) NOT NULL DEFAULT '',
  `description` VARCHAR(500) NOT NULL DEFAULT '',
  `public` TINYINT(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI` (`name`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_stats`
--

CREATE TABLE IF NOT EXISTS `galaxy_stats` (
  `key` VARCHAR(32) NOT NULL DEFAULT '',
  `value` VARCHAR(224) NOT NULL DEFAULT '',
  PRIMARY KEY  (`key`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_tales`
--

CREATE TABLE IF NOT EXISTS `galaxy_tales` (
  `id` INT(11) NOT NULL auto_increment,
  `timestamp` timestamp NOT NULL,
  `from` VARCHAR(32) NOT NULL DEFAULT '',
  `locale` VARCHAR(16) NOT NULL DEFAULT '',
  `level` INT(11) NOT NULL DEFAULT '0',
  `subject` VARCHAR(80) NOT NULL DEFAULT '',
  `message` text NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_tips`
--

CREATE TABLE IF NOT EXISTS `galaxy_tips` (
  `id` INT(11) NOT NULL auto_increment,
  `locale` VARCHAR(16) NOT NULL DEFAULT '',
  `tip` VARCHAR(250) NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI_tip` (`tip`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_transfers`
--

CREATE TABLE IF NOT EXISTS `galaxy_transfers` (
  `id` INT(11) NOT NULL auto_increment,
  `from` VARCHAR(32) NOT NULL DEFAULT '',
  `to` VARCHAR(32) NOT NULL DEFAULT '',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `time` INT(11) NOT NULL DEFAULT '0',
  `metal` INT(11) NOT NULL DEFAULT '0',
  `uran` INT(11) NOT NULL DEFAULT '0',
  `food` INT(11) NOT NULL DEFAULT '0',
  `crystals` INT(11) NOT NULL DEFAULT '0',
  `colonists` INT(11) NOT NULL DEFAULT '0',
  `scientists` INT(11) NOT NULL DEFAULT '0',
  `soldiers` INT(11) NOT NULL DEFAULT '0',
  `bx1` INT(11) NOT NULL DEFAULT '0',
  `bx2` INT(11) NOT NULL DEFAULT '0',
  `bx5` INT(11) NOT NULL DEFAULT '0',
  `bx10` INT(11) NOT NULL DEFAULT '0',
  `hawk` INT(11) NOT NULL DEFAULT '0',
  `crusader` INT(11) NOT NULL DEFAULT '0',
  `warrior` INT(11) NOT NULL DEFAULT '0',
  `dragon` INT(11) NOT NULL DEFAULT '0',
  `nemesis` INT(11) NOT NULL DEFAULT '0',
  `scavenger` INT(11) NOT NULL DEFAULT '0',
  `carrier` INT(11) NOT NULL DEFAULT '0',
  `vessel` INT(11) NOT NULL DEFAULT '0',
  `detector` INT(11) NOT NULL DEFAULT '0',
  `bee` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_universe`
--

CREATE TABLE IF NOT EXISTS `galaxy_universe` (
  `id` INT(11) NOT NULL auto_increment,
  `name` VARCHAR(16) NOT NULL DEFAULT '',
  `x` INT(11) NOT NULL DEFAULT '0',
  `y` INT(11) NOT NULL DEFAULT '0',
  `z` INT(11) NOT NULL DEFAULT '0',
  `type` ENUM('galaxy','anomaly','blackhole') NOT NULL DEFAULT 'galaxy',
  `discovered` VARCHAR(10) NOT NULL DEFAULT '',
  `by` VARCHAR(16) NOT NULL DEFAULT '',
  `age` VARCHAR(16) NOT NULL DEFAULT '',
  `nice` TINYINT NOT NULL DEFAULT '0', 
  `hide` TINYINT(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UI_name` (`name`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `galaxy_users`
--

CREATE TABLE IF NOT EXISTS `galaxy_users` (
  `id` INT(11) NOT NULL auto_increment,
  `active` TINYINT(1) NOT NULL DEFAULT '0',
  `online` VARCHAR(14) NOT NULL DEFAULT '',
  `login` VARCHAR(32) NOT NULL DEFAULT '',
  `password` VARCHAR(32) NOT NULL DEFAULT '',
  `seed` VARCHAR(16) NOT NULL DEFAULT '',
  `usergroup` VARCHAR(16) NOT NULL DEFAULT '',
  `clan` VARCHAR(32) NOT NULL DEFAULT '',
  `oldclan` VARCHAR(32) NOT NULL DEFAULT '',
  `email` VARCHAR(64) NOT NULL DEFAULT '',
  `gg` VARCHAR(16) NOT NULL DEFAULT '',
  `ggpublic` TINYINT(4) NOT NULL DEFAULT '0',
  `www` VARCHAR(64) NOT NULL DEFAULT '',
  `language` VARCHAR(5) NOT NULL DEFAULT '',
  `style` VARCHAR(16) NOT NULL DEFAULT '',
  `regid` VARCHAR(12) NOT NULL DEFAULT '',
  `registered` date DEFAULT NULL,
  `seen` VARCHAR(14) NOT NULL DEFAULT '',
  `locked` VARCHAR(14) NOT NULL DEFAULT '',
  `banned` VARCHAR(14) NOT NULL DEFAULT '',
  `bancount` INT(11) NOT NULL DEFAULT '0',
  `who` VARCHAR(35) NOT NULL DEFAULT '',
  `reason` text NULL,
  `injail` INT(4) NOT NULL DEFAULT '0',
  `ip` VARCHAR(64) NOT NULL DEFAULT '',
  `lastip` VARCHAR(64) NOT NULL DEFAULT '',
  `soundsoff` TINYINT(4) NOT NULL DEFAULT '0',
  `antispam` TINYINT(1) NOT NULL DEFAULT '0',
  `credits` BIGINT(20) NOT NULL DEFAULT '50000',
  `bank` BIGINT(20) NOT NULL DEFAULT '0',
  `score` INT(11) NOT NULL DEFAULT '0',
  `reputation` FLOAT NOT NULL DEFAULT '0',
  `exp` VARCHAR(32) NOT NULL DEFAULT '0',
  `level` INT(11) NOT NULL DEFAULT '1',
  `homeworld` VARCHAR(32) NOT NULL DEFAULT '',
  `planet` VARCHAR(32) NOT NULL DEFAULT 'mulahay',
  `destination` VARCHAR(32) NOT NULL DEFAULT '',
  `time` INT(11) NOT NULL DEFAULT '0',
  `distance` FLOAT NOT NULL DEFAULT '0',
  `voyaged` FLOAT NOT NULL DEFAULT '0',
  `hp` FLOAT NOT NULL DEFAULT '10',
  `hpmin` MEDIUMINT(9) NOT NULL DEFAULT '25',
  `hpmax` FLOAT NOT NULL DEFAULT '10',
  `hpgain` FLOAT NOT NULL DEFAULT '0.2',
  `hpmodifier` VARCHAR(8) NOT NULL DEFAULT '',
  `mp` FLOAT NOT NULL DEFAULT '10',
  `mpmax` FLOAT NOT NULL DEFAULT '10',
  `mpgain` FLOAT NOT NULL DEFAULT '0.1',
  `mpmodifier` VARCHAR(8) NOT NULL DEFAULT '',
  `thicks` MEDIUMINT(9) NOT NULL DEFAULT '0',
  `ship` VARCHAR(16) NOT NULL DEFAULT 'hawk',
  `strength` FLOAT NOT NULL DEFAULT '1',
  `strengthmodifier` VARCHAR(8) NOT NULL DEFAULT '',
  `psi` FLOAT NOT NULL DEFAULT '0',
  `force` FLOAT NOT NULL DEFAULT '0',
  `agility` FLOAT NOT NULL DEFAULT '1',
  `agilitymodifier` FLOAT NOT NULL DEFAULT '0',
  `pocketstealing` FLOAT NOT NULL DEFAULT '0',
  `alcoholism` FLOAT NOT NULL DEFAULT '0',
  `intellect` FLOAT NOT NULL DEFAULT '0',
  `knowledge` FLOAT NOT NULL DEFAULT '0',
  `hacking` FLOAT NOT NULL DEFAULT '0',
  `killed` MEDIUMINT(9) NOT NULL DEFAULT '0',
  `killedby` MEDIUMINT(9) NOT NULL DEFAULT '0',
  `lastkilled` VARCHAR(32) NOT NULL DEFAULT '',
  `lastkilledby` VARCHAR(32) NOT NULL DEFAULT '',
  `sp` MEDIUMINT(9) NOT NULL DEFAULT '2',
  `avatar` VARCHAR(128) DEFAULT NULL,
  `clanstatus` VARCHAR(64) NOT NULL DEFAULT '',
  `dad` VARCHAR(14) NOT NULL DEFAULT '',
  `flag` INT(1) NOT NULL DEFAULT '0',
  `ban` INT(1) NOT NULL DEFAULT '0',
  `bantime` INT(11) NOT NULL DEFAULT '0',
  `begin` INT(11) NOT NULL DEFAULT '0',
  `race` VARCHAR(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `login` (`login`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;

