Guest User

exile.sql

a guest
Dec 21st, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 14.25 KB | None | 0 0
  1. /*
  2. Navicat MySQL Data Transfer
  3.  
  4. Source Server         : SERVER
  5. Source Server Version : 50715
  6. Source Host           : 127.0.0.1:3306
  7. Source Database       : exile
  8.  
  9. Target Server Type    : MYSQL
  10. Target Server Version : 50715
  11. File Encoding         : 65001
  12.  
  13. Date: 2016-12-21 14:32:23
  14. */
  15.  
  16. SET FOREIGN_KEY_CHECKS=0;
  17.  
  18. -- ----------------------------
  19. -- Table structure for account
  20. -- ----------------------------
  21. DROP TABLE IF EXISTS `account`;
  22. CREATE TABLE `account` (
  23.   `uid` varchar(32) NOT NULL,
  24.   `clan_id` int(11) unsigned DEFAULT NULL,
  25.   `name` varchar(64) NOT NULL,
  26.   `score` int(11) NOT NULL DEFAULT '0',
  27.   `kills` int(11) unsigned NOT NULL DEFAULT '0',
  28.   `killsM` int(11) unsigned NOT NULL DEFAULT '0',
  29.   `zedkills` int(11) unsigned NOT NULL DEFAULT '0',
  30.   `deaths` int(11) unsigned NOT NULL DEFAULT '0',
  31.   `locker` int(11) NOT NULL DEFAULT '50000',
  32.   `first_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  33.   `last_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  34.   `last_disconnect_at` datetime DEFAULT NULL,
  35.   `last_reward_at` datetime DEFAULT '0000-00-00 00:00:00',
  36.   `total_connections` int(11) unsigned NOT NULL DEFAULT '1',
  37.   `whitelisted` int(1) unsigned NOT NULL DEFAULT '0',
  38.   PRIMARY KEY (`uid`),
  39.   KEY `clan_id` (`clan_id`) USING BTREE,
  40.   CONSTRAINT `account_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE SET NULL
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  42.  
  43. -- ----------------------------
  44. -- Table structure for clan
  45. -- ----------------------------
  46. DROP TABLE IF EXISTS `clan`;
  47. CREATE TABLE `clan` (
  48.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  49.   `name` varchar(64) NOT NULL,
  50.   `leader_uid` varchar(32) NOT NULL,
  51.   `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  52.   PRIMARY KEY (`id`),
  53.   KEY `leader_uid` (`leader_uid`) USING BTREE,
  54.   CONSTRAINT `clan_ibfk_1` FOREIGN KEY (`leader_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
  55. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
  56.  
  57. -- ----------------------------
  58. -- Table structure for clan_map_marker
  59. -- ----------------------------
  60. DROP TABLE IF EXISTS `clan_map_marker`;
  61. CREATE TABLE `clan_map_marker` (
  62.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  63.   `clan_id` int(11) unsigned NOT NULL,
  64.   `markerType` tinyint(4) NOT NULL DEFAULT '-1',
  65.   `positionArr` text NOT NULL,
  66.   `color` varchar(255) NOT NULL,
  67.   `icon` varchar(255) NOT NULL,
  68.   `iconSize` float unsigned NOT NULL,
  69.   `label` varchar(255) NOT NULL,
  70.   `labelSize` float unsigned NOT NULL,
  71.   PRIMARY KEY (`id`),
  72.   KEY `clan_id` (`clan_id`) USING BTREE,
  73.   CONSTRAINT `clan_map_marker_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE CASCADE
  74. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  75.  
  76. -- ----------------------------
  77. -- Table structure for construction
  78. -- ----------------------------
  79. DROP TABLE IF EXISTS `construction`;
  80. CREATE TABLE `construction` (
  81.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  82.   `class` varchar(64) NOT NULL,
  83.   `account_uid` varchar(32) NOT NULL,
  84.   `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  85.   `position_x` double NOT NULL DEFAULT '0',
  86.   `position_y` double NOT NULL DEFAULT '0',
  87.   `position_z` double NOT NULL DEFAULT '0',
  88.   `direction_x` double NOT NULL DEFAULT '0',
  89.   `direction_y` double NOT NULL DEFAULT '0',
  90.   `direction_z` double NOT NULL DEFAULT '0',
  91.   `up_x` double NOT NULL DEFAULT '0',
  92.   `up_y` double NOT NULL DEFAULT '0',
  93.   `up_z` double NOT NULL DEFAULT '0',
  94.   `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  95.   `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  96.   `damage` tinyint(1) unsigned DEFAULT '0',
  97.   `texture` varchar(255) NOT NULL,
  98.   `territory_id` int(11) unsigned DEFAULT NULL,
  99.   `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  100.   `deleted_at` datetime DEFAULT NULL,
  101.   PRIMARY KEY (`id`),
  102.   KEY `account_uid` (`account_uid`) USING BTREE,
  103.   KEY `territory_id` (`territory_id`) USING BTREE,
  104.   CONSTRAINT `construction_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  105.   CONSTRAINT `construction_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
  106. ) ENGINE=InnoDB AUTO_INCREMENT=10782 DEFAULT CHARSET=utf8;
  107.  
  108. -- ----------------------------
  109. -- Table structure for container
  110. -- ----------------------------
  111. DROP TABLE IF EXISTS `container`;
  112. CREATE TABLE `container` (
  113.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  114.   `class` varchar(64) NOT NULL,
  115.   `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  116.   `account_uid` varchar(32) DEFAULT NULL,
  117.   `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  118.   `position_x` double NOT NULL DEFAULT '0',
  119.   `position_y` double NOT NULL DEFAULT '0',
  120.   `position_z` double NOT NULL DEFAULT '0',
  121.   `direction_x` double NOT NULL DEFAULT '0',
  122.   `direction_y` double NOT NULL DEFAULT '0',
  123.   `direction_z` double NOT NULL DEFAULT '0',
  124.   `up_x` double NOT NULL DEFAULT '0',
  125.   `up_y` double NOT NULL DEFAULT '0',
  126.   `up_z` double NOT NULL DEFAULT '1',
  127.   `cargo_items` text NOT NULL,
  128.   `cargo_magazines` text NOT NULL,
  129.   `cargo_weapons` text NOT NULL,
  130.   `cargo_container` text NOT NULL,
  131.   `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  132.   `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  133.   `territory_id` int(11) unsigned DEFAULT NULL,
  134.   `deleted_at` datetime DEFAULT NULL,
  135.   `money` int(11) unsigned NOT NULL DEFAULT '0',
  136.   `abandoned` datetime DEFAULT NULL,
  137.   `is_trap` tinyint(1) NOT NULL DEFAULT '0',
  138.   PRIMARY KEY (`id`),
  139.   KEY `account_uid` (`account_uid`) USING BTREE,
  140.   KEY `territory_id` (`territory_id`) USING BTREE,
  141.   CONSTRAINT `container_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  142.   CONSTRAINT `container_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
  143. ) ENGINE=InnoDB AUTO_INCREMENT=1266 DEFAULT CHARSET=utf8;
  144.  
  145. -- ----------------------------
  146. -- Table structure for infistar_logs
  147. -- ----------------------------
  148. DROP TABLE IF EXISTS `infistar_logs`;
  149. CREATE TABLE `infistar_logs` (
  150.   `id` int(11) NOT NULL AUTO_INCREMENT,
  151.   `logname` char(50) NOT NULL,
  152.   `logentry` text NOT NULL,
  153.   `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  154.   PRIMARY KEY (`id`)
  155. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  156.  
  157. -- ----------------------------
  158. -- Table structure for marxet
  159. -- ----------------------------
  160. DROP TABLE IF EXISTS `marxet`;
  161. CREATE TABLE `marxet` (
  162.   `listingID` varchar(8) NOT NULL,
  163.   `itemAvailable` tinyint(1) NOT NULL DEFAULT '1',
  164.   `itemArray` text NOT NULL,
  165.   `price` double NOT NULL,
  166.   `sellerUID` varchar(64) NOT NULL,
  167.   `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  168.   PRIMARY KEY (`listingID`),
  169.   KEY `listingID` (`listingID`) USING BTREE
  170. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  171.  
  172. -- ----------------------------
  173. -- Table structure for player
  174. -- ----------------------------
  175. DROP TABLE IF EXISTS `player`;
  176. CREATE TABLE `player` (
  177.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  178.   `name` varchar(64) NOT NULL,
  179.   `account_uid` varchar(32) NOT NULL,
  180.   `money` int(11) unsigned NOT NULL DEFAULT '0',
  181.   `damage` double unsigned NOT NULL DEFAULT '0',
  182.   `hunger` double unsigned NOT NULL DEFAULT '100',
  183.   `thirst` double unsigned NOT NULL DEFAULT '100',
  184.   `alcohol` double unsigned NOT NULL DEFAULT '0',
  185.   `temperature` double NOT NULL DEFAULT '37',
  186.   `wetness` double unsigned NOT NULL DEFAULT '0',
  187.   `oxygen_remaining` double unsigned NOT NULL DEFAULT '1',
  188.   `bleeding_remaining` double unsigned NOT NULL DEFAULT '0',
  189.   `hitpoints` varchar(255) NOT NULL DEFAULT '[]',
  190.   `direction` double NOT NULL DEFAULT '0',
  191.   `position_x` double NOT NULL DEFAULT '0',
  192.   `position_y` double NOT NULL DEFAULT '0',
  193.   `position_z` double NOT NULL DEFAULT '0',
  194.   `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  195.   `assigned_items` text NOT NULL,
  196.   `backpack` varchar(64) NOT NULL,
  197.   `backpack_items` text NOT NULL,
  198.   `backpack_magazines` text NOT NULL,
  199.   `backpack_weapons` text NOT NULL,
  200.   `current_weapon` varchar(64) NOT NULL,
  201.   `goggles` varchar(64) NOT NULL,
  202.   `handgun_items` text NOT NULL,
  203.   `handgun_weapon` varchar(64) NOT NULL,
  204.   `headgear` varchar(64) NOT NULL,
  205.   `binocular` varchar(64) NOT NULL,
  206.   `loaded_magazines` text NOT NULL,
  207.   `primary_weapon` varchar(64) NOT NULL,
  208.   `primary_weapon_items` text NOT NULL,
  209.   `secondary_weapon` varchar(64) NOT NULL,
  210.   `secondary_weapon_items` text NOT NULL,
  211.   `uniform` varchar(64) NOT NULL,
  212.   `uniform_items` text NOT NULL,
  213.   `uniform_magazines` text NOT NULL,
  214.   `uniform_weapons` text NOT NULL,
  215.   `vest` varchar(64) NOT NULL,
  216.   `vest_items` text NOT NULL,
  217.   `vest_magazines` text NOT NULL,
  218.   `vest_weapons` text NOT NULL,
  219.   `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  220.   PRIMARY KEY (`id`),
  221.   KEY `player_uid` (`account_uid`) USING BTREE,
  222.   CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
  223. ) ENGINE=InnoDB AUTO_INCREMENT=8951 DEFAULT CHARSET=utf8;
  224.  
  225. -- ----------------------------
  226. -- Table structure for player_history
  227. -- ----------------------------
  228. DROP TABLE IF EXISTS `player_history`;
  229. CREATE TABLE `player_history` (
  230.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  231.   `account_uid` varchar(32) NOT NULL,
  232.   `name` varchar(64) NOT NULL,
  233.   `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  234.   `position_x` double NOT NULL,
  235.   `position_y` double NOT NULL,
  236.   `position_z` double NOT NULL,
  237.   PRIMARY KEY (`id`)
  238. ) ENGINE=InnoDB AUTO_INCREMENT=8237 DEFAULT CHARSET=utf8;
  239.  
  240. -- ----------------------------
  241. -- Table structure for raid_history
  242. -- ----------------------------
  243. DROP TABLE IF EXISTS `raid_history`;
  244. CREATE TABLE `raid_history` (
  245.   `id` int(11) NOT NULL AUTO_INCREMENT,
  246.   `owner` varchar(32) NOT NULL,
  247.   `thief` varchar(64) NOT NULL,
  248.   `territory_id` int(11) NOT NULL,
  249.   `position_x` double NOT NULL,
  250.   `position_y` double NOT NULL,
  251.   `position_z` double NOT NULL,
  252.   `object` varchar(64) NOT NULL,
  253.   `type` varchar(20) NOT NULL,
  254.   `object_type` varchar(20) NOT NULL,
  255.   `datetime` datetime NOT NULL,
  256.   PRIMARY KEY (`id`)
  257. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  258.  
  259. -- ----------------------------
  260. -- Table structure for territory
  261. -- ----------------------------
  262. DROP TABLE IF EXISTS `territory`;
  263. CREATE TABLE `territory` (
  264.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  265.   `owner_uid` varchar(32) NOT NULL,
  266.   `name` varchar(64) NOT NULL,
  267.   `position_x` double NOT NULL,
  268.   `position_y` double NOT NULL,
  269.   `position_z` double NOT NULL,
  270.   `radius` double NOT NULL,
  271.   `level` int(11) NOT NULL,
  272.   `flag_texture` varchar(255) NOT NULL,
  273.   `flag_stolen` tinyint(1) NOT NULL DEFAULT '0',
  274.   `flag_stolen_by_uid` varchar(32) DEFAULT NULL,
  275.   `flag_stolen_at` datetime DEFAULT NULL,
  276.   `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  277.   `last_paid_at` datetime DEFAULT CURRENT_TIMESTAMP,
  278.   `xm8_protectionmoney_notified` tinyint(1) NOT NULL DEFAULT '0',
  279.   `build_rights` varchar(640) NOT NULL DEFAULT '0',
  280.   `moderators` varchar(320) NOT NULL DEFAULT '0',
  281.   `deleted_at` datetime DEFAULT NULL,
  282.   PRIMARY KEY (`id`),
  283.   KEY `owner_uid` (`owner_uid`) USING BTREE,
  284.   KEY `flag_stolen_by_uid` (`flag_stolen_by_uid`) USING BTREE,
  285.   CONSTRAINT `territory_ibfk_1` FOREIGN KEY (`owner_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  286.   CONSTRAINT `territory_ibfk_2` FOREIGN KEY (`flag_stolen_by_uid`) REFERENCES `account` (`uid`) ON DELETE SET NULL
  287. ) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8;
  288.  
  289. -- ----------------------------
  290. -- Table structure for vehicle
  291. -- ----------------------------
  292. DROP TABLE IF EXISTS `vehicle`;
  293. CREATE TABLE `vehicle` (
  294.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  295.   `class` varchar(64) NOT NULL,
  296.   `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  297.   `account_uid` varchar(32) DEFAULT NULL,
  298.   `is_locked` tinyint(1) NOT NULL DEFAULT '0',
  299.   `fuel` double unsigned NOT NULL DEFAULT '0',
  300.   `damage` double unsigned NOT NULL DEFAULT '0',
  301.   `hitpoints` text NOT NULL,
  302.   `position_x` double NOT NULL DEFAULT '0',
  303.   `position_y` double NOT NULL DEFAULT '0',
  304.   `position_z` double NOT NULL DEFAULT '0',
  305.   `direction_x` double NOT NULL DEFAULT '0',
  306.   `direction_y` double NOT NULL DEFAULT '0',
  307.   `direction_z` double NOT NULL DEFAULT '0',
  308.   `up_x` double NOT NULL DEFAULT '0',
  309.   `up_y` double NOT NULL DEFAULT '0',
  310.   `up_z` double NOT NULL DEFAULT '1',
  311.   `cargo_items` text NOT NULL,
  312.   `cargo_magazines` text NOT NULL,
  313.   `cargo_weapons` text NOT NULL,
  314.   `cargo_container` text NOT NULL,
  315.   `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  316.   `pin_code` varchar(6) NOT NULL DEFAULT '000000',
  317.   `deleted_at` datetime DEFAULT NULL,
  318.   `money` int(11) unsigned NOT NULL DEFAULT '0',
  319.   `vehicle_texture` text NOT NULL,
  320.   `territory_id` int(11) unsigned DEFAULT NULL,
  321.   `ammo` text NOT NULL,
  322.   PRIMARY KEY (`id`),
  323.   KEY `account_uid` (`account_uid`) USING BTREE,
  324.   KEY `vehicle_ibfk_2` (`territory_id`) USING BTREE,
  325.   CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
  326.   CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
  327. ) ENGINE=InnoDB AUTO_INCREMENT=1450 DEFAULT CHARSET=utf8;
  328.  
  329. -- ----------------------------
  330. -- Table structure for xg_logkill
  331. -- ----------------------------
  332. DROP TABLE IF EXISTS `xg_logkill`;
  333. CREATE TABLE `xg_logkill` (
  334.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  335.   `victimUID` varchar(32) NOT NULL,
  336.   `victimName` varchar(512) NOT NULL,
  337.   `killerUID` varchar(32) NOT NULL,
  338.   `killerName` varchar(512) NOT NULL,
  339.   `killerWeapon` varchar(512) NOT NULL,
  340.   `killerVehicle` varchar(512) NOT NULL,
  341.   `distance` varchar(512) NOT NULL,
  342.   `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  343.   KEY `id` (`id`) USING BTREE
  344. ) ENGINE=InnoDB AUTO_INCREMENT=2530 DEFAULT CHARSET=utf8;
  345.  
  346. -- ----------------------------
  347. -- Event structure for PLAYER DELETE
  348. -- ----------------------------
  349. DROP EVENT IF EXISTS `PLAYER DELETE`;
  350. DELIMITER ;;
  351. CREATE DEFINER=`majussiani`@`%` EVENT `PLAYER DELETE` ON SCHEDULE EVERY 2 MINUTE STARTS '2016-12-04 02:09:12' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'APAGA PLAYER DUPLICADO' DO /* =================== DELETES =================== */
  352.  
  353. /* DELETE Inactive Players */
  354. DELETE FROM player
  355. WHERE account_uid IN (SELECT uid FROM account WHERE last_connect_at < NOW() - INTERVAL 7 DAY
  356. AND total_connections < 10);
  357. ;;
  358. DELIMITER ;
Advertisement
Add Comment
Please, Sign In to add comment