diff --git a/sql_updates.txt b/sql_updates.txt index ee890e0c..9ea4944d 100644 --- a/sql_updates.txt +++ b/sql_updates.txt @@ -1,3 +1,8 @@ +-- 21.09.2018 changed a column type and added a column, changed 23 attributes and 12 columns default value +ALTER TABLE `s1_a2b` CHANGE `ckey` `ckey` CHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0'; +ALTER TABLE `s1_vdata` CHANGE `owner` `owner` INT(11) NOT NULL DEFAULT '5', CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL, CHANGE `capital` `capital` TINYINT(1) NOT NULL DEFAULT '0', CHANGE `pop` `pop` INT(11) NOT NULL DEFAULT '2', CHANGE `cp` `cp` INT(11) NOT NULL DEFAULT '0', CHANGE `celebration` `celebration` INT(11) NOT NULL DEFAULT '0', CHANGE `type` `type` INT(11) NOT NULL DEFAULT '3', CHANGE `wood` `wood` FLOAT(12,2) NOT NULL DEFAULT '0', CHANGE `clay` `clay` FLOAT(12,2) NOT NULL DEFAULT '0', CHANGE `iron` `iron` FLOAT(12,2) NOT NULL DEFAULT '0', CHANGE `maxstore` `maxstore` INT(11) NOT NULL DEFAULT '0', CHANGE `crop` `crop` FLOAT(12,2) NOT NULL DEFAULT '0', CHANGE `maxcrop` `maxcrop` INT(11) NOT NULL DEFAULT '0', CHANGE `lastupdate` `lastupdate` INT(11) NOT NULL DEFAULT '0', CHANGE `lastupdate2` `lastupdate2` INT(11) NOT NULL DEFAULT '0', CHANGE `loyalty` `loyalty` FLOAT(9,6) NOT NULL DEFAULT '100.000000', CHANGE `exp1` `exp1` INT(11) NOT NULL DEFAULT '0', CHANGE `exp2` `exp2` INT(11) NOT NULL DEFAULT '0', CHANGE `exp3` `exp3` INT(11) NOT NULL DEFAULT '0', CHANGE `created` `created` INT(11) NOT NULL DEFAULT '0', CHANGE `natar` `natar` TINYINT(1) NOT NULL DEFAULT '0', CHANGE `starv` `starv` INT(11) NOT NULL DEFAULT '0', CHANGE `starvupdate` `starvupdate` INT(11) NOT NULL DEFAULT '0', CHANGE `evasion` `evasion` TINYINT(1) NOT NULL DEFAULT '0'; +ALTER TABLE `s1_users` ADD `beerfest` INT(11) NOT NULL DEFAULT '0' AFTER `timestamp`; + -- 19.09.2018 added a column, an index, changed 15 columns default value and 14 columns attribute ALTER TABLE `s1_a2b` ADD `from` INT(11) NOT NULL AFTER `ckey`; ALTER TABLE `s1_a2b` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT, CHANGE `ckey` `ckey` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0', CHANGE `from` `from` INT(11) NOT NULL DEFAULT '0', CHANGE `to` `to` INT(11) NOT NULL DEFAULT '0', CHANGE `u1` `u1` INT(11) NOT NULL DEFAULT '0', CHANGE `u2` `u2` INT(11) NOT NULL DEFAULT '0', CHANGE `u3` `u3` INT(11) NOT NULL DEFAULT '0', CHANGE `u4` `u4` INT(11) NOT NULL DEFAULT '0', CHANGE `u5` `u5` INT(11) NOT NULL DEFAULT '0', CHANGE `u6` `u6` INT(11) NOT NULL DEFAULT '0', CHANGE `u7` `u7` INT(11) NOT NULL DEFAULT '0', CHANGE `u8` `u8` INT(11) NOT NULL DEFAULT '0', CHANGE `u9` `u9` INT(11) NOT NULL DEFAULT '0', CHANGE `u10` `u10` INT(11) NOT NULL DEFAULT '0', CHANGE `u11` `u11` INT(11) NOT NULL DEFAULT '0', CHANGE `type` `type` SMALLINT(1) NOT NULL DEFAULT '0'; diff --git a/src/Data/Buildings/Brewery.php b/src/Data/Buildings/Brewery.php index a44a1ca9..8250b7d3 100644 --- a/src/Data/Buildings/Brewery.php +++ b/src/Data/Buildings/Brewery.php @@ -3,6 +3,8 @@ namespace TravianZ\Data\Buildings; use TravianZ\Entity\Building; +use TravianZ\Entity\Village; +use TravianZ\Entity\BeerFest; final class Brewery extends Building { @@ -37,4 +39,59 @@ final class Brewery extends Building $buildingRequirements ); } + + /** + * Check if the passed village has enough resources to start a beer fest + * + * @param Village $village + * @return array Returns the needed resources (with the right keys) to start a beer fest + */ + public function checkEnoughBeerFestResources(Village $village): array + { + // Initialize + $neededResources = []; + + // Check the resources quantity + foreach (BeerFest::NEEDED_RESOURCES as $key => $value) { + // Set the new key + $newKey = array_keys($village->getResources())[$key]; + + // Check if the resource isn't enough + if ($village->getResources()[$newKey] < BeerFest::NEEDED_RESOURCES[$key]) { + return []; + } + + // Add the resource + $neededResources[$newKey] = -BeerFest::NEEDED_RESOURCES[$key]; + } + + return $neededResources; + } + + /** + * Start a beerfest + * + * @param Village $village + */ + public function startBeerFest(Village $village) + { + // Check if the beer fest hasn't already been started + if ($village->owner->isBeerFestActive()) { + return; + } + + // Initialize + $neededResources = $this->checkEnoughBeerFestResources($village); + + // Check if the beer fest can be started + if (empty($neededResources)) { + return; + } + + // Start the beerFest + (new BeerFest($this->getDatabase(), $village->owner))->start(); + + // Remove the resources from the village + $village->updateResources($neededResources); + } } \ No newline at end of file diff --git a/src/Data/Buildings/RallyPoint.php b/src/Data/Buildings/RallyPoint.php index 4960ca56..4c2320e7 100644 --- a/src/Data/Buildings/RallyPoint.php +++ b/src/Data/Buildings/RallyPoint.php @@ -155,7 +155,12 @@ final class RallyPoint extends Building * {@inheritdoc} * @see \TravianZ\Entity\Building::getBonus() */ - public function getBonus(){ + public function getBonus(int $level = 0){ + // Check if a level has been defined + if ($level > 0) { + return $this->bonus[$level]; + } + // Initialize $bonus = []; @@ -841,7 +846,7 @@ final class RallyPoint extends Building // Check if it's a normal attack and there is atleast one catapult if ($parameters['c'] == MovementEnums::NORMAL && $parameters['units'][8] > 0) { - $catapultTargets = $this->getBonus(); + $catapultTargets = $this->getBonus($village->owner->isBeerFestActive() ? 1 : 0); } // Set the buildings @@ -849,7 +854,7 @@ final class RallyPoint extends Building foreach ($targets as $buildingID) { $building = BuildingsFactory::newBuilding($buildingID, 0, 0); $catapultTarget['id'] = $building->id; - $catapultTarget['name'] = $building->name; + $catapultTarget['name'] = $buildingID == BuildingEnums::EMPTY ? RANDOM : $building->name; $catapultTargetBuildings[$type][] = $catapultTarget; } } @@ -980,27 +985,32 @@ final class RallyPoint extends Building // Initialize $validTargets = 0; - + // Check the catapult targets correctness - foreach ($this->getBonus() as $validCatapultTargets) { + foreach ($this->getBonus($village->owner->isBeerFestActive() ? 1 : 0) as $validCatapultTargets) { foreach ($validCatapultTargets as $buildingID) { // Check if the selected targets are on the list - if ( - ($parameters['ctar1'] == BuildingEnums::EMPTY || - $parameters['ctar1'] == $buildingID) || - ($parameters['ctar2'] == BuildingEnums::EMPTY || - $parameters['ctar2'] == -1 || - $parameters['ctar2'] == $buildingID) - ) { + if ($parameters['ctar1'] == $buildingID) { $validTargets++; } + // Check if the selected targets are on the list + // and if there are more than 20 catapults, in case of double target + if ( + ($parameters['ctar2'] ?? - 1) == -1 || + ($parameters['ctar2'] == $buildingID && + $preparedUnits['units'][8] >= 20) + ) { + $validTargets++; + } + + // If all targets are valid, break the for if ($validTargets == 2) { break; } } } - + // Check if the selected targets are valid if ($validTargets < 2) { return []; @@ -1024,7 +1034,7 @@ final class RallyPoint extends Building } // Set the hero if present - if ($parameters['units'][11] > 0) { + if ($preparedUnits['units'][11] > 0) { $units[$i] = $village->getUnits()[11]; } diff --git a/src/Entity/Attack.php b/src/Entity/Attack.php index bc9c7143..0b0bd36b 100644 --- a/src/Entity/Attack.php +++ b/src/Entity/Attack.php @@ -101,7 +101,7 @@ abstract class Attack extends Movement $this->units[10]->amount ?? 0, $this->units[11]->amount ?? 0, $this->catapultTargets[0] ?? 0, - $this->catapultTargets[1] ?? 0, + $this->catapultTargets[1] ?? -1, $this->spy ?? 0 ); diff --git a/src/Entity/BeerFest.php b/src/Entity/BeerFest.php new file mode 100644 index 00000000..79816e7c --- /dev/null +++ b/src/Entity/BeerFest.php @@ -0,0 +1,71 @@ + + * + * Author: iopietro + * + * License: GNU GPL-3.0 + * + * Copyright 2010-2018 TravianZ Team + */ + +namespace TravianZ\Entity; + +use TravianZ\Database\IDbConnection; + +/** + * @author iopietro + */ +class BeerFest +{ + /** + * @var int The base duration of a beer fest (3 days) + */ + const BASE_DURATION = 259200; + + /** + * @var int The needed resources to start a beer fest + */ + const NEEDED_RESOURCES = [3870, 1680, 215, 10900]; + + /** + * @var User The beerFest owner + */ + public $owner; + + /** + * @var IDbConnection + */ + private $db; + + public function __construct( + IDbConnection $db, + User $owner + ) { + $this->db = $db; + $this->owner = $owner; + } + + /** + * Start a beerfest + */ + public function start() + { + // Set the new beer fest time and update it on the database + $this->owner->setBeerFestEndTime(time() + self::BASE_DURATION); + $this->owner->setUserFields(['beerfest'], [$this->owner->getBeerFestEndTime()]); + } + + /** + * Get the total needed resources + * + * @return int Returns the total needed resources + */ + public function getTotalNeededResources(): int + { + return array_sum(self::NEEDED_RESOURCES); + } +} diff --git a/src/Entity/User.php b/src/Entity/User.php index bb75430a..c104cc61 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -127,6 +127,11 @@ class User */ public $selectedVillage; + /** + * @var int The beer fest end time + */ + private $beerFestTime; + /** * @var bool Determines if the User has enabled the vacation mode. */ @@ -297,8 +302,6 @@ class User $this->access = $res['access']; $this->beginnerProtectionEndTime = $res['protect']; $this->ok = $res['ok']; - $this->vacationModeEnabled = $res['vac_mode']; - $this->vacationTime = $res['vac_time']; $this->questNumber = $res['quest']; $this->maxEvasion = $res['maxevasion']; $this->selectedVillage = $res['actualvillage']; @@ -306,6 +309,9 @@ class User // Set private properties $this->sitters = [$res['sit1'], $res['sit2']]; $this->password = $res['password']; + $this->beerFestTime = $res['beerfest']; + $this->vacationModeEnabled = $res['vac_mode']; + $this->vacationTime = $res['vac_time']; // Set the User's villages $this->setVillages(); @@ -351,6 +357,34 @@ class User return $this->vacationModeEnabled && $this->vacationTime > time(); } + /** + * Check if the user is on vacation + * + * @return bool Returns true if the User is on vaction, false otherwise + */ + public function isBeerFestActive(): bool + { + return $this->beerFestTime > time(); + } + + /** + * Get the beer fest end time + * + * @return bool Returns the beer fest end time + */ + public function getBeerFestEndTime(): int + { + return $this->beerFestTime; + } + + /** + * Set the beer fest end time + */ + public function setBeerFestEndTime(int $newTime) + { + $this->beerFestTime = $newTime; + } + /** * Check if the user started the account deletion process * diff --git a/src/Factory/BuildingsFactory.php b/src/Factory/BuildingsFactory.php index 8e7be41f..0bc66200 100644 --- a/src/Factory/BuildingsFactory.php +++ b/src/Factory/BuildingsFactory.php @@ -195,16 +195,21 @@ abstract class BuildingsFactory return array_combine(range(0, 20), range(100, 300, 10)); case BuildingEnums::RALLY_POINT: return [ - 1 => [], + 1 => [ + 0 => + [ + BuildingEnums::EMPTY + ] + ], 3 => [ - 2 => + 3 => [ BuildingEnums::WAREHOUSE, BuildingEnums::GRANARY ] - ], + ], 5 => [ - 0 => + 1 => [ BuildingEnums::WOODCUTTER, BuildingEnums::CLAY_PIT, @@ -218,7 +223,7 @@ abstract class BuildingsFactory ] ], 10 => [ - 1 => + 2 => [ BuildingEnums::ACADEMY, BuildingEnums::BARRACKS, @@ -234,7 +239,7 @@ abstract class BuildingsFactory BuildingEnums::TOURNAMENT_SQUARE ], - 2 => + 3 => [ 2 => BuildingEnums::BREWERY, BuildingEnums::EMBASSY, diff --git a/src/Lang/en.php b/src/Lang/en.php index dba5e7f1..ce837e5a 100755 --- a/src/Lang/en.php +++ b/src/Lang/en.php @@ -686,6 +686,10 @@ define("PASSWORD_SENT", "If the email address exists, a new password has been se define("PASSWORD_SET_SUCCESS", "The password was set successfully."); define("NEW_PASSWORD_ERROR", "Invalid code, password or the password has already been set."); +//BEER FEST +define("BEER_FEST","Beer fest"); +define("CELEBRATION","Celebration"); + //ATTACKS ETC. define("TROOP_MOVEMENTS","Troop Movements:"); define("ARRIVING_REINF_TROOPS","Arriving reinforcing troops"); diff --git a/src/Models/BuildingModel.php b/src/Models/BuildingModel.php index f9d01c9f..1bc7f5f1 100644 --- a/src/Models/BuildingModel.php +++ b/src/Models/BuildingModel.php @@ -38,6 +38,8 @@ use TravianZ\Exceptions\InvalidParametersException; use TravianZ\Factory\BuildingsFactory; use TravianZ\Mvc\Model; use TravianZ\Utils\Generator; +use TravianZ\Data\Buildings\Brewery; +use TravianZ\Entity\BeerFest; /** * @author iopietro @@ -879,4 +881,33 @@ class BuildingModel extends Model ['villageFarmLists' => $farmLists] ); } + + /** + * Manage the brewery + * + * @param Brewery $building + * @param Village $village + * @param array $parameters + */ + public function manageBrewery(Brewery $building, Village $village, array $parameters) + { + // Check if there's an action to execute + // TODO: Don't repeat it every time + if (isset($parameters['POST']['action'])) { + $action = $parameters['POST']['action']; + if (method_exists($building, $action)) { + $results = $building->$action($village, $parameters['POST']); + } + } + + return [ + 'beerFest' => [ + 'neededResources' => BeerFest::NEEDED_RESOURCES, + 'duration' => Generator::getTimeFormat(BeerFest::BASE_DURATION), + 'error' => $village->owner->isBeerFestActive() ? + Generator::getTimeFormat($village->owner->getBeerFestEndTime() - $this->time) : + (empty($building->checkEnoughBeerFestResources($village)) ? TOO_FEW_RESOURCES : '') + ] + ]; + } } diff --git a/templates/sendUnits/attack.tpl b/templates/sendUnits/attack.tpl index a6fbf7e7..a948201d 100644 --- a/templates/sendUnits/attack.tpl +++ b/templates/sendUnits/attack.tpl @@ -69,13 +69,11 @@ {$smarty.const.DESTINATION}: - {$targetName = 'ctar1'} - {$randomTargetValue = 0} + {$targetType = 1} {include file=$smarty.const.TEMPLATES_DIR|cat:'sendUnits/catapultTargets.tpl'} {if $units[8] >= 20} - {$targetName = 'ctar2'} - {$randomTargetValue = -1} + {$targetType = 2} {include file=$smarty.const.TEMPLATES_DIR|cat:'sendUnits/catapultTargets.tpl'} {/if} diff --git a/templates/sendUnits/catapultTargets.tpl b/templates/sendUnits/catapultTargets.tpl index d8113d85..9bea3b0d 100644 --- a/templates/sendUnits/catapultTargets.tpl +++ b/templates/sendUnits/catapultTargets.tpl @@ -1,10 +1,16 @@ -{$groupNames = [$smarty.const.RESOURCES, $smarty.const.INFRASTRUCTURE, $smarty.const.MILITARY]} +{$groupNames = [1 => $smarty.const.RESOURCES, $smarty.const.INFRASTRUCTURE, $smarty.const.MILITARY]} - + {if $targetType > 1} + {/if} - + +{if !empty($catapultTargetBuildings[0])} + {foreach $catapultTargetBuildings[0] as $building} + + {/foreach} +{/if} + {foreach $groupNames as $type => $groupName} {if !empty($catapultTargetBuildings[$type])} @@ -14,4 +20,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/templates/village/buildings/35.tpl b/templates/village/buildings/35.tpl index 416ca9ef..fb880d0e 100644 --- a/templates/village/buildings/35.tpl +++ b/templates/village/buildings/35.tpl @@ -1,2 +1,4 @@ {assign var=bonusTexts value=[$smarty.const.CURRENT_BONUS, $smarty.const.BONUS_LEVEL, $smarty.const.PERCENT]} -{include file={$smarty.const.TEMPLATES_DIR}|cat:'village/buildings/showBonus.tpl'} \ No newline at end of file +{include file={$smarty.const.TEMPLATES_DIR}|cat:'village/buildings/showBonus.tpl'} +
+{include file={$smarty.const.TEMPLATES_DIR}|cat:'village/buildings/brewery/beerFest.tpl'} diff --git a/templates/village/buildings/brewery/beerFest.tpl b/templates/village/buildings/brewery/beerFest.tpl new file mode 100644 index 00000000..dbd8ad0f --- /dev/null +++ b/templates/village/buildings/brewery/beerFest.tpl @@ -0,0 +1,40 @@ +
+ + + + + + + + + + + + {if !empty($beerFest.error)} + + {else} + + {/if} + + +
{$smarty.const.CELEBRATION}{$smarty.const.ACTION}
+ +
+ {$smarty.const.LUMBER}{$beerFest['neededResources'][0]}| + {$smarty.const.CLAY}{$beerFest['neededResources'][1]}| + {$smarty.const.IRON}{$beerFest['neededResources'][2]}| + {$smarty.const.CROP}{$beerFest['neededResources'][3]}| + {$smarty.const.DURATION}{$beerFest.duration} + + {if $gold >= 3 && $isMarketplaceBuilt && $villageTotalResources >= $beerFest['totalResources']} | + + {$smarty.const.NPC_TRADE} + + {/if} +
+
{$beerFest.error} + {$smarty.const.START} +
+
\ No newline at end of file diff --git a/templates/village/buildings/research.tpl b/templates/village/buildings/research.tpl index bc1647a0..d8040256 100644 --- a/templates/village/buildings/research.tpl +++ b/templates/village/buildings/research.tpl @@ -37,7 +37,7 @@ {$research.error} {else} - {$smarty.const.RESEARCH} + {$smarty.const.RESEARCH} {/if} diff --git a/var/db/struct.sql b/var/db/struct.sql index c5ca5daa..7a98b0ae 100644 --- a/var/db/struct.sql +++ b/var/db/struct.sql @@ -1,11 +1,11 @@ -- phpMyAdmin SQL Dump --- version 3.3.9 --- http://www.phpmyadmin.net +-- version 4.7.9 +-- https://www.phpmyadmin.net/ -- -- Host: localhost --- Generation Time: Jul 21, 2011 at 02:49 AM --- Server version: 5.5.8 --- PHP Version: 5.3.5 +-- Generation Time: Sep 21, 2018 at 2:16 PM +-- Server version: 10.1.31-MariaDB +-- PHP Version: 7.0.31 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; @@ -13,7 +13,7 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!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 */; +/*!40101 SET NAMES utf8mb4 */; -- -------------------------------------------------------- @@ -22,46 +22,26 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- CREATE TABLE IF NOT EXISTS `%PREFIX%a2b` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ckey` varchar(255) NULL, - `time_check` int(11) NULL DEFAULT '0', - `to_vid` int(11) NULL, - `u1` int(11) NULL, - `u2` int(11) NULL, - `u3` int(11) NULL, - `u4` int(11) NULL, - `u5` int(11) NULL, - `u6` int(11) NULL, - `u7` int(11) NULL, - `u8` int(11) NULL, - `u9` int(11) NULL, - `u10` int(11) NULL, - `u11` int(11) NULL, - `type` smallint(1) NULL, - PRIMARY KEY (`id`), - KEY `ckey` (`ckey`(25)) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%a2b` --- - --- --- Table structure for table `%PREFIX%links` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%links` ( - `id` INT( 25 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , - `userid` INT( 25 ) NULL , - `name` VARCHAR( 50 ) NULL , - `url` VARCHAR( 150 ) NULL , - `pos` INT( 10 ) NULL, - KEY `userid-pos` (`userid`,`pos`) USING BTREE -) ENGINE = InnoDB; - --- --- Dumping data for table `%PREFIX%links` --- + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` char(10) NOT NULL DEFAULT '0', + `from` int(11) NOT NULL DEFAULT '0', + `to` int(11) NOT NULL DEFAULT '0', + `u1` int(11) NOT NULL DEFAULT '0', + `u2` int(11) NOT NULL DEFAULT '0', + `u3` int(11) NOT NULL DEFAULT '0', + `u4` int(11) NOT NULL DEFAULT '0', + `u5` int(11) NOT NULL DEFAULT '0', + `u6` int(11) NOT NULL DEFAULT '0', + `u7` int(11) NOT NULL DEFAULT '0', + `u8` int(11) NOT NULL DEFAULT '0', + `u9` int(11) NOT NULL DEFAULT '0', + `u10` int(11) NOT NULL DEFAULT '0', + `u11` int(11) NOT NULL DEFAULT '0', + `type` smallint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `ckey` (`ckey`), + KEY `from` (`from`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -70,30 +50,25 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%links` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%abdata` ( - `vref` int(11) NOT NULL, - `a1` tinyint(2) NULL DEFAULT '0', - `a2` tinyint(2) NULL DEFAULT '0', - `a3` tinyint(2) NULL DEFAULT '0', - `a4` tinyint(2) NULL DEFAULT '0', - `a5` tinyint(2) NULL DEFAULT '0', - `a6` tinyint(2) NULL DEFAULT '0', - `a7` tinyint(2) NULL DEFAULT '0', - `a8` tinyint(2) NULL DEFAULT '0', - `b1` tinyint(2) NULL DEFAULT '0', - `b2` tinyint(2) NULL DEFAULT '0', - `b3` tinyint(2) NULL DEFAULT '0', - `b4` tinyint(2) NULL DEFAULT '0', - `b5` tinyint(2) NULL DEFAULT '0', - `b6` tinyint(2) NULL DEFAULT '0', - `b7` tinyint(2) NULL DEFAULT '0', - `b8` tinyint(2) NULL DEFAULT '0', - PRIMARY KEY (`vref`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%abdata` --- - + `vref` int(11) NOT NULL, + `a1` tinyint(2) DEFAULT '0', + `a2` tinyint(2) DEFAULT '0', + `a3` tinyint(2) DEFAULT '0', + `a4` tinyint(2) DEFAULT '0', + `a5` tinyint(2) DEFAULT '0', + `a6` tinyint(2) DEFAULT '0', + `a7` tinyint(2) DEFAULT '0', + `a8` tinyint(2) DEFAULT '0', + `b1` tinyint(2) DEFAULT '0', + `b2` tinyint(2) DEFAULT '0', + `b3` tinyint(2) DEFAULT '0', + `b4` tinyint(2) DEFAULT '0', + `b5` tinyint(2) DEFAULT '0', + `b6` tinyint(2) DEFAULT '0', + `b7` tinyint(2) DEFAULT '0', + `b8` tinyint(2) DEFAULT '0', + PRIMARY KEY (`vref`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -102,7 +77,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%abdata` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%activate` ( - `id` int(255) NOT NULL AUTO_INCREMENT, + `id` int(255) NOT NULL AUTO_INCREMENT, `username` varchar(100) NOT NULL, `password` varchar(100) DEFAULT NULL, `email` varchar(255) NOT NULL, @@ -111,107 +86,12 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%activate` ( `act` varchar(10) DEFAULT NULL, `timestamp` int(11) DEFAULT '0', `location` text, - `invite` int(11) DEFAULT '0', + `invite` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Dumping data for table `%PREFIX%activate` --- - --- -------------------------------------------------------- - --- --- Table structure for table `%PREFIX%admin_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%admin_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user` text NULL, - `log` text NULL, - `time` int(25) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=80 ; - --- --- Dumping data for table `%PREFIX%admin_log` --- - - --- -------------------------------------------------------- --- --- Table structure for table `%PREFIX%allimedal` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%allimedal` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `allyid` int(11) NULL, - `categorie` int(11) NULL, - `plaats` int(11) NULL, - `week` int(11) NULL, - `points` bigint(255) NULL, - `img` varchar(255) NULL, - `del` tinyint(1) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `week` (`week`), - KEY `allyid` (`allyid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `%PREFIX%artefacts` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vref` int(11) NULL, - `owner` int(11) NULL, - `type` tinyint(2) NULL, - `size` tinyint(1) NULL, - `conquered` int(11) NULL, - `name` varchar(100) NULL, - `desc` text NULL, - `effect` varchar(100) NULL, - `img` varchar(20) NULL, - `active` tinyint(1) NULL, - `kind` tinyint(1) NULL DEFAULT '0', - `bad_effect` tinyint(1) NULL DEFAULT '0', - `effect2` tinyint(2) NULL DEFAULT '0', - `lastupdate` int(11) NULL DEFAULT '0', - `del` tinyint(1) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `owner-active` (`owner`,`active`), - KEY `vref-type-kind` (`vref`,`type`,`kind`) USING BTREE, - KEY `active-type-lastupdate` (`active`,`type`,`lastupdate`), - KEY `size-type` (`size`, `type`), - KEY `active-owner-conquered-del` (`active`, `owner`, `conquered`, `del`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Table structure for table `%PREFIX%artefacts` --- --- -------------------------------------------------------- - --- --- Table structure for `%PREFIX%artefacts_chrono` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts_chrono` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `artefactid` int(11) NULL, - `uid` int(11) NULL, - `vref` int(11) NULL, - `conqueredtime` int(11) NULL, - PRIMARY KEY (`id`), - KEY `artefactid-conqueredtime` (`artefactid`,`conqueredtime`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - --- --- Table structure for table `%PREFIX%artefacts_chrono` --- -- -------------------------------------------------------- -- @@ -219,35 +99,30 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts_chrono` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%alidata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(100) NULL, - `tag` varchar(100) NULL, - `leader` int(11) NULL, - `coor` int(11) NULL, - `advisor` int(11) NULL, - `recruiter` int(11) NULL, - `notice` text NULL, - `desc` text NULL, - `max` tinyint(2) NULL, - `ap` bigint(255) NULL DEFAULT '0', - `dp` bigint(255) NULL DEFAULT '0', - `Rc` bigint(255) NULL DEFAULT '0', - `RR` bigint(255) NULL DEFAULT '0', - `Aap` bigint(255) NULL DEFAULT '0', - `Adp` bigint(255) NULL DEFAULT '0', - `clp` bigint(255) NULL DEFAULT '0', - `oldrank` bigint(255) NULL DEFAULT '0', - `forumlink` varchar(150) NULL, - PRIMARY KEY (`id`), - KEY `tag` (`tag`), - KEY `name` (`name`), - KEY `leader` (`leader`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%alidata` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `tag` varchar(100) DEFAULT NULL, + `leader` int(11) DEFAULT NULL, + `coor` int(11) DEFAULT NULL, + `advisor` int(11) DEFAULT NULL, + `recruiter` int(11) DEFAULT NULL, + `notice` text, + `desc` text, + `max` tinyint(2) DEFAULT NULL, + `ap` bigint(255) DEFAULT '0', + `dp` bigint(255) DEFAULT '0', + `Rc` bigint(255) DEFAULT '0', + `RR` bigint(255) DEFAULT '0', + `Aap` bigint(255) DEFAULT '0', + `Adp` bigint(255) DEFAULT '0', + `clp` bigint(255) DEFAULT '0', + `oldrank` bigint(255) DEFAULT '0', + `forumlink` varchar(150) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `tag` (`tag`), + KEY `name` (`name`), + KEY `leader` (`leader`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -256,41 +131,16 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%alidata` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%ali_invite` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `alliance` int(11) NULL, - `sender` int(11) NULL, - `timestamp` int(11) NULL, - `accept` int(1) NULL, - PRIMARY KEY (`id`), - KEY `alliance-accept` (`alliance`, `accept`), - KEY `uid` (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%ali_invite` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%PREFIX%ali_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%ali_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `aid` int(11) NULL, - `comment` text NULL, - `date` int(11) NULL, - PRIMARY KEY (`id`), - KEY `aid` (`aid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%ali_log` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `uid` int(11) DEFAULT NULL, + `alliance` int(11) DEFAULT NULL, + `sender` int(11) DEFAULT NULL, + `timestamp` int(11) DEFAULT NULL, + `accept` int(1) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `alliance-accept` (`alliance`,`accept`), + KEY `uid` (`uid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -299,27 +149,89 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%ali_log` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%ali_permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `alliance` int(11) NULL, - `rank` varchar(100) NULL, - `opt1` int(1) NULL DEFAULT '0', - `opt2` int(1) NULL DEFAULT '0', - `opt3` int(1) NULL DEFAULT '0', - `opt4` int(1) NULL DEFAULT '0', - `opt5` int(1) NULL DEFAULT '0', - `opt6` int(1) NULL DEFAULT '0', - `opt7` int(1) NULL DEFAULT '0', - `opt8` int(1) NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `uid-alliance` (`uid`, `alliance`) USING BTREE, - KEY `alliance` (`alliance`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + `id` int(11) NOT NULL AUTO_INCREMENT, + `uid` int(11) DEFAULT NULL, + `alliance` int(11) DEFAULT NULL, + `rank` varchar(100) DEFAULT NULL, + `opt1` int(1) DEFAULT '0', + `opt2` int(1) DEFAULT '0', + `opt3` int(1) DEFAULT '0', + `opt4` int(1) DEFAULT '0', + `opt5` int(1) DEFAULT '0', + `opt6` int(1) DEFAULT '0', + `opt7` int(1) DEFAULT '0', + `opt8` int(1) DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `uid-alliance` (`uid`,`alliance`) USING BTREE, + KEY `alliance` (`alliance`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- -- --- Dumping data for table `%PREFIX%ali_permission` +-- Table structure for table `%PREFIX%allimedal` -- +CREATE TABLE IF NOT EXISTS `%PREFIX%allimedal` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `allyid` int(11) DEFAULT NULL, + `categorie` int(11) DEFAULT NULL, + `plaats` int(11) DEFAULT NULL, + `week` int(11) DEFAULT NULL, + `points` bigint(255) DEFAULT NULL, + `img` varchar(255) DEFAULT NULL, + `del` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `week` (`week`), + KEY `allyid` (`allyid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `%PREFIX%artefacts` +-- + +CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `vref` int(11) DEFAULT NULL, + `owner` int(11) DEFAULT NULL, + `type` tinyint(2) DEFAULT NULL, + `size` tinyint(1) DEFAULT NULL, + `conquered` int(11) DEFAULT NULL, + `name` varchar(100) DEFAULT NULL, + `desc` text, + `effect` varchar(100) DEFAULT NULL, + `img` varchar(20) DEFAULT NULL, + `active` tinyint(1) DEFAULT NULL, + `kind` tinyint(1) DEFAULT '0', + `bad_effect` tinyint(1) DEFAULT '0', + `effect2` tinyint(2) DEFAULT '0', + `lastupdate` int(11) DEFAULT '0', + `del` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `owner-active` (`owner`,`active`), + KEY `vref-type-kind` (`vref`,`type`,`kind`) USING BTREE, + KEY `active-type-lastupdate` (`active`,`type`,`lastupdate`), + KEY `size-type` (`size`,`type`), + KEY `active-owner-conquered-del` (`active`,`owner`,`conquered`,`del`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `%PREFIX%artefacts_chrono` +-- + +CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts_chrono` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `artefactid` int(11) DEFAULT NULL, + `uid` int(11) DEFAULT NULL, + `vref` int(11) DEFAULT NULL, + `conqueredtime` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `artefactid-conqueredtime` (`artefactid`,`conqueredtime`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -328,38 +240,24 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%ali_permission` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%attacks` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vref` int(11) NULL, - `t1` int(11) NULL, - `t2` int(11) NULL, - `t3` int(11) NULL, - `t4` int(11) NULL, - `t5` int(11) NULL, - `t6` int(11) NULL, - `t7` int(11) NULL, - `t8` int(11) NULL, - `t9` int(11) NULL, - `t10` int(11) NULL, - `t11` int(11) NULL, - `attack_type` tinyint(1) NULL, - `ctar1` int(11) NULL, - `ctar2` int(11) NULL, - `spy` int(11) NULL, - `b1` tinyint(1) NULL, - `b2` tinyint(1) NULL, - `b3` tinyint(1) NULL, - `b4` tinyint(1) NULL, - `b5` tinyint(1) NULL, - `b6` tinyint(1) NULL, - `b7` tinyint(1) NULL, - `b8` tinyint(1) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%attacks` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `vref` int(11) DEFAULT '0', + `u1` int(11) DEFAULT '0', + `u2` int(11) DEFAULT '0', + `u3` int(11) DEFAULT '0', + `u4` int(11) DEFAULT '0', + `u5` int(11) DEFAULT '0', + `u6` int(11) DEFAULT '0', + `u7` int(11) DEFAULT '0', + `u8` int(11) DEFAULT '0', + `u9` int(11) DEFAULT '0', + `u10` int(11) DEFAULT '0', + `u11` int(11) DEFAULT '0', + `ctar1` int(11) DEFAULT '0', + `ctar2` int(11) DEFAULT '0', + `spy` int(11) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -368,7 +266,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%attacks` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%banlist` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, `reason` varchar(30) DEFAULT NULL, @@ -378,12 +276,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%banlist` ( `active` tinyint(1) UNSIGNED DEFAULT NULL, PRIMARY KEY (`id`), KEY `active-end` (`active`,`end`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%banlist` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -392,44 +285,19 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%banlist` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%bdata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wid` int(11) NULL, - `field` tinyint(2) NULL, - `type` tinyint(2) NULL, - `loopcon` tinyint(1) NULL, - `timestamp` int(11) NULL, - `master` tinyint(1) NULL, - `level` tinyint(3) NULL, - PRIMARY KEY (`id`), - KEY `master` (`master`), - KEY `timestamp` (`timestamp`), - KEY `master-timestamp` (`master`,`timestamp`) USING BTREE, - KEY `wid` (`wid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%bdata` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%PREFIX%build_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%build_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wid` int(11) NULL, - `log` text NULL, - `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%build_log` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `wid` int(11) NOT NULL DEFAULT '0', + `field` tinyint(2) NOT NULL DEFAULT '0', + `type` tinyint(2) NOT NULL DEFAULT '0', + `timestamp` int(11) NOT NULL DEFAULT '0', + `level` tinyint(3) NOT NULL DEFAULT '0', + `sort` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `master` (`sort`), + KEY `timestamp` (`timestamp`), + KEY `master-timestamp` (`sort`,`timestamp`) USING BTREE, + KEY `wid` (`wid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -438,292 +306,199 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%build_log` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%chat` ( - `id` int(20) NOT NULL AUTO_INCREMENT, - `id_user` int(11) NULL, - `name` varchar(255) NULL, - `alli` varchar(255) NULL, - `date` varchar(255) NULL, - `msg` varchar(255) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%chat` --- - + `id` int(20) NOT NULL AUTO_INCREMENT, + `id_user` int(11) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `alli` varchar(255) DEFAULT NULL, + `date` varchar(255) DEFAULT NULL, + `msg` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%config` +-- Table structure for table `%PREFIX%config` -- CREATE TABLE IF NOT EXISTS `%PREFIX%config` ( - `lastgavemedal` int(11) NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + `lastgavemedal` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `%PREFIX%config` VALUES (0); --- --- Dumping data for table `%prefix%config` --- - - -- -------------------------------------------------------- -- --- Table structure for table `%prefix%deleting` +-- Table structure for table `%PREFIX%deleting` -- CREATE TABLE IF NOT EXISTS `%PREFIX%deleting` ( - `uid` int(11) NOT NULL, - `timestamp` int(11) NULL, - PRIMARY KEY (`uid`), - KEY `timestamp` (`timestamp`) + `uid` int(11) NOT NULL, + `timestamp` int(11) DEFAULT NULL, + PRIMARY KEY (`uid`), + KEY `timestamp` (`timestamp`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Dumping data for table `%prefix%deleting` --- - - -- -------------------------------------------------------- -- --- Table structure for table `%prefix%demolition` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%demolition` ( - `vref` int(11) NOT NULL, - `buildnumber` int(11) NULL DEFAULT '0', - `lvl` int(11) NULL DEFAULT '0', - `timetofinish` int(11) NULL, - PRIMARY KEY (`vref`), - KEY `timetofinish` (`timetofinish`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%demolition` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%diplomacy` +-- Table structure for table `%PREFIX%diplomacy` -- CREATE TABLE IF NOT EXISTS `%PREFIX%diplomacy` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `alli1` int(11) NULL, - `alli2` int(11) NULL, - `type` tinyint(1) NULL, - `accepted` tinyint(1) NULL, - PRIMARY KEY (`id`), - KEY `alli1` (`alli1`), - KEY `alli2` (`alli2`), - KEY `type-accepted` (`type`,`accepted`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; --- --- Dumping data for table `%prefix%diplomacy` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `alli1` int(11) DEFAULT NULL, + `alli2` int(11) DEFAULT NULL, + `type` tinyint(1) DEFAULT NULL, + `accepted` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `alli1` (`alli1`), + KEY `alli2` (`alli2`), + KEY `type-accepted` (`type`,`accepted`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%enforcement` +-- Table structure for table `%PREFIX%enforcement` -- CREATE TABLE IF NOT EXISTS `%PREFIX%enforcement` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `u1` int(11) NULL DEFAULT '0', - `u2` int(11) NULL DEFAULT '0', - `u3` int(11) NULL DEFAULT '0', - `u4` int(11) NULL DEFAULT '0', - `u5` int(11) NULL DEFAULT '0', - `u6` int(11) NULL DEFAULT '0', - `u7` int(11) NULL DEFAULT '0', - `u8` int(11) NULL DEFAULT '0', - `u9` int(11) NULL DEFAULT '0', - `u10` int(11) NULL DEFAULT '0', - `u11` int(11) NULL DEFAULT '0', - `u12` int(11) NULL DEFAULT '0', - `u13` int(11) NULL DEFAULT '0', - `u14` int(11) NULL DEFAULT '0', - `u15` int(11) NULL DEFAULT '0', - `u16` int(11) NULL DEFAULT '0', - `u17` int(11) NULL DEFAULT '0', - `u18` int(11) NULL DEFAULT '0', - `u19` int(11) NULL DEFAULT '0', - `u20` int(11) NULL DEFAULT '0', - `u21` int(11) NULL DEFAULT '0', - `u22` int(11) NULL DEFAULT '0', - `u23` int(11) NULL DEFAULT '0', - `u24` int(11) NULL DEFAULT '0', - `u25` int(11) NULL DEFAULT '0', - `u26` int(11) NULL DEFAULT '0', - `u27` int(11) NULL DEFAULT '0', - `u28` int(11) NULL DEFAULT '0', - `u29` int(11) NULL DEFAULT '0', - `u30` int(11) NULL DEFAULT '0', - `u31` int(11) NULL DEFAULT '0', - `u32` int(11) NULL DEFAULT '0', - `u33` int(11) NULL DEFAULT '0', - `u34` int(11) NULL DEFAULT '0', - `u35` int(11) NULL DEFAULT '0', - `u36` int(11) NULL DEFAULT '0', - `u37` int(11) NULL DEFAULT '0', - `u38` int(11) NULL DEFAULT '0', - `u39` int(11) NULL DEFAULT '0', - `u40` int(11) NULL DEFAULT '0', - `u41` int(11) NULL DEFAULT '0', - `u42` int(11) NULL DEFAULT '0', - `u43` int(11) NULL DEFAULT '0', - `u44` int(11) NULL DEFAULT '0', - `u45` int(11) NULL DEFAULT '0', - `u46` int(11) NULL DEFAULT '0', - `u47` int(11) NULL DEFAULT '0', - `u48` int(11) NULL DEFAULT '0', - `u49` int(11) NULL DEFAULT '0', - `u50` int(11) NULL DEFAULT '0', - `hero` tinyint(1) NULL DEFAULT '0', - `from` int(11) NULL DEFAULT '0', - `vref` int(11) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `vref` (`vref`), - KEY `from` (`from`,`hero`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%enforcement` --- + `id` int(11) NOT NULL AUTO_INCREMENT, + `u1` int(11) DEFAULT '0', + `u2` int(11) DEFAULT '0', + `u3` int(11) DEFAULT '0', + `u4` int(11) DEFAULT '0', + `u5` int(11) DEFAULT '0', + `u6` int(11) DEFAULT '0', + `u7` int(11) DEFAULT '0', + `u8` int(11) DEFAULT '0', + `u9` int(11) DEFAULT '0', + `u10` int(11) DEFAULT '0', + `u11` int(11) DEFAULT '0', + `from` int(11) DEFAULT '0', + `vref` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `vref` (`vref`), + KEY `from` (`from`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%farmlist` +-- Table structure for table `%PREFIX%farmlist` -- CREATE TABLE IF NOT EXISTS `%PREFIX%farmlist` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wref` int(11) NULL, - `owner` int(11) NULL, - `name` varchar(100) NULL, - PRIMARY KEY (`id`), - KEY `wref` (`wref`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%farmlist` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `from` int(11) DEFAULT NULL, + `owner` int(11) DEFAULT NULL, + `name` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `wref` (`from`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%fdata` +-- Table structure for table `%PREFIX%fdata` -- CREATE TABLE IF NOT EXISTS `%PREFIX%fdata` ( - `vref` int(11) NOT NULL, - `f1` tinyint(2) NULL DEFAULT '0', - `f1t` tinyint(2) NULL DEFAULT '0', - `f2` tinyint(2) NULL DEFAULT '0', - `f2t` tinyint(2) NULL DEFAULT '0', - `f3` tinyint(2) NULL DEFAULT '0', - `f3t` tinyint(2) NULL DEFAULT '0', - `f4` tinyint(2) NULL DEFAULT '0', - `f4t` tinyint(2) NULL DEFAULT '0', - `f5` tinyint(2) NULL DEFAULT '0', - `f5t` tinyint(2) NULL DEFAULT '0', - `f6` tinyint(2) NULL DEFAULT '0', - `f6t` tinyint(2) NULL DEFAULT '0', - `f7` tinyint(2) NULL DEFAULT '0', - `f7t` tinyint(2) NULL DEFAULT '0', - `f8` tinyint(2) NULL DEFAULT '0', - `f8t` tinyint(2) NULL DEFAULT '0', - `f9` tinyint(2) NULL DEFAULT '0', - `f9t` tinyint(2) NULL DEFAULT '0', - `f10` tinyint(2) NULL DEFAULT '0', - `f10t` tinyint(2) NULL DEFAULT '0', - `f11` tinyint(2) NULL DEFAULT '0', - `f11t` tinyint(2) NULL DEFAULT '0', - `f12` tinyint(2) NULL DEFAULT '0', - `f12t` tinyint(2) NULL DEFAULT '0', - `f13` tinyint(2) NULL DEFAULT '0', - `f13t` tinyint(2) NULL DEFAULT '0', - `f14` tinyint(2) NULL DEFAULT '0', - `f14t` tinyint(2) NULL DEFAULT '0', - `f15` tinyint(2) NULL DEFAULT '0', - `f15t` tinyint(2) NULL DEFAULT '0', - `f16` tinyint(2) NULL DEFAULT '0', - `f16t` tinyint(2) NULL DEFAULT '0', - `f17` tinyint(2) NULL DEFAULT '0', - `f17t` tinyint(2) NULL DEFAULT '0', - `f18` tinyint(2) NULL DEFAULT '0', - `f18t` tinyint(2) NULL DEFAULT '0', - `f19` tinyint(2) NULL DEFAULT '0', - `f19t` tinyint(2) NULL DEFAULT '0', - `f20` tinyint(2) NULL DEFAULT '0', - `f20t` tinyint(2) NULL DEFAULT '0', - `f21` tinyint(2) NULL DEFAULT '0', - `f21t` tinyint(2) NULL DEFAULT '0', - `f22` tinyint(2) NULL DEFAULT '0', - `f22t` tinyint(2) NULL DEFAULT '0', - `f23` tinyint(2) NULL DEFAULT '0', - `f23t` tinyint(2) NULL DEFAULT '0', - `f24` tinyint(2) NULL DEFAULT '0', - `f24t` tinyint(2) NULL DEFAULT '0', - `f25` tinyint(2) NULL DEFAULT '0', - `f25t` tinyint(2) NULL DEFAULT '0', - `f26` tinyint(2) NULL DEFAULT '0', - `f26t` tinyint(2) NULL DEFAULT '0', - `f27` tinyint(2) NULL DEFAULT '0', - `f27t` tinyint(2) NULL DEFAULT '0', - `f28` tinyint(2) NULL DEFAULT '0', - `f28t` tinyint(2) NULL DEFAULT '0', - `f29` tinyint(2) NULL DEFAULT '0', - `f29t` tinyint(2) NULL DEFAULT '0', - `f30` tinyint(2) NULL DEFAULT '0', - `f30t` tinyint(2) NULL DEFAULT '0', - `f31` tinyint(2) NULL DEFAULT '0', - `f31t` tinyint(2) NULL DEFAULT '0', - `f32` tinyint(2) NULL DEFAULT '0', - `f32t` tinyint(2) NULL DEFAULT '0', - `f33` tinyint(2) NULL DEFAULT '0', - `f33t` tinyint(2) NULL DEFAULT '0', - `f34` tinyint(2) NULL DEFAULT '0', - `f34t` tinyint(2) NULL DEFAULT '0', - `f35` tinyint(2) NULL DEFAULT '0', - `f35t` tinyint(2) NULL DEFAULT '0', - `f36` tinyint(2) NULL DEFAULT '0', - `f36t` tinyint(2) NULL DEFAULT '0', - `f37` tinyint(2) NULL DEFAULT '0', - `f37t` tinyint(2) NULL DEFAULT '0', - `f38` tinyint(2) NULL DEFAULT '0', - `f38t` tinyint(2) NULL DEFAULT '0', - `f39` tinyint(2) NULL DEFAULT '0', - `f39t` tinyint(2) NULL DEFAULT '0', - `f40` tinyint(2) NULL DEFAULT '0', - `f40t` tinyint(2) NULL DEFAULT '0', - `f99` tinyint(2) NULL DEFAULT '0', - `f99t` tinyint(2) NULL DEFAULT '0', - `wwname` varchar(100) NULL DEFAULT 'World Wonder', - `ww_lastupdate` int(11) DEFAULT NULL, - PRIMARY KEY (`vref`), - KEY `f99` (`f99`), - KEY `f99t` (`f99t`) + `vref` int(11) NOT NULL, + `f1` tinyint(2) DEFAULT '0', + `f1t` tinyint(2) DEFAULT '0', + `f2` tinyint(2) DEFAULT '0', + `f2t` tinyint(2) DEFAULT '0', + `f3` tinyint(2) DEFAULT '0', + `f3t` tinyint(2) DEFAULT '0', + `f4` tinyint(2) DEFAULT '0', + `f4t` tinyint(2) DEFAULT '0', + `f5` tinyint(2) DEFAULT '0', + `f5t` tinyint(2) DEFAULT '0', + `f6` tinyint(2) DEFAULT '0', + `f6t` tinyint(2) DEFAULT '0', + `f7` tinyint(2) DEFAULT '0', + `f7t` tinyint(2) DEFAULT '0', + `f8` tinyint(2) DEFAULT '0', + `f8t` tinyint(2) DEFAULT '0', + `f9` tinyint(2) DEFAULT '0', + `f9t` tinyint(2) DEFAULT '0', + `f10` tinyint(2) DEFAULT '0', + `f10t` tinyint(2) DEFAULT '0', + `f11` tinyint(2) DEFAULT '0', + `f11t` tinyint(2) DEFAULT '0', + `f12` tinyint(2) DEFAULT '0', + `f12t` tinyint(2) DEFAULT '0', + `f13` tinyint(2) DEFAULT '0', + `f13t` tinyint(2) DEFAULT '0', + `f14` tinyint(2) DEFAULT '0', + `f14t` tinyint(2) DEFAULT '0', + `f15` tinyint(2) DEFAULT '0', + `f15t` tinyint(2) DEFAULT '0', + `f16` tinyint(2) DEFAULT '0', + `f16t` tinyint(2) DEFAULT '0', + `f17` tinyint(2) DEFAULT '0', + `f17t` tinyint(2) DEFAULT '0', + `f18` tinyint(2) DEFAULT '0', + `f18t` tinyint(2) DEFAULT '0', + `f19` tinyint(2) DEFAULT '0', + `f19t` tinyint(2) DEFAULT '0', + `f20` tinyint(2) DEFAULT '0', + `f20t` tinyint(2) DEFAULT '0', + `f21` tinyint(2) DEFAULT '0', + `f21t` tinyint(2) DEFAULT '0', + `f22` tinyint(2) DEFAULT '0', + `f22t` tinyint(2) DEFAULT '0', + `f23` tinyint(2) DEFAULT '0', + `f23t` tinyint(2) DEFAULT '0', + `f24` tinyint(2) DEFAULT '0', + `f24t` tinyint(2) DEFAULT '0', + `f25` tinyint(2) DEFAULT '0', + `f25t` tinyint(2) DEFAULT '0', + `f26` tinyint(2) DEFAULT '0', + `f26t` tinyint(2) DEFAULT '0', + `f27` tinyint(2) DEFAULT '0', + `f27t` tinyint(2) DEFAULT '0', + `f28` tinyint(2) DEFAULT '0', + `f28t` tinyint(2) DEFAULT '0', + `f29` tinyint(2) DEFAULT '0', + `f29t` tinyint(2) DEFAULT '0', + `f30` tinyint(2) DEFAULT '0', + `f30t` tinyint(2) DEFAULT '0', + `f31` tinyint(2) DEFAULT '0', + `f31t` tinyint(2) DEFAULT '0', + `f32` tinyint(2) DEFAULT '0', + `f32t` tinyint(2) DEFAULT '0', + `f33` tinyint(2) DEFAULT '0', + `f33t` tinyint(2) DEFAULT '0', + `f34` tinyint(2) DEFAULT '0', + `f34t` tinyint(2) DEFAULT '0', + `f35` tinyint(2) DEFAULT '0', + `f35t` tinyint(2) DEFAULT '0', + `f36` tinyint(2) DEFAULT '0', + `f36t` tinyint(2) DEFAULT '0', + `f37` tinyint(2) DEFAULT '0', + `f37t` tinyint(2) DEFAULT '0', + `f38` tinyint(2) DEFAULT '0', + `f38t` tinyint(2) DEFAULT '0', + `f39` tinyint(2) DEFAULT '0', + `f39t` tinyint(2) DEFAULT '0', + `f40` tinyint(2) DEFAULT '0', + `f40t` tinyint(2) DEFAULT '0', + `f99` tinyint(2) DEFAULT '0', + `f99t` tinyint(2) DEFAULT '0', + `wwname` varchar(100) DEFAULT 'World Wonder', + `ww_lastupdate` int(11) DEFAULT NULL, + PRIMARY KEY (`vref`), + KEY `f99` (`f99`), + KEY `f99t` (`f99t`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Dumping data for table `%prefix%fdata` --- - - -- -------------------------------------------------------- -- --- Table structure for table `%prefix%forum_cat` +-- Table structure for table `%PREFIX%forum_cat` -- CREATE TABLE IF NOT EXISTS `%PREFIX%forum_cat` ( @@ -741,36 +516,26 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%forum_cat` ( KEY `display_to_alliances` (`display_to_alliances`(11)), KEY `display_to_users` (`display_to_users`(11)), KEY `sorting` (`sorting`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%forum_cat` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%forum_edit` +-- Table structure for table `%PREFIX%forum_edit` -- CREATE TABLE IF NOT EXISTS `%PREFIX%forum_edit` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `alliance` int(11) NOT NULL, - `result` varchar(255) NULL, - PRIMARY KEY (`id`), - KEY `alliance` (`alliance`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%forum_edit` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `alliance` int(11) NOT NULL, + `result` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `alliance` (`alliance`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%forum_post` +-- Table structure for table `%PREFIX%forum_post` -- CREATE TABLE IF NOT EXISTS `%PREFIX%forum_post` ( @@ -780,56 +545,46 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%forum_post` ( `owner` int(11) NOT NULL, `date` int(11) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `topic-owner` (`topic`,`owner`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%forum_post` --- - + KEY `topic-owner` (`topic`,`owner`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%forum_survey` +-- Table structure for table `%PREFIX%forum_survey` -- CREATE TABLE IF NOT EXISTS `%PREFIX%forum_survey` ( - `topic` int(11) NULL, - `title` varchar(255) NULL, - `option1` varchar(255) NULL, - `option2` varchar(255) NULL, - `option3` varchar(255) NULL, - `option4` varchar(255) NULL, - `option5` varchar(255) NULL, - `option6` varchar(255) NULL, - `option7` varchar(255) NULL, - `option8` varchar(255) NULL, - `vote1` int(11) NULL DEFAULT '0', - `vote2` int(11) NULL DEFAULT '0', - `vote3` int(11) NULL DEFAULT '0', - `vote4` int(11) NULL DEFAULT '0', - `vote5` int(11) NULL DEFAULT '0', - `vote6` int(11) NULL DEFAULT '0', - `vote7` int(11) NULL DEFAULT '0', - `vote8` int(11) NULL DEFAULT '0', - `voted` text NULL, - `ends` int(11) NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%forum_survey` --- - + `topic` int(11) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `option1` varchar(255) DEFAULT NULL, + `option2` varchar(255) DEFAULT NULL, + `option3` varchar(255) DEFAULT NULL, + `option4` varchar(255) DEFAULT NULL, + `option5` varchar(255) DEFAULT NULL, + `option6` varchar(255) DEFAULT NULL, + `option7` varchar(255) DEFAULT NULL, + `option8` varchar(255) DEFAULT NULL, + `vote1` int(11) DEFAULT '0', + `vote2` int(11) DEFAULT '0', + `vote3` int(11) DEFAULT '0', + `vote4` int(11) DEFAULT '0', + `vote5` int(11) DEFAULT '0', + `vote6` int(11) DEFAULT '0', + `vote7` int(11) DEFAULT '0', + `vote8` int(11) DEFAULT '0', + `voted` text, + `ends` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%forum_topic` +-- Table structure for table `%PREFIX%forum_topic` -- CREATE TABLE IF NOT EXISTS `%PREFIX%forum_topic` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) DEFAULT NULL, `post` longtext, `date` int(11) NOT NULL, @@ -841,333 +596,237 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%forum_topic` ( `close` tinyint(4) NOT NULL, `stick` tinyint(4) NOT NULL, PRIMARY KEY (`id`), - KEY `cat-stick` (`cat`, `stick`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%forum_topic` --- - + KEY `cat-stick` (`cat`,`stick`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%general` +-- Table structure for table `%PREFIX%general` -- CREATE TABLE IF NOT EXISTS `%PREFIX%general` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `casualties` int(11) NULL, - `time` int(11) NULL, - `shown` tinyint(1) NULL, - PRIMARY KEY (`id`), - KEY `shown` (`shown`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%general` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `casualties` int(11) DEFAULT NULL, + `time` int(11) DEFAULT NULL, + `shown` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `shown` (`shown`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%gold_fin_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%gold_fin_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wid` int(11) NULL, - `log` text NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%gold_fin_log` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%hero` +-- Table structure for table `%PREFIX%hero` -- CREATE TABLE IF NOT EXISTS `%PREFIX%hero` ( - `heroid` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `unit` smallint(2) NULL, - `name` tinytext NULL, - `wref` int(11) NULL, - `level` tinyint(3) NULL, - `points` int(3) NULL, - `experience` int(11) NULL, - `dead` tinyint(1) NULL, - `health` float(12,9) NULL, - `attack` tinyint(3) NULL, - `defence` tinyint(3) NULL, - `attackbonus` tinyint(3) NULL, - `defencebonus` tinyint(3) NULL, - `regeneration` tinyint(3) NULL, - `autoregen` int(2) NULL, - `lastupdate` int(11) NULL, - `trainingtime` int(11) NULL, - `inrevive` tinyint(1) NULL, - `intraining` tinyint(1) NULL, - PRIMARY KEY (`heroid`), - KEY `uid` (`uid`, `dead`) USING BTREE, - KEY `lastupdate` (`lastupdate`), - KEY `inrevive` (`inrevive`), - KEY `intraining` (`intraining`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; - --- --- Dumping data for table `%prefix%hero` --- - - + `heroid` int(11) NOT NULL AUTO_INCREMENT, + `uid` int(11) DEFAULT NULL, + `unit` smallint(2) DEFAULT NULL, + `name` tinytext, + `wref` int(11) DEFAULT NULL, + `level` tinyint(3) DEFAULT NULL, + `points` int(3) DEFAULT NULL, + `experience` int(11) DEFAULT NULL, + `dead` tinyint(1) DEFAULT NULL, + `health` float(12,9) DEFAULT NULL, + `attack` tinyint(3) DEFAULT NULL, + `defence` tinyint(3) DEFAULT NULL, + `attackbonus` tinyint(3) DEFAULT NULL, + `defencebonus` tinyint(3) DEFAULT NULL, + `regeneration` tinyint(3) DEFAULT NULL, + `autoregen` int(2) DEFAULT NULL, + `lastupdate` int(11) DEFAULT NULL, + `trainingtime` int(11) DEFAULT NULL, + `inrevive` tinyint(1) DEFAULT NULL, + `intraining` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`heroid`), + UNIQUE KEY `wref` (`wref`), + KEY `uid` (`uid`,`dead`) USING BTREE, + KEY `lastupdate` (`lastupdate`), + KEY `inrevive` (`inrevive`), + KEY `intraining` (`intraining`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%illegal_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%illegal_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user` int(11) NULL, - `log` text NULL, - `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%illegal_log` +-- Table structure for table `%PREFIX%links` -- +CREATE TABLE IF NOT EXISTS `%PREFIX%links` ( + `id` int(25) NOT NULL AUTO_INCREMENT, + `userid` int(25) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `url` varchar(150) DEFAULT NULL, + `pos` int(10) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `userid-pos` (`userid`,`pos`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%login_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%login_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `ip` varchar(15) NULL, - `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%login_log` +-- Table structure for table `%PREFIX%logs` -- +CREATE TABLE IF NOT EXISTS `%PREFIX%logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user` text, + `log` text, + `time` int(25) DEFAULT NULL, + `type` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%market` +-- Table structure for table `%PREFIX%market` -- CREATE TABLE IF NOT EXISTS `%PREFIX%market` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vref` int(11) NULL, - `gtype` tinyint(1) NULL, - `gamt` int(11) NULL, - `wtype` tinyint(1) NULL, - `wamt` int(11) NULL, - `accept` tinyint(1) NULL, - `maxtime` int(11) NULL, - `alliance` int(11) NULL, - `merchant` tinyint(2) NULL, - PRIMARY KEY (`id`), - KEY `vref-accept-merchant` (`vref`,`accept`,`merchant`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%market` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `vref` int(11) NOT NULL DEFAULT '0', + `offered` tinyint(1) NOT NULL DEFAULT '1', + `offeredAmount` int(11) NOT NULL DEFAULT '0', + `wanted` tinyint(1) NOT NULL DEFAULT '1', + `wantedAmount` int(11) NOT NULL DEFAULT '0', + `accept` tinyint(1) NOT NULL DEFAULT '0', + `maxtime` tinyint(2) NOT NULL DEFAULT '0', + `alliance` int(11) NOT NULL DEFAULT '0', + `merchants` tinyint(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `vref-accept-alliance` (`vref`,`accept`,`alliance`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%market_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%market_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wid` int(11) NULL, - `log` text NULL, - `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%market_log` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%mdata` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%mdata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `target` int(11) NULL, - `owner` int(11) NULL, - `topic` varchar(100) NULL, - `message` text NULL, - `viewed` tinyint(1) NULL DEFAULT '0', - `archived` tinyint(1) NULL DEFAULT '0', - `send` tinyint(1) NULL DEFAULT '0', - `time` int(11) NULL DEFAULT '0', - `deltarget` int(11) NULL DEFAULT '0', - `delowner` int(11) NULL DEFAULT '0', - `alliance` int(11) NULL DEFAULT '0', - `player` int(11) NULL DEFAULT '0', - `coor` int(11) NULL DEFAULT '0', - `report` int(11) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `target-time` (`target`,`time`) USING BTREE, - KEY `owner` (`owner`), - KEY `target-viewed` (`target`,`viewed`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%mdata` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%medal` +-- Table structure for table `%PREFIX%medal` -- CREATE TABLE IF NOT EXISTS `%PREFIX%medal` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `userid` int(11) NULL, - `categorie` int(11) NULL, - `plaats` int(11) NULL, - `week` int(11) NULL, - `points` varchar(15) NULL, - `img` varchar(10) NULL, - `del` tinyint(1) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `week` (`week`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%medal` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `userid` int(11) DEFAULT NULL, + `categorie` int(11) DEFAULT NULL, + `plaats` int(11) DEFAULT NULL, + `week` int(11) DEFAULT NULL, + `points` varchar(15) DEFAULT NULL, + `img` varchar(10) DEFAULT NULL, + `del` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `week` (`week`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%movement` +-- Table structure for table `%PREFIX%messages` +-- + +CREATE TABLE IF NOT EXISTS `%PREFIX%messages` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `target` int(11) DEFAULT NULL, + `owner` int(11) DEFAULT NULL, + `topic` varchar(100) DEFAULT NULL, + `message` text, + `viewed` tinyint(1) DEFAULT '0', + `archived` tinyint(1) DEFAULT '0', + `send` tinyint(1) DEFAULT '0', + `time` int(11) DEFAULT '0', + `deltarget` int(11) DEFAULT '0', + `delowner` int(11) DEFAULT '0', + `alliance` int(11) DEFAULT '0', + `player` int(11) DEFAULT '0', + `coor` int(11) DEFAULT '0', + `report` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `target-time` (`target`,`time`) USING BTREE, + KEY `owner` (`owner`), + KEY `target-viewed` (`target`,`viewed`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `%PREFIX%movement` -- CREATE TABLE IF NOT EXISTS `%PREFIX%movement` ( `moveid` int(11) NOT NULL AUTO_INCREMENT, - `sort_type` tinyint(4) DEFAULT '0', - `from` int(11) DEFAULT '0', - `to` int(11) DEFAULT '0', - `ref` int(11) DEFAULT '0', - `ref2` int(11) DEFAULT '0', - `starttime` int(11) DEFAULT '0', - `endtime` int(11) DEFAULT '0', - `proc` tinyint(1) DEFAULT '0', - `send` tinyint(1) DEFAULT NULL, - `wood` int(11) DEFAULT NULL, - `clay` int(11) DEFAULT NULL, - `iron` int(11) DEFAULT NULL, - `crop` int(11) DEFAULT NULL, + `from` int(11) NOT NULL DEFAULT '0', + `to` int(11) NOT NULL DEFAULT '0', + `ref` int(11) NOT NULL DEFAULT '0', + `starttime` int(11) NOT NULL DEFAULT '0', + `endtime` int(11) NOT NULL DEFAULT '0', + `proc` tinyint(1) NOT NULL DEFAULT '0', + `merchants` tinyint(1) NOT NULL DEFAULT '0', + `repetitions` tinyint(1) NOT NULL DEFAULT '0', + `wood` int(11) NOT NULL DEFAULT '0', + `clay` int(11) NOT NULL DEFAULT '0', + `iron` int(11) NOT NULL DEFAULT '0', + `crop` int(11) NOT NULL DEFAULT '0', + `type` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`moveid`), KEY `ref` (`ref`), - KEY `from-proc-sort_type` (`from`,`proc`,`sort_type`), - KEY `proc-sort_type-endtime` (`proc`,`sort_type`,`endtime`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%movement` --- - + KEY `proc-endtime` (`proc`,`endtime`) USING BTREE, + KEY `from-proc` (`from`,`proc`) USING BTREE, + KEY `to` (`to`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%ndata` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%ndata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `toWref` int(11) NULL, - `ally` int(11) NULL, - `topic` text NULL, - `ntype` tinyint(1) NULL, - `data` text NULL, - `time` int(11) NULL, - `viewed` tinyint(1) NULL, - `archive` tinyint(1) NULL DEFAULT '0', - `del` tinyint(1) NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `time` (`time`), - KEY `uid-time` (`uid`,`time`) USING BTREE, - KEY `del` (`del`), - KEY `toWref` (`toWref`), - KEY `uid-viewed` (`uid`,`viewed`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%ndata` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%odata` +-- Table structure for table `%PREFIX%odata` -- CREATE TABLE IF NOT EXISTS `%PREFIX%odata` ( - `wref` int(11) NOT NULL, - `type` tinyint(2) NULL, - `conqured` int(11) NULL, - `wood` int(11) NULL, - `iron` int(11) NULL, - `clay` int(11) NULL, - `maxstore` int(11) NULL, - `crop` int(11) NULL, - `maxcrop` int(11) NULL, - `lastupdated` int(11) NULL, - `lastupdated2` int(11) NULL, - `loyalty` float(9,6) NULL DEFAULT '100', - `owner` int(11) NULL DEFAULT '2', - `name` varchar(32) NULL DEFAULT 'Unoccupied Oasis', - `high` tinyint(1) NULL, - PRIMARY KEY (`wref`), - KEY `lastupdated2` (`lastupdated2`) USING BTREE, - KEY `conqured` (`conqured`), - KEY `wood` (`wood`), - KEY `iron` (`iron`), - KEY `clay` (`clay`), - KEY `crop` (`crop`), - KEY `loyalty` (`loyalty`), - KEY `maxcrop` (`maxcrop`), - KEY `maxstore` (`maxstore`) + `wref` int(11) NOT NULL, + `type` tinyint(2) DEFAULT NULL, + `conquered` int(11) DEFAULT NULL, + `wood` int(11) DEFAULT NULL, + `iron` int(11) DEFAULT NULL, + `clay` int(11) DEFAULT NULL, + `maxstore` int(11) DEFAULT NULL, + `crop` int(11) DEFAULT NULL, + `maxcrop` int(11) DEFAULT NULL, + `lastupdated` int(11) DEFAULT NULL, + `lastupdated2` int(11) DEFAULT NULL, + `loyalty` float(9,6) DEFAULT '100.000000', + `owner` int(11) DEFAULT '2', + `name` varchar(32) DEFAULT 'Unoccupied Oasis', + `high` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`wref`), + KEY `lastupdated2` (`lastupdated2`) USING BTREE, + KEY `wood` (`wood`), + KEY `iron` (`iron`), + KEY `clay` (`clay`), + KEY `crop` (`crop`), + KEY `loyalty` (`loyalty`), + KEY `maxcrop` (`maxcrop`), + KEY `maxstore` (`maxstore`), + KEY `conquered` (`conquered`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- + -- --- Dumping data for table `%prefix%odata` +-- Table structure for table `%PREFIX%password` -- +CREATE TABLE IF NOT EXISTS `%PREFIX%password` ( + `uid` int(11) NOT NULL, + `npw` varchar(100) DEFAULT NULL, + `cpw` varchar(100) DEFAULT NULL, + `used` tinyint(1) DEFAULT '0', + `timestamp` int(11) DEFAULT '0', + PRIMARY KEY (`uid`), + KEY `used` (`used`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- -------------------------------------------------------- -- @@ -1175,301 +834,161 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%odata` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%prisoners` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wref` int(11) NULL, - `from` int(11) NULL, - `t1` int(11) NULL, - `t2` int(11) NULL, - `t3` int(11) NULL, - `t4` int(11) NULL, - `t5` int(11) NULL, - `t6` int(11) NULL, - `t7` int(11) NULL, - `t8` int(11) NULL, - `t9` int(11) NULL, - `t10` int(11) NULL, - `t11` int(11) NULL, - PRIMARY KEY (`id`), - KEY `wref` (`wref`), - KEY `from` (`from`,`t11`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%PREFIX%prisoners` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `vref` int(11) DEFAULT NULL, + `from` int(11) DEFAULT NULL, + `u1` int(11) DEFAULT '0', + `u2` int(11) DEFAULT '0', + `u3` int(11) DEFAULT '0', + `u4` int(11) DEFAULT '0', + `u5` int(11) DEFAULT '0', + `u6` int(11) DEFAULT '0', + `u7` int(11) DEFAULT '0', + `u8` int(11) DEFAULT '0', + `u9` int(11) DEFAULT '0', + `u10` int(11) DEFAULT '0', + `u11` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `wref` (`vref`), + KEY `from` (`from`,`u11`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%raidlist` +-- Table structure for table `%PREFIX%raidlist` -- CREATE TABLE IF NOT EXISTS `%PREFIX%raidlist` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `lid` int(11) NULL, - `towref` int(11) NULL, - `x` int(11) NULL, - `y` int(11) NULL, - `distance` FLOAT NULL DEFAULT '0', - `t1` int(11) NULL, - `t2` int(11) NULL, - `t3` int(11) NULL, - `t4` int(11) NULL, - `t5` int(11) NULL, - `t6` int(11) NULL, - PRIMARY KEY (`id`), - KEY `lid-distance` (`lid`, `distance`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%raidlist` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `lid` int(11) NOT NULL DEFAULT '0', + `to` int(11) NOT NULL DEFAULT '0', + `u1` int(11) NOT NULL DEFAULT '0', + `u2` int(11) NOT NULL DEFAULT '0', + `u3` int(11) NOT NULL DEFAULT '0', + `u4` int(11) NOT NULL DEFAULT '0', + `u5` int(11) NOT NULL DEFAULT '0', + `u6` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `lid-distance` (`lid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%research` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%research` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vref` int(11) NULL, - `tech` varchar(3) NULL, - `timestamp` int(11) NULL, - PRIMARY KEY (`id`), - KEY `vref` (`vref`), - KEY `timestamp` (`timestamp`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%research` +-- Table structure for table `%PREFIX%reports` -- +CREATE TABLE IF NOT EXISTS `%PREFIX%reports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `owner` int(11) DEFAULT NULL, + `from` int(11) NOT NULL, + `to` int(11) DEFAULT NULL, + `ally` int(11) DEFAULT NULL, + `topic` text, + `type` tinyint(1) DEFAULT NULL, + `data` text, + `time` int(11) DEFAULT NULL, + `viewed` tinyint(1) DEFAULT '0', + `archived` tinyint(1) DEFAULT '0', + `deleted` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `time` (`time`), + KEY `del` (`deleted`), + KEY `owner-time` (`owner`,`time`) USING BTREE, + KEY `to` (`to`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%route` +-- Table structure for table `%PREFIX%route` -- CREATE TABLE IF NOT EXISTS `%PREFIX%route` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NULL, - `wid` int(11) NULL, - `from` int(11) NULL, - `wood` int(5) NULL, - `clay` int(5) NULL, - `iron` int(5) NULL, - `crop` int(5) NULL, - `start` tinyint(2) NULL, - `deliveries` tinyint(1) NULL, - `merchant` int(11) NULL, - `timestamp` int(11) NULL, - `timeleft` int(11) NULL, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `wid` (`wid`), - KEY `timestamp` (`timestamp`), - KEY `timeleft` (`timeleft`), - KEY `uid-timestamp` (`uid`, `timestamp`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%route` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `uid` int(11) NOT NULL DEFAULT '0', + `from` int(11) NOT NULL DEFAULT '0', + `to` int(11) NOT NULL DEFAULT '0', + `wood` int(5) NOT NULL DEFAULT '0', + `clay` int(5) NOT NULL DEFAULT '0', + `iron` int(5) NOT NULL DEFAULT '0', + `crop` int(5) NOT NULL DEFAULT '0', + `start` tinyint(2) NOT NULL DEFAULT '0', + `deliveries` tinyint(1) NOT NULL DEFAULT '0', + `timestamp` int(11) NOT NULL DEFAULT '0', + `timeleft` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `uid` (`uid`), + KEY `timestamp` (`timestamp`), + KEY `timeleft` (`timeleft`), + KEY `uid-timestamp` (`uid`,`timestamp`), + KEY `from` (`from`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%send` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%send` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wood` int(11) NULL, - `clay` int(11) NULL, - `iron` int(11) NULL, - `crop` int(11) NULL, - `merchant` tinyint(2) NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%send` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%tdata` +-- Table structure for table `%PREFIX%tdata` -- CREATE TABLE IF NOT EXISTS `%PREFIX%tdata` ( - `vref` int(11) NOT NULL, - `t2` tinyint(1) NULL DEFAULT '0', - `t3` tinyint(1) NULL DEFAULT '0', - `t4` tinyint(1) NULL DEFAULT '0', - `t5` tinyint(1) NULL DEFAULT '0', - `t6` tinyint(1) NULL DEFAULT '0', - `t7` tinyint(1) NULL DEFAULT '0', - `t8` tinyint(1) NULL DEFAULT '0', - `t9` tinyint(1) NULL DEFAULT '0', - `t12` tinyint(1) NULL DEFAULT '0', - `t13` tinyint(1) NULL DEFAULT '0', - `t14` tinyint(1) NULL DEFAULT '0', - `t15` tinyint(1) NULL DEFAULT '0', - `t16` tinyint(1) NULL DEFAULT '0', - `t17` tinyint(1) NULL DEFAULT '0', - `t18` tinyint(1) NULL DEFAULT '0', - `t19` tinyint(1) NULL DEFAULT '0', - `t22` tinyint(1) NULL DEFAULT '0', - `t23` tinyint(1) NULL DEFAULT '0', - `t24` tinyint(1) NULL DEFAULT '0', - `t25` tinyint(1) NULL DEFAULT '0', - `t26` tinyint(1) NULL DEFAULT '0', - `t27` tinyint(1) NULL DEFAULT '0', - `t28` tinyint(1) NULL DEFAULT '0', - `t29` tinyint(1) NULL DEFAULT '0', - `t32` tinyint(1) NULL DEFAULT '0', - `t33` tinyint(1) NULL DEFAULT '0', - `t34` tinyint(1) NULL DEFAULT '0', - `t35` tinyint(1) NULL DEFAULT '0', - `t36` tinyint(1) NULL DEFAULT '0', - `t37` tinyint(1) NULL DEFAULT '0', - `t38` tinyint(1) NULL DEFAULT '0', - `t39` tinyint(1) NULL DEFAULT '0', - `t42` tinyint(1) NULL DEFAULT '0', - `t43` tinyint(1) NULL DEFAULT '0', - `t44` tinyint(1) NULL DEFAULT '0', - `t45` tinyint(1) NULL DEFAULT '0', - `t46` tinyint(1) NULL DEFAULT '0', - `t47` tinyint(1) NULL DEFAULT '0', - `t48` tinyint(1) NULL DEFAULT '0', - `t49` tinyint(1) NULL DEFAULT '0', - PRIMARY KEY (`vref`) + `vref` int(11) NOT NULL, + `t2` int(11) DEFAULT '0', + `t3` int(11) DEFAULT '0', + `t4` int(11) DEFAULT '0', + `t5` int(11) DEFAULT '0', + `t6` int(11) DEFAULT '0', + `t7` int(11) DEFAULT '0', + `t8` int(11) DEFAULT '0', + `t9` int(11) DEFAULT '0', + PRIMARY KEY (`vref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Dumping data for table `%prefix%tdata` --- - - -- -------------------------------------------------------- -- --- Table structure for table `%prefix%tech_log` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%tech_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `wid` int(11) NULL, - `log` text NULL, - `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%tech_log` --- - - --- -------------------------------------------------------- - --- --- Table structure for table `%prefix%training` +-- Table structure for table `%PREFIX%training` -- CREATE TABLE IF NOT EXISTS `%PREFIX%training` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vref` int(11) NULL, - `unit` tinyint(2) NULL, - `amt` int(11) NULL, - `pop` int(11) NULL, - `timestamp` int(11) NULL, - `eachtime` int(11) NULL, - `timestamp2` int(11) NULL, - PRIMARY KEY (`id`), - KEY `vref` (`vref`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%training` --- - + `id` int(11) NOT NULL AUTO_INCREMENT, + `vref` int(11) DEFAULT '0', + `unit` tinyint(2) DEFAULT '0', + `amount` int(11) DEFAULT '0', + `eachtime` int(11) DEFAULT '0', + `lasttrainedtime` int(11) DEFAULT '0', + `finishtime` int(11) NOT NULL DEFAULT '0', + `great` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `vref` (`vref`), + KEY `great` (`great`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%units` +-- Table structure for table `%PREFIX%units` -- CREATE TABLE IF NOT EXISTS `%PREFIX%units` ( - `vref` int(11) NOT NULL, - `u1` int(11) NULL DEFAULT '0', - `u2` int(11) NULL DEFAULT '0', - `u3` int(11) NULL DEFAULT '0', - `u4` int(11) NULL DEFAULT '0', - `u5` int(11) NULL DEFAULT '0', - `u6` int(11) NULL DEFAULT '0', - `u7` int(11) NULL DEFAULT '0', - `u8` int(11) NULL DEFAULT '0', - `u9` int(11) NULL DEFAULT '0', - `u10` int(11) NULL DEFAULT '0', - `u11` int(11) NULL DEFAULT '0', - `u12` int(11) NULL DEFAULT '0', - `u13` int(11) NULL DEFAULT '0', - `u14` int(11) NULL DEFAULT '0', - `u15` int(11) NULL DEFAULT '0', - `u16` int(11) NULL DEFAULT '0', - `u17` int(11) NULL DEFAULT '0', - `u18` int(11) NULL DEFAULT '0', - `u19` int(11) NULL DEFAULT '0', - `u20` int(11) NULL DEFAULT '0', - `u21` int(11) NULL DEFAULT '0', - `u22` int(11) NULL DEFAULT '0', - `u23` int(11) NULL DEFAULT '0', - `u24` int(11) NULL DEFAULT '0', - `u25` int(11) NULL DEFAULT '0', - `u26` int(11) NULL DEFAULT '0', - `u27` int(11) NULL DEFAULT '0', - `u28` int(11) NULL DEFAULT '0', - `u29` int(11) NULL DEFAULT '0', - `u30` int(11) NULL DEFAULT '0', - `u31` int(11) NULL DEFAULT '0', - `u32` int(11) NULL DEFAULT '0', - `u33` int(11) NULL DEFAULT '0', - `u34` int(11) NULL DEFAULT '0', - `u35` int(11) NULL DEFAULT '0', - `u36` int(11) NULL DEFAULT '0', - `u37` int(11) NULL DEFAULT '0', - `u38` int(11) NULL DEFAULT '0', - `u39` int(11) NULL DEFAULT '0', - `u40` int(11) NULL DEFAULT '0', - `u41` int(11) NULL DEFAULT '0', - `u42` int(11) NULL DEFAULT '0', - `u43` int(11) NULL DEFAULT '0', - `u44` int(11) NULL DEFAULT '0', - `u45` int(11) NULL DEFAULT '0', - `u46` int(11) NULL DEFAULT '0', - `u47` int(11) NULL DEFAULT '0', - `u48` int(11) NULL DEFAULT '0', - `u49` int(11) NULL DEFAULT '0', - `u50` int(11) NULL DEFAULT '0', - `u99` int(11) NULL DEFAULT '0', - `u99o` int(11) NULL DEFAULT '0', - `hero` int(11) NULL DEFAULT '0', - PRIMARY KEY (`vref`) + `vref` int(11) NOT NULL, + `u1` int(11) DEFAULT '0', + `u2` int(11) DEFAULT '0', + `u3` int(11) DEFAULT '0', + `u4` int(11) DEFAULT '0', + `u5` int(11) DEFAULT '0', + `u6` int(11) DEFAULT '0', + `u7` int(11) DEFAULT '0', + `u8` int(11) DEFAULT '0', + `u9` int(11) DEFAULT '0', + `u10` int(11) DEFAULT '0', + `u11` int(11) DEFAULT '0', + `u12` int(11) DEFAULT '0', + `u13` int(11) DEFAULT '0', + PRIMARY KEY (`vref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- --- Dumping data for table `%prefix%units` --- - - -- -------------------------------------------------------- -- @@ -1477,7 +996,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%units` ( -- CREATE TABLE IF NOT EXISTS `%PREFIX%users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(100) DEFAULT NULL, `password` varchar(100) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, @@ -1500,6 +1019,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` ( `alliance` int(11) DEFAULT '0', `act` varchar(10) DEFAULT NULL, `timestamp` int(11) DEFAULT '0', + `beerfest` int(11) NOT NULL DEFAULT '0', `ap` int(11) DEFAULT '0', `apall` int(11) DEFAULT '0', `dp` int(11) DEFAULT '0', @@ -1517,48 +1037,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` ( `oldrank` bigint(255) DEFAULT '0', `regtime` int(11) DEFAULT '0', `invited` int(11) DEFAULT '0', - `friend0` int(11) DEFAULT '0', - `friend1` int(11) DEFAULT '0', - `friend2` int(11) DEFAULT '0', - `friend3` int(11) DEFAULT '0', - `friend4` int(11) DEFAULT '0', - `friend5` int(11) DEFAULT '0', - `friend6` int(11) DEFAULT '0', - `friend7` int(11) DEFAULT '0', - `friend8` int(11) DEFAULT '0', - `friend9` int(11) DEFAULT '0', - `friend10` int(11) DEFAULT '0', - `friend11` int(11) DEFAULT '0', - `friend12` int(11) DEFAULT '0', - `friend13` int(11) DEFAULT '0', - `friend14` int(11) DEFAULT '0', - `friend15` int(11) DEFAULT '0', - `friend16` int(11) DEFAULT '0', - `friend17` int(11) DEFAULT '0', - `friend18` int(11) DEFAULT '0', - `friend19` int(11) DEFAULT '0', - `friend0wait` int(11) DEFAULT '0', - `friend1wait` int(11) DEFAULT '0', - `friend2wait` int(11) DEFAULT '0', - `friend3wait` int(11) DEFAULT '0', - `friend4wait` int(11) DEFAULT '0', - `friend5wait` int(11) DEFAULT '0', - `friend6wait` int(11) DEFAULT '0', - `friend7wait` int(11) DEFAULT '0', - `friend8wait` int(11) DEFAULT '0', - `friend9wait` int(11) DEFAULT '0', - `friend10wait` int(11) DEFAULT '0', - `friend11wait` int(11) DEFAULT '0', - `friend12wait` int(11) DEFAULT '0', - `friend13wait` int(11) DEFAULT '0', - `friend14wait` int(11) DEFAULT '0', - `friend15wait` int(11) DEFAULT '0', - `friend16wait` int(11) DEFAULT '0', - `friend17wait` int(11) DEFAULT '0', - `friend18wait` int(11) DEFAULT '0', - `friend19wait` int(11) DEFAULT '0', `maxevasion` mediumint(3) DEFAULT '0', - `actualvillage` bigint(20) DEFAULT NULL, + `actualvillage` bigint(20) DEFAULT '0', `vac_time` varchar(255) DEFAULT '0', `vac_mode` int(2) DEFAULT '0', `vactwoweeks` varchar(255) DEFAULT '0', @@ -1574,127 +1054,77 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` ( KEY `sit1` (`sit1`), KEY `sit2` (`sit2`), KEY `gold` (`gold`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; - --- --- Dumping data for table `%prefix%users` --- - +) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `%PREFIX%users` (`id`, `username`, `password`, `email`, `tribe`, `access`, `gold`, `gender`, `birthday`, `location`, `desc1`, `desc2`, `plus`, `b1`, `b2`, `b3`, `b4`, `sit1`, `sit2`, `alliance`, `act`, `timestamp`, `ap`, `apall`, `dp`, `dpall`, `protect`, `quest`, `gpack`, `cp`, `lastupdate`, `RR`, `Rc`, `ok`) VALUES -(5, 'Multihunter', '', 'multihunter@travianz.game', 1, 9, 0, 0, '1970-01-01', '', '[#MH]', '[#MULTIHUNTER]', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0), -(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0), -(2, 'Nature', '', 'nature@travianz.game', 4, 2, 0, 0, '1970-01-01', '', '[#NATURE]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0), -(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '[#TASKMASTER]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0); +(5, 'Multihunter', '', 'multihunter@travianz.game', 1, 9, 0, 0, '1970-01-01', '', '[#MH]', '[#MULTIHUNTER]', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 0, 0, 0, 0, 0), +(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 0, 0, 0, 0, 0), +(2, 'Nature', '', 'nature@travianz.game', 4, 2, 0, 0, '1970-01-01', '', '[#NATURE]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 0, 0, 0, 0, 0), +(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '[#TASKMASTER]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 0, 0, 0, 0, 0); -- -------------------------------------------------------- -- --- Table structure for table `%prefix%vdata` +-- Table structure for table `%PREFIX%vdata` -- CREATE TABLE IF NOT EXISTS `%PREFIX%vdata` ( -`wref` int(11) NOT NULL, -`owner` int(11) NULL, -`name` varchar(100) NULL, -`capital` tinyint(1) NULL, -`pop` int(11) NULL, -`cp` int(11) NULL, -`celebration` int(11) NULL DEFAULT '0', -`type` int(11) NULL DEFAULT '0', -`wood` float(12,2) NULL, -`clay` float(12,2) NULL, -`iron` float(12,2) NULL, -`maxstore` int(11) NULL, -`crop` float(12,2) NULL, -`maxcrop` int(11) NULL, -`lastupdate` int(11) NULL, -`lastupdate2` int(11) NULL DEFAULT '0', -`loyalty` float(9,6) NULL DEFAULT '100', -`exp1` int(11) NULL DEFAULT '0', -`exp2` int(11) NULL DEFAULT '0', -`exp3` int(11) NULL DEFAULT '0', -`created` int(11) NULL, -`natar` tinyint(1) NULL DEFAULT '0', -`starv` int(11) NULL DEFAULT '0', -`starvupdate` int(11) NULL DEFAULT '0', -`evasion` tinyint(1) NULL DEFAULT '0', -PRIMARY KEY (`wref`), -KEY `owner-capital-pop` (`owner`,`capital`,`pop`), -KEY `maxstore` (`maxstore`), -KEY `maxcrop` (`maxcrop`), -KEY `celebration` (`celebration`), -KEY `wood` (`wood`), -KEY `clay` (`clay`), -KEY `iron` (`iron`), -KEY `crop` (`crop`), -KEY `starv` (`starv`), -KEY `loyalty` (`loyalty`), -KEY `exp1` (`exp1`), -KEY `exp2` (`exp2`), -KEY `exp3` (`exp3`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%vdata` --- - + `wref` int(11) NOT NULL, + `owner` int(11) NOT NULL DEFAULT '5', + `name` varchar(100) DEFAULT NULL, + `capital` tinyint(1) NOT NULL DEFAULT '0', + `pop` int(11) NOT NULL DEFAULT '2', + `cp` int(11) NOT NULL DEFAULT '0', + `celebration` int(11) NOT NULL DEFAULT '0', + `type` int(11) NOT NULL DEFAULT '3', + `wood` float(12,2) NOT NULL DEFAULT '0.00', + `clay` float(12,2) NOT NULL DEFAULT '0.00', + `iron` float(12,2) NOT NULL DEFAULT '0.00', + `maxstore` int(11) NOT NULL DEFAULT '0', + `crop` float(12,2) NOT NULL DEFAULT '0.00', + `maxcrop` int(11) NOT NULL DEFAULT '0', + `lastupdate` int(11) NOT NULL DEFAULT '0', + `lastupdate2` int(11) NOT NULL DEFAULT '0', + `loyalty` float(9,6) NOT NULL DEFAULT '100.000000', + `exp1` int(11) NOT NULL DEFAULT '0', + `exp2` int(11) NOT NULL DEFAULT '0', + `exp3` int(11) NOT NULL DEFAULT '0', + `created` int(11) NOT NULL DEFAULT '0', + `natar` tinyint(1) NOT NULL DEFAULT '0', + `starv` int(11) NOT NULL DEFAULT '0', + `starvupdate` int(11) NOT NULL DEFAULT '0', + `evasion` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`wref`), + KEY `owner-capital-pop` (`owner`,`capital`,`pop`), + KEY `maxstore` (`maxstore`), + KEY `maxcrop` (`maxcrop`), + KEY `celebration` (`celebration`), + KEY `wood` (`wood`), + KEY `clay` (`clay`), + KEY `iron` (`iron`), + KEY `crop` (`crop`), + KEY `starv` (`starv`), + KEY `loyalty` (`loyalty`), + KEY `exp1` (`exp1`), + KEY `exp2` (`exp2`), + KEY `exp3` (`exp3`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- --- Table structure for table `%prefix%wdata` +-- Table structure for table `%PREFIX%wdata` -- CREATE TABLE IF NOT EXISTS `%PREFIX%wdata` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `fieldtype` tinyint(2) NULL, - `oasistype` tinyint(2) NULL, - `x` int(11) NULL, - `y` int(11) NULL, - `occupied` tinyint(1) NULL, - `image` varchar(3) NULL, - PRIMARY KEY (`id`), - KEY `occupied` (`occupied`), - KEY `fieldtype` (`fieldtype`), - KEY `x-y` (`x`, `y`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- --- Dumping data for table `%prefix%wdata` --- - --- -------------------------------------------------------- --- --- Table structure for table `%prefix%password` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%password` ( - `uid` int(11) NOT NULL, - `npw` varchar(100) NULL, - `cpw` varchar(100) NULL, - `used` tinyint(1) NULL DEFAULT '0', - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; - --- --- Dumping data for table `%prefix%password` --- - --- -------------------------------------------------------- --- --- Table structure for table `%prefix%ww_attacks` --- - -CREATE TABLE IF NOT EXISTS `%PREFIX%ww_attacks` ( - `vid` int(25) DEFAULT NULL, - `attack_time` int(11) DEFAULT NULL, - KEY `attack_time` (`attack_time`), - KEY `vid` (`vid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; - --- --- Dumping data for table `%prefix%password` --- - --- -------------------------------------------------------- + `id` int(11) NOT NULL AUTO_INCREMENT, + `fieldtype` tinyint(2) DEFAULT NULL, + `oasestype` tinyint(2) DEFAULT NULL, + `x` int(11) DEFAULT NULL, + `y` int(11) DEFAULT NULL, + `occupied` tinyint(1) DEFAULT NULL, + `image` varchar(3) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `occupied` (`occupied`), + KEY `fieldtype` (`fieldtype`), + KEY `x-y` (`x`,`y`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8;