core.sql 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. /*
  2. * New player tables section
  3. * The queries performed in the section will add new tables and drop any that already exist
  4. */
  5. DROP TABLE IF EXISTS `bank`;
  6. CREATE TABLE IF NOT EXISTS `bank`
  7. (
  8. `playerID` int(10) UNSIGNED NOT NULL,
  9. `itemID` int(10) UNSIGNED NOT NULL,
  10. `slot` int(5) UNSIGNED NOT NULL DEFAULT 0,
  11. KEY (`playerID`)
  12. ) ENGINE = InnoDB
  13. DEFAULT CHARSET = utf8;
  14. DROP TABLE IF EXISTS `chat_logs`;
  15. CREATE TABLE IF NOT EXISTS `chat_logs`
  16. (
  17. `id` int(10) NOT NULL AUTO_INCREMENT,
  18. `sender` varchar(12) NOT NULL,
  19. `message` varchar(255) NOT NULL,
  20. `time` int(10) UNSIGNED NOT NULL DEFAULT 0,
  21. PRIMARY KEY (`id`),
  22. KEY `time` (`time`),
  23. KEY `sender` (`sender`),
  24. KEY `message` (`message`)
  25. ) ENGINE = MyISAM
  26. DEFAULT CHARSET = utf8;
  27. DROP TABLE IF EXISTS `curstats`;
  28. CREATE TABLE IF NOT EXISTS `curstats`
  29. (
  30. `playerID` int(10) UNSIGNED NOT NULL,
  31. `attack` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  32. `defense` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  33. `strength` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  34. `hits` tinyint(3) UNSIGNED NOT NULL DEFAULT 10,
  35. `ranged` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  36. `prayer` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  37. `magic` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  38. `cooking` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  39. `woodcut` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  40. `fletching` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  41. `fishing` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  42. `firemaking` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  43. `crafting` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  44. `smithing` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  45. `mining` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  46. `herblaw` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  47. `agility` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  48. `thieving` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  49. PRIMARY KEY (`playerID`),
  50. KEY `playerID` (`playerID`)
  51. ) ENGINE = InnoDB
  52. DEFAULT CHARSET = utf8;
  53. DROP TABLE IF EXISTS `droplogs`;
  54. CREATE TABLE IF NOT EXISTS `droplogs`
  55. (
  56. `ID` int(11) NOT NULL AUTO_INCREMENT,
  57. `itemID` int(10) DEFAULT NULL,
  58. `playerID` int(10) DEFAULT NULL,
  59. `dropAmount` int(10) DEFAULT NULL,
  60. `npcId` int(10) DEFAULT NULL,
  61. `ts` timestamp NOT NULL DEFAULT current_timestamp(),
  62. PRIMARY KEY (`ID`)
  63. ) ENGINE = InnoDB
  64. DEFAULT CHARSET = latin1;
  65. DROP TABLE IF EXISTS `experience`;
  66. CREATE TABLE IF NOT EXISTS `experience`
  67. (
  68. `playerID` int(10) UNSIGNED NOT NULL,
  69. `attack` int(9) UNSIGNED NOT NULL DEFAULT 0,
  70. `defense` int(9) UNSIGNED NOT NULL DEFAULT 0,
  71. `strength` int(9) UNSIGNED NOT NULL DEFAULT 0,
  72. `hits` int(9) UNSIGNED NOT NULL DEFAULT 4616,
  73. `ranged` int(9) UNSIGNED NOT NULL DEFAULT 0,
  74. `prayer` int(9) UNSIGNED NOT NULL DEFAULT 0,
  75. `magic` int(9) UNSIGNED NOT NULL DEFAULT 0,
  76. `cooking` int(9) UNSIGNED NOT NULL DEFAULT 0,
  77. `woodcut` int(9) UNSIGNED NOT NULL DEFAULT 0,
  78. `fletching` int(9) UNSIGNED NOT NULL DEFAULT 0,
  79. `fishing` int(9) UNSIGNED NOT NULL DEFAULT 0,
  80. `firemaking` int(9) UNSIGNED NOT NULL DEFAULT 0,
  81. `crafting` int(9) UNSIGNED NOT NULL DEFAULT 0,
  82. `smithing` int(9) UNSIGNED NOT NULL DEFAULT 0,
  83. `mining` int(9) UNSIGNED NOT NULL DEFAULT 0,
  84. `herblaw` int(9) UNSIGNED NOT NULL DEFAULT 0,
  85. `agility` int(9) UNSIGNED NOT NULL DEFAULT 0,
  86. `thieving` int(9) UNSIGNED NOT NULL DEFAULT 0,
  87. PRIMARY KEY (`playerID`),
  88. KEY `playerID` (`playerID`)
  89. ) ENGINE = InnoDB
  90. DEFAULT CHARSET = utf8;
  91. DROP TABLE IF EXISTS `friends`;
  92. CREATE TABLE IF NOT EXISTS `friends`
  93. (
  94. `playerID` int(10) UNSIGNED NOT NULL,
  95. `friend` bigint(19) UNSIGNED NOT NULL,
  96. `friendName` varchar(12) NOT NULL,
  97. `dbid` int(10) NOT NULL AUTO_INCREMENT,
  98. PRIMARY KEY (`dbid`),
  99. KEY `friend` (`friend`)
  100. ) ENGINE = InnoDB
  101. DEFAULT CHARSET = utf8;
  102. DROP TABLE IF EXISTS `game_reports`;
  103. CREATE TABLE IF NOT EXISTS `game_reports`
  104. (
  105. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  106. `reporter` varchar(12) NOT NULL,
  107. `reported` varchar(12) NOT NULL,
  108. `time` int(10) UNSIGNED NOT NULL,
  109. `reason` int(5) UNSIGNED NOT NULL,
  110. `chatlog` text DEFAULT NULL,
  111. `reporter_x` int(5) DEFAULT NULL,
  112. `reporter_y` int(5) DEFAULT NULL,
  113. `reported_x` int(5) NOT NULL DEFAULT 0,
  114. `reported_y` int(5) DEFAULT 0,
  115. `suggests_or_mutes` tinyint(1) DEFAULT NULL,
  116. `tried_apply_action` tinyint(1) DEFAULT NULL,
  117. PRIMARY KEY (`id`)
  118. ) ENGINE = MyISAM
  119. DEFAULT CHARSET = utf8;
  120. DROP TABLE IF EXISTS `generic_logs`;
  121. CREATE TABLE IF NOT EXISTS `generic_logs`
  122. (
  123. `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  124. `message` text NOT NULL,
  125. `time` int(10) UNSIGNED NOT NULL,
  126. PRIMARY KEY (`id`),
  127. KEY `id` (`id`),
  128. KEY `time` (`time`),
  129. KEY `message` (`message`(333))
  130. ) ENGINE = MyISAM
  131. DEFAULT CHARSET = utf8;
  132. DROP TABLE IF EXISTS `ignores`;
  133. CREATE TABLE IF NOT EXISTS `ignores`
  134. (
  135. `playerID` int(10) UNSIGNED NOT NULL,
  136. `ignore` bigint(19) UNSIGNED NOT NULL,
  137. `dbid` int(10) NOT NULL AUTO_INCREMENT,
  138. PRIMARY KEY (`dbid`),
  139. KEY `ignore` (`ignore`)
  140. ) ENGINE = InnoDB
  141. DEFAULT CHARSET = utf8;
  142. DROP TABLE IF EXISTS `invitems`;
  143. CREATE TABLE IF NOT EXISTS `invitems`
  144. (
  145. `playerID` int(10) UNSIGNED NOT NULL,
  146. `itemID` int(10) UNSIGNED NOT NULL,
  147. `slot` int(5) UNSIGNED NOT NULL,
  148. KEY (`playerID`)
  149. ) ENGINE = InnoDB
  150. DEFAULT CHARSET = utf8;
  151. DROP TABLE IF EXISTS `live_feeds`;
  152. CREATE TABLE IF NOT EXISTS `live_feeds`
  153. (
  154. `id` int(10) NOT NULL AUTO_INCREMENT,
  155. `username` varchar(12) NOT NULL,
  156. `message` varchar(165) NOT NULL,
  157. `time` int(10) UNSIGNED NOT NULL DEFAULT 0,
  158. PRIMARY KEY (`id`)
  159. ) ENGINE = InnoDB
  160. DEFAULT CHARSET = utf8;
  161. DROP TABLE IF EXISTS `logins`;
  162. CREATE TABLE IF NOT EXISTS `logins`
  163. (
  164. `playerID` int(10) UNSIGNED NOT NULL,
  165. `time` int(5) UNSIGNED NOT NULL,
  166. `ip` varchar(255) NOT NULL DEFAULT '0.0.0.0',
  167. `dbid` int(10) NOT NULL AUTO_INCREMENT,
  168. PRIMARY KEY (`dbid`),
  169. KEY `ip` (`ip`)
  170. ) ENGINE = MyISAM
  171. DEFAULT CHARSET = utf8;
  172. DROP TABLE IF EXISTS `npckills`;
  173. CREATE TABLE IF NOT EXISTS `npckills`
  174. (
  175. `ID` int(10) NOT NULL AUTO_INCREMENT,
  176. `npcID` int(10) DEFAULT NULL,
  177. `playerID` int(10) DEFAULT NULL,
  178. `killCount` int(10) DEFAULT 0,
  179. PRIMARY KEY (`ID`)
  180. ) ENGINE = InnoDB
  181. DEFAULT CHARSET = latin1;
  182. DROP TABLE IF EXISTS `players`;
  183. CREATE TABLE IF NOT EXISTS `players`
  184. (
  185. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  186. `username` varchar(12) NOT NULL DEFAULT '',
  187. `group_id` int(10) DEFAULT 10,
  188. `email` varchar(255) DEFAULT NULL,
  189. `pass` varchar(512) NOT NULL,
  190. `salt` varchar(250) NOT NULL DEFAULT '',
  191. `combat` int(10) DEFAULT 3,
  192. `skill_total` int(10) DEFAULT 27,
  193. `x` int(5) UNSIGNED DEFAULT 216,
  194. `y` int(5) UNSIGNED DEFAULT 451,
  195. `fatigue` int(10) DEFAULT 0,
  196. `combatstyle` tinyint(1) DEFAULT 0,
  197. `block_chat` tinyint(1) UNSIGNED DEFAULT 0,
  198. `block_private` tinyint(1) UNSIGNED DEFAULT 0,
  199. `block_trade` tinyint(1) UNSIGNED DEFAULT 0,
  200. `block_duel` tinyint(1) UNSIGNED DEFAULT 0,
  201. `cameraauto` tinyint(1) UNSIGNED DEFAULT 1,
  202. `onemouse` tinyint(1) UNSIGNED DEFAULT 0,
  203. `soundoff` tinyint(1) UNSIGNED DEFAULT 0,
  204. `haircolour` int(5) UNSIGNED DEFAULT 2,
  205. `topcolour` int(5) UNSIGNED DEFAULT 8,
  206. `trousercolour` int(5) UNSIGNED DEFAULT 14,
  207. `skincolour` int(5) UNSIGNED DEFAULT 0,
  208. `headsprite` int(5) UNSIGNED DEFAULT 1,
  209. `bodysprite` int(5) UNSIGNED DEFAULT 2,
  210. `male` tinyint(1) UNSIGNED DEFAULT 1,
  211. `creation_date` int(10) UNSIGNED NOT NULL DEFAULT 0,
  212. `creation_ip` varchar(255) NOT NULL DEFAULT '0.0.0.0',
  213. `login_date` int(10) UNSIGNED DEFAULT 0,
  214. `login_ip` varchar(255) DEFAULT '0.0.0.0',
  215. `banned` varchar(255) NOT NULL DEFAULT '0',
  216. `offences` int(11) NOT NULL DEFAULT 0,
  217. `muted` varchar(255) NOT NULL DEFAULT '0',
  218. `kills` int(10) NOT NULL DEFAULT 0,
  219. `npc_kills` INT(10) NOT NULL DEFAULT 0,
  220. `deaths` int(10) DEFAULT 0,
  221. `online` tinyint(1) UNSIGNED ZEROFILL DEFAULT 0,
  222. `quest_points` int(5) DEFAULT NULL,
  223. `bank_size` int(10) UNSIGNED NOT NULL DEFAULT 192,
  224. `lastRecoveryTryId` int(10) UNSIGNED DEFAULT NULL,
  225. PRIMARY KEY (`id`),
  226. UNIQUE KEY `id` (`id`),
  227. KEY `skill_total` (`skill_total`),
  228. KEY `group_id` (`group_id`),
  229. KEY `banned` (`banned`)
  230. ) ENGINE = InnoDB
  231. DEFAULT CHARSET = utf8;
  232. ALTER TABLE `players`
  233. ALTER `cameraauto` SET DEFAULT 1;
  234. DROP TABLE IF EXISTS `player_cache`;
  235. CREATE TABLE IF NOT EXISTS `player_cache`
  236. (
  237. `playerID` int(10) UNSIGNED NOT NULL,
  238. `type` tinyint(1) NOT NULL,
  239. `key` varchar(32) NOT NULL,
  240. `value` varchar(150) NOT NULL,
  241. `dbid` int(10) NOT NULL AUTO_INCREMENT,
  242. PRIMARY KEY (`dbid`)
  243. ) ENGINE = MyISAM
  244. DEFAULT CHARSET = utf8;
  245. DROP TABLE IF EXISTS `player_change_recovery`;
  246. CREATE TABLE IF NOT EXISTS `player_change_recovery`
  247. (
  248. `playerID` int(10) UNSIGNED NOT NULL,
  249. `username` varchar(12) NOT NULL DEFAULT '',
  250. `question1` varchar(256) NOT NULL DEFAULT '',
  251. `answer1` varchar(512) NOT NULL DEFAULT '',
  252. `question2` varchar(256) NOT NULL DEFAULT '',
  253. `answer2` varchar(512) NOT NULL DEFAULT '',
  254. `question3` varchar(256) NOT NULL DEFAULT '',
  255. `answer3` varchar(512) NOT NULL DEFAULT '',
  256. `question4` varchar(256) NOT NULL DEFAULT '',
  257. `answer4` varchar(512) NOT NULL DEFAULT '',
  258. `question5` varchar(256) NOT NULL DEFAULT '',
  259. `answer5` varchar(512) NOT NULL DEFAULT '',
  260. `date_set` int(10) UNSIGNED NOT NULL DEFAULT 0,
  261. `ip_set` varchar(255) DEFAULT '0.0.0.0',
  262. PRIMARY KEY (`playerID`)
  263. ) ENGINE = MyISAM
  264. DEFAULT CHARSET = utf8;
  265. DROP TABLE IF EXISTS `player_contact_details`;
  266. CREATE TABLE IF NOT EXISTS `player_contact_details`
  267. (
  268. `playerID` int(10) UNSIGNED NOT NULL,
  269. `username` varchar(12) NOT NULL DEFAULT '',
  270. `fullname` varchar(100) DEFAULT '',
  271. `zipCode` varchar(10) DEFAULT '',
  272. `country` varchar(100) DEFAULT '',
  273. `email` varchar(255) DEFAULT NULL,
  274. `date_modified` int(10) UNSIGNED NOT NULL DEFAULT 0,
  275. `ip` varchar(255) DEFAULT '0.0.0.0',
  276. PRIMARY KEY (`playerID`)
  277. ) ENGINE = MyISAM
  278. DEFAULT CHARSET = utf8;
  279. DROP TABLE IF EXISTS `player_recovery`;
  280. CREATE TABLE IF NOT EXISTS `player_recovery`
  281. (
  282. `playerID` int(10) UNSIGNED NOT NULL,
  283. `username` varchar(12) NOT NULL DEFAULT '',
  284. `question1` varchar(256) NOT NULL DEFAULT '',
  285. `answer1` varchar(512) NOT NULL DEFAULT '',
  286. `question2` varchar(256) NOT NULL DEFAULT '',
  287. `answer2` varchar(512) NOT NULL DEFAULT '',
  288. `question3` varchar(256) NOT NULL DEFAULT '',
  289. `answer3` varchar(512) NOT NULL DEFAULT '',
  290. `question4` varchar(256) NOT NULL DEFAULT '',
  291. `answer4` varchar(512) NOT NULL DEFAULT '',
  292. `question5` varchar(256) NOT NULL DEFAULT '',
  293. `answer5` varchar(512) NOT NULL DEFAULT '',
  294. `date_set` int(10) UNSIGNED NOT NULL DEFAULT 0,
  295. `ip_set` varchar(255) DEFAULT '0.0.0.0',
  296. `previous_pass` varchar(512) DEFAULT NULL,
  297. `earlier_pass` varchar(512) DEFAULT NULL,
  298. PRIMARY KEY (`playerID`)
  299. ) ENGINE = MyISAM
  300. DEFAULT CHARSET = utf8;
  301. DROP TABLE IF EXISTS `player_security_changes`;
  302. CREATE TABLE IF NOT EXISTS `player_security_changes`
  303. (
  304. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  305. `playerID` int(10) UNSIGNED NOT NULL,
  306. `eventAlias` varchar(20) NOT NULL,
  307. `date` int(10) UNSIGNED NOT NULL DEFAULT 0,
  308. `ip` varchar(255) DEFAULT '0.0.0.0',
  309. `message` text DEFAULT NULL,
  310. PRIMARY KEY (`id`)
  311. ) ENGINE = MyISAM
  312. DEFAULT CHARSET = utf8;
  313. DROP TABLE IF EXISTS `private_message_logs`;
  314. CREATE TABLE IF NOT EXISTS `private_message_logs`
  315. (
  316. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  317. `sender` varchar(12) NOT NULL,
  318. `message` varchar(255) NOT NULL,
  319. `reciever` varchar(12) NOT NULL,
  320. `time` int(10) UNSIGNED NOT NULL DEFAULT 0,
  321. PRIMARY KEY (`id`),
  322. KEY `reciever` (`reciever`),
  323. KEY `time` (`time`),
  324. KEY `sender` (`sender`),
  325. KEY `message` (`message`)
  326. ) ENGINE = MyISAM
  327. DEFAULT CHARSET = utf8;
  328. DROP TABLE IF EXISTS `quests`;
  329. CREATE TABLE IF NOT EXISTS `quests`
  330. (
  331. `dbid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  332. `playerID` int(10) UNSIGNED NOT NULL,
  333. `id` int(10) DEFAULT NULL,
  334. `stage` int(10) DEFAULT NULL,
  335. PRIMARY KEY (`dbid`)
  336. ) ENGINE = InnoDB
  337. DEFAULT CHARSET = utf8;
  338. DROP TABLE IF EXISTS `recovery_questions`;
  339. CREATE TABLE IF NOT EXISTS `recovery_questions`
  340. (
  341. `questionID` int(10) UNSIGNED NOT NULL,
  342. `question` varchar(256) NOT NULL DEFAULT '',
  343. PRIMARY KEY (`questionID`)
  344. ) ENGINE = MyISAM
  345. DEFAULT CHARSET = utf8;
  346. INSERT INTO `recovery_questions` (`questionID`, `question`)
  347. VALUES (1, 'Where were you born?'),
  348. (2, 'What was your first teacher\'s name?'),
  349. (3, 'What is your father\'s middle name?'),
  350. (4, 'Who was your first best friend?'),
  351. (5, 'What is your favourite vacation spot?'),
  352. (6, 'What is your mother\'s middle name?'),
  353. (7, 'What was your first pet\'s name?'),
  354. (8, 'What was the name of your first school?'),
  355. (9, 'What is your mother\'s maiden name?'),
  356. (10, 'Who was your first boyfriend/girlfriend?'),
  357. (11, 'What was the first computer game you purchased?'),
  358. (12, 'Who is your favourite actor/actress?'),
  359. (13, 'Who is your favourite author?'),
  360. (14, 'Who is your favourite musician?'),
  361. (15, 'Who is your favourite cartoon character?'),
  362. (16, 'What is your favourite book?'),
  363. (17, 'What is your favourite food?'),
  364. (18, 'What is your favourite movie?');
  365. DROP TABLE IF EXISTS `recovery_attempts`;
  366. CREATE TABLE IF NOT EXISTS `recovery_attempts`
  367. (
  368. `playerID` int(10) UNSIGNED NOT NULL,
  369. `username` varchar(12) NOT NULL DEFAULT '',
  370. `time` int(5) UNSIGNED NOT NULL,
  371. `ip` varchar(255) NOT NULL DEFAULT '0.0.0.0',
  372. `dbid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  373. PRIMARY KEY (`dbid`),
  374. KEY `ip` (`ip`)
  375. ) ENGINE = MyISAM
  376. DEFAULT CHARSET = utf8;
  377. DROP TABLE IF EXISTS `staff_logs`;
  378. CREATE TABLE IF NOT EXISTS `staff_logs`
  379. (
  380. `id` int(11) NOT NULL AUTO_INCREMENT,
  381. `staff_username` varchar(12) DEFAULT NULL,
  382. `action` tinyint(2) UNSIGNED DEFAULT NULL,
  383. `affected_player` varchar(12) DEFAULT NULL,
  384. `time` int(10) UNSIGNED NOT NULL,
  385. `staff_x` int(5) UNSIGNED NOT NULL DEFAULT 0,
  386. `staff_y` int(5) UNSIGNED DEFAULT 0,
  387. `affected_x` int(5) UNSIGNED DEFAULT 0,
  388. `affected_y` int(5) UNSIGNED DEFAULT 0,
  389. `staff_ip` varchar(15) DEFAULT '0.0.0.0',
  390. `affected_ip` varchar(15) DEFAULT '0.0.0.0',
  391. `extra` varchar(255) DEFAULT NULL,
  392. PRIMARY KEY (`id`)
  393. ) ENGINE = MyISAM
  394. DEFAULT CHARSET = utf8;
  395. DROP TABLE IF EXISTS `trade_logs`;
  396. CREATE TABLE IF NOT EXISTS `trade_logs`
  397. (
  398. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  399. `player1` varchar(12) CHARACTER SET utf16 DEFAULT NULL,
  400. `player2` varchar(12) DEFAULT NULL,
  401. `player1_items` varchar(255) DEFAULT NULL,
  402. `player2_items` varchar(255) DEFAULT NULL,
  403. `player1_ip` varchar(39) NOT NULL DEFAULT '0.0.0.0',
  404. `player2_ip` varchar(39) NOT NULL DEFAULT '0.0.0.0',
  405. `time` int(10) DEFAULT NULL,
  406. PRIMARY KEY (`id`),
  407. KEY `player1` (`player1`),
  408. KEY `player2` (`player2`),
  409. KEY `player1_ip` (`player1_ip`),
  410. KEY `player2_ip` (`player2_ip`),
  411. KEY `time` (`time`)
  412. ) ENGINE = MyISAM
  413. DEFAULT CHARSET = utf8;
  414. COMMIT;
  415. /*
  416. * New server (non-player) tables section
  417. * The queries performed in the section will add new tables and drop any that already exist
  418. */
  419. DROP TABLE IF EXISTS `objects`;
  420. CREATE TABLE IF NOT EXISTS `objects`
  421. (
  422. `x` int(10) NOT NULL,
  423. `y` int(10) NOT NULL,
  424. `id` int(10) NOT NULL,
  425. `direction` int(10) NOT NULL,
  426. `type` int(10) NOT NULL,
  427. `d_id` int(11) NOT NULL AUTO_INCREMENT,
  428. PRIMARY KEY (`d_id`),
  429. UNIQUE KEY `d_id` (`d_id`)
  430. ) ENGINE = MyISAM
  431. AUTO_INCREMENT = 28954
  432. DEFAULT CHARSET = latin1;
  433. DROP TABLE IF EXISTS `npclocs`;
  434. CREATE TABLE IF NOT EXISTS `npclocs`
  435. (
  436. `id` int(10) DEFAULT NULL,
  437. `startX` int(10) DEFAULT NULL,
  438. `minX` int(10) DEFAULT NULL,
  439. `maxX` int(10) DEFAULT NULL,
  440. `startY` int(10) DEFAULT NULL,
  441. `minY` int(10) DEFAULT NULL,
  442. `maxY` int(10) DEFAULT NULL,
  443. `dbid` int(11) NOT NULL AUTO_INCREMENT,
  444. PRIMARY KEY (`dbid`),
  445. UNIQUE KEY `fsdf` (`dbid`)
  446. ) ENGINE = InnoDB
  447. AUTO_INCREMENT = 7551
  448. DEFAULT CHARSET = utf8;
  449. DROP TABLE IF EXISTS `grounditems`;
  450. CREATE TABLE IF NOT EXISTS `grounditems`
  451. (
  452. `id` int(10) DEFAULT NULL,
  453. `x` int(10) DEFAULT NULL,
  454. `y` int(10) DEFAULT NULL,
  455. `amount` int(10) DEFAULT NULL,
  456. `respawn` int(10) DEFAULT NULL,
  457. `idx` int(10) NOT NULL AUTO_INCREMENT,
  458. PRIMARY KEY (`idx`),
  459. KEY `idx` (`idx`)
  460. ) ENGINE = MyISAM
  461. AUTO_INCREMENT = 1112
  462. DEFAULT CHARSET = utf8
  463. ROW_FORMAT = DYNAMIC;
  464. DROP TABLE IF EXISTS `itemstatuses`;
  465. CREATE TABLE IF NOT EXISTS `itemstatuses`
  466. (
  467. `itemID` int(10) UNSIGNED NOT NULL,
  468. `catalogID` int(10) UNSIGNED NOT NULL,
  469. `amount` int(10) UNSIGNED NOT NULL DEFAULT 1,
  470. `noted` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
  471. `wielded` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
  472. `durability` int(5) UNSIGNED NOT NULL DEFAULT 0,
  473. PRIMARY KEY (`itemID`)
  474. ) ENGINE = InnoDB
  475. DEFAULT CHARSET = utf8;