Advertisement
Ramaraunt1

warband scripts sql

Apr 30th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. -- ---
  2. -- Globals
  3. -- ---
  4.  
  5. -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  6. -- SET FOREIGN_KEY_CHECKS=0;
  7.  
  8. -- ---
  9. -- Table 'account'
  10. --
  11. -- ---
  12.  
  13. DROP TABLE IF EXISTS `account`;
  14.  
  15. CREATE TABLE `account` (
  16. `id` INTEGER(5) NULL AUTO_INCREMENT DEFAULT NULL,
  17. `guid` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is the players unique id!',
  18. `head` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where head armor goes!',
  19. `body` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where body armor goes!',
  20. `hand` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where hand armor goes!',
  21. `foot` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where foot armor goes!',
  22. `horse` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where equiped horse goes!',
  23. `horse_health` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is where equiped horse health goes!',
  24. `slot1` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is item slot 1!',
  25. `slot2` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is item slot 2!',
  26. `slot3` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is item slot 3!',
  27. `slot4` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is item slot 4!',
  28. `health` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is player health!',
  29. `hunger` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is player hunger!',
  30. `faction` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is player faction!',
  31. `player_gold` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is player gold!',
  32. `bank_gold` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is player bank gold!',
  33. `status` INTEGER NULL DEFAULT NULL COMMENT 'This is player status (online, offline, etc)',
  34. `posx` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is the player x position!',
  35. `posy` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is the player y position!',
  36. `posz` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is the player z position!',
  37. `banned_yes` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is if the player is banned or not!',
  38. `admin_level` INTEGER(30) NULL DEFAULT NULL COMMENT '0 = none, 1 = teleport, 2 = kick, 3 = ban',
  39. PRIMARY KEY (`id`),
  40. UNIQUE KEY (`guid`)
  41. );
  42.  
  43. -- ---
  44. -- Table 'names'
  45. --
  46. -- ---
  47.  
  48. DROP TABLE IF EXISTS `names`;
  49.  
  50. CREATE TABLE `names` (
  51. `id` INTEGER NULL AUTO_INCREMENT DEFAULT NULL,
  52. `guid` INTEGER(30) NULL DEFAULT NULL COMMENT 'This is the players unique id!',
  53. `name` VARCHAR(30) NULL DEFAULT NULL,
  54. PRIMARY KEY (`id`),
  55. UNIQUE KEY (`name`)
  56. );
  57.  
  58. -- ---
  59. -- Foreign Keys
  60. -- ---
  61.  
  62. ALTER TABLE `names` ADD FOREIGN KEY (guid) REFERENCES `account` (`guid`);
  63.  
  64. -- ---
  65. -- Table Properties
  66. -- ---
  67.  
  68. -- ALTER TABLE `account` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  69. -- ALTER TABLE `names` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
  70.  
  71. -- ---
  72. -- Test Data
  73. -- ---
  74.  
  75. -- INSERT INTO `account` (`id`,`guid`,`head`,`body`,`hand`,`foot`,`horse`,`horse_health`,`slot1`,`slot2`,`slot3`,`slot4`,`health`,`hunger`,`faction`,`player_gold`,`bank_gold`,`status`,`posx`,`posy`,`posz`,`banned_yes`,`admin_level`) VALUES
  76. -- ('','','','','','','','','','','','','','','','','','','','','','','');
  77. -- INSERT INTO `names` (`id`,`guid`,`name`) VALUES
  78. -- ('','','');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement