main.sql 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  1. --
  2. -- Table structure for table `acc_reg_num`
  3. --
  4. CREATE TABLE IF NOT EXISTS `acc_reg_num` (
  5. `account_id` int(11) unsigned NOT NULL default '0',
  6. `key` varchar(32) binary NOT NULL default '',
  7. `index` int(11) unsigned NOT NULL default '0',
  8. `value` bigint(11) NOT NULL default '0',
  9. PRIMARY KEY (`account_id`,`key`,`index`),
  10. KEY `account_id` (`account_id`)
  11. ) ENGINE=MyISAM;
  12. --
  13. -- Table structure for table `acc_reg_str`
  14. --
  15. CREATE TABLE IF NOT EXISTS `acc_reg_str` (
  16. `account_id` int(11) unsigned NOT NULL default '0',
  17. `key` varchar(32) binary NOT NULL default '',
  18. `index` int(11) unsigned NOT NULL default '0',
  19. `value` varchar(254) NOT NULL default '0',
  20. PRIMARY KEY (`account_id`,`key`,`index`),
  21. KEY `account_id` (`account_id`)
  22. ) ENGINE=MyISAM;
  23. --
  24. -- Table structure for table `achievement`
  25. --
  26. CREATE TABLE IF NOT EXISTS `achievement` (
  27. `char_id` int(11) unsigned NOT NULL default '0',
  28. `id` bigint(11) unsigned NOT NULL,
  29. `count1` int unsigned NOT NULL default '0',
  30. `count2` int unsigned NOT NULL default '0',
  31. `count3` int unsigned NOT NULL default '0',
  32. `count4` int unsigned NOT NULL default '0',
  33. `count5` int unsigned NOT NULL default '0',
  34. `count6` int unsigned NOT NULL default '0',
  35. `count7` int unsigned NOT NULL default '0',
  36. `count8` int unsigned NOT NULL default '0',
  37. `count9` int unsigned NOT NULL default '0',
  38. `count10` int unsigned NOT NULL default '0',
  39. `completed` datetime,
  40. `rewarded` datetime,
  41. PRIMARY KEY (`char_id`,`id`),
  42. KEY `char_id` (`char_id`)
  43. ) ENGINE=MyISAM;
  44. --
  45. -- Table structure for table `auction`
  46. --
  47. CREATE TABLE IF NOT EXISTS `auction` (
  48. `auction_id` bigint(20) unsigned NOT NULL auto_increment,
  49. `seller_id` int(11) unsigned NOT NULL default '0',
  50. `seller_name` varchar(30) NOT NULL default '',
  51. `buyer_id` int(11) unsigned NOT NULL default '0',
  52. `buyer_name` varchar(30) NOT NULL default '',
  53. `price` int(11) unsigned NOT NULL default '0',
  54. `buynow` int(11) unsigned NOT NULL default '0',
  55. `hours` smallint(6) NOT NULL default '0',
  56. `timestamp` int(11) unsigned NOT NULL default '0',
  57. `nameid` int(10) unsigned NOT NULL default '0',
  58. `item_name` varchar(50) NOT NULL default '',
  59. `type` smallint(6) NOT NULL default '0',
  60. `refine` tinyint(3) unsigned NOT NULL default '0',
  61. `attribute` tinyint(4) unsigned NOT NULL default '0',
  62. `card0` int(10) unsigned NOT NULL default '0',
  63. `card1` int(10) unsigned NOT NULL default '0',
  64. `card2` int(10) unsigned NOT NULL default '0',
  65. `card3` int(10) unsigned NOT NULL default '0',
  66. `option_id0` smallint(5) NOT NULL default '0',
  67. `option_val0` smallint(5) NOT NULL default '0',
  68. `option_parm0` tinyint(3) NOT NULL default '0',
  69. `option_id1` smallint(5) NOT NULL default '0',
  70. `option_val1` smallint(5) NOT NULL default '0',
  71. `option_parm1` tinyint(3) NOT NULL default '0',
  72. `option_id2` smallint(5) NOT NULL default '0',
  73. `option_val2` smallint(5) NOT NULL default '0',
  74. `option_parm2` tinyint(3) NOT NULL default '0',
  75. `option_id3` smallint(5) NOT NULL default '0',
  76. `option_val3` smallint(5) NOT NULL default '0',
  77. `option_parm3` tinyint(3) NOT NULL default '0',
  78. `option_id4` smallint(5) NOT NULL default '0',
  79. `option_val4` smallint(5) NOT NULL default '0',
  80. `option_parm4` tinyint(3) NOT NULL default '0',
  81. `unique_id` bigint(20) unsigned NOT NULL default '0',
  82. `enchantgrade` tinyint unsigned NOT NULL default '0',
  83. PRIMARY KEY (`auction_id`)
  84. ) ENGINE=MyISAM;
  85. --
  86. -- Table `barter` for barter shop persistency
  87. --
  88. CREATE TABLE IF NOT EXISTS `barter` (
  89. `name` varchar(50) NOT NULL DEFAULT '',
  90. `index` SMALLINT(5) UNSIGNED NOT NULL,
  91. `amount` SMALLINT(5) UNSIGNED NOT NULL,
  92. PRIMARY KEY (`name`,`index`)
  93. ) ENGINE=MyISAM;
  94. --
  95. -- Table structure for `db_roulette`
  96. --
  97. CREATE TABLE IF NOT EXISTS `db_roulette` (
  98. `index` int(11) NOT NULL default '0',
  99. `level` smallint(5) unsigned NOT NULL,
  100. `item_id` int(10) unsigned NOT NULL,
  101. `amount` smallint(5) unsigned NOT NULL DEFAULT '1',
  102. `flag` smallint(5) unsigned NOT NULL DEFAULT '1',
  103. PRIMARY KEY (`index`)
  104. ) ENGINE=MyISAM;
  105. --
  106. -- Table structure for table `bonus_script`
  107. --
  108. CREATE TABLE IF NOT EXISTS `bonus_script` (
  109. `char_id` INT(11) UNSIGNED NOT NULL,
  110. `script` TEXT NOT NULL,
  111. `tick` BIGINT(20) NOT NULL DEFAULT '0',
  112. `flag` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
  113. `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  114. `icon` SMALLINT(3) NOT NULL DEFAULT '-1',
  115. KEY `char_id` (`char_id`)
  116. ) ENGINE=InnoDB;
  117. --
  118. -- Table structure for table `buyingstore_items`
  119. --
  120. CREATE TABLE IF NOT EXISTS `buyingstore_items` (
  121. `buyingstore_id` int(10) unsigned NOT NULL,
  122. `index` smallint(5) unsigned NOT NULL,
  123. `item_id` int(10) unsigned NOT NULL,
  124. `amount` smallint(5) unsigned NOT NULL,
  125. `price` int(10) unsigned NOT NULL,
  126. PRIMARY KEY (`buyingstore_id`, `index`)
  127. ) ENGINE=MyISAM;
  128. --
  129. -- Table structure for table `buyingstores`
  130. --
  131. CREATE TABLE IF NOT EXISTS `buyingstores` (
  132. `id` int(10) unsigned NOT NULL,
  133. `account_id` int(11) unsigned NOT NULL,
  134. `char_id` int(10) unsigned NOT NULL,
  135. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  136. `map` varchar(20) NOT NULL,
  137. `x` smallint(5) unsigned NOT NULL,
  138. `y` smallint(5) unsigned NOT NULL,
  139. `title` varchar(80) NOT NULL,
  140. `limit` int(10) unsigned NOT NULL,
  141. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  142. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  143. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  144. `autotrade` tinyint(4) NOT NULL,
  145. PRIMARY KEY (`id`)
  146. ) ENGINE=MyISAM;
  147. --
  148. -- Table structure for table `cart_inventory`
  149. --
  150. CREATE TABLE IF NOT EXISTS `cart_inventory` (
  151. `id` int(11) NOT NULL auto_increment,
  152. `char_id` int(11) NOT NULL default '0',
  153. `nameid` int(10) unsigned NOT NULL default '0',
  154. `amount` int(11) NOT NULL default '0',
  155. `equip` int(11) unsigned NOT NULL default '0',
  156. `identify` smallint(6) NOT NULL default '0',
  157. `refine` tinyint(3) unsigned NOT NULL default '0',
  158. `attribute` tinyint(4) NOT NULL default '0',
  159. `card0` int(10) unsigned NOT NULL default '0',
  160. `card1` int(10) unsigned NOT NULL default '0',
  161. `card2` int(10) unsigned NOT NULL default '0',
  162. `card3` int(10) unsigned NOT NULL default '0',
  163. `option_id0` smallint(5) NOT NULL default '0',
  164. `option_val0` smallint(5) NOT NULL default '0',
  165. `option_parm0` tinyint(3) NOT NULL default '0',
  166. `option_id1` smallint(5) NOT NULL default '0',
  167. `option_val1` smallint(5) NOT NULL default '0',
  168. `option_parm1` tinyint(3) NOT NULL default '0',
  169. `option_id2` smallint(5) NOT NULL default '0',
  170. `option_val2` smallint(5) NOT NULL default '0',
  171. `option_parm2` tinyint(3) NOT NULL default '0',
  172. `option_id3` smallint(5) NOT NULL default '0',
  173. `option_val3` smallint(5) NOT NULL default '0',
  174. `option_parm3` tinyint(3) NOT NULL default '0',
  175. `option_id4` smallint(5) NOT NULL default '0',
  176. `option_val4` smallint(5) NOT NULL default '0',
  177. `option_parm4` tinyint(3) NOT NULL default '0',
  178. `expire_time` int(11) unsigned NOT NULL default '0',
  179. `bound` tinyint(3) unsigned NOT NULL default '0',
  180. `unique_id` bigint(20) unsigned NOT NULL default '0',
  181. `enchantgrade` tinyint unsigned NOT NULL default '0',
  182. PRIMARY KEY (`id`),
  183. KEY `char_id` (`char_id`)
  184. ) ENGINE=MyISAM;
  185. --
  186. -- Table structure for table `char`
  187. --
  188. CREATE TABLE IF NOT EXISTS `char` (
  189. `char_id` int(11) unsigned NOT NULL auto_increment,
  190. `account_id` int(11) unsigned NOT NULL default '0',
  191. `char_num` tinyint(1) NOT NULL default '0',
  192. `name` varchar(30) NOT NULL DEFAULT '',
  193. `class` smallint(6) unsigned NOT NULL default '0',
  194. `base_level` smallint(6) unsigned NOT NULL default '1',
  195. `job_level` smallint(6) unsigned NOT NULL default '1',
  196. `base_exp` bigint(20) unsigned NOT NULL default '0',
  197. `job_exp` bigint(20) unsigned NOT NULL default '0',
  198. `zeny` int(11) unsigned NOT NULL default '0',
  199. `str` smallint(4) unsigned NOT NULL default '0',
  200. `agi` smallint(4) unsigned NOT NULL default '0',
  201. `vit` smallint(4) unsigned NOT NULL default '0',
  202. `int` smallint(4) unsigned NOT NULL default '0',
  203. `dex` smallint(4) unsigned NOT NULL default '0',
  204. `luk` smallint(4) unsigned NOT NULL default '0',
  205. `pow` smallint(4) unsigned NOT NULL default '0',
  206. `sta` smallint(4) unsigned NOT NULL default '0',
  207. `wis` smallint(4) unsigned NOT NULL default '0',
  208. `spl` smallint(4) unsigned NOT NULL default '0',
  209. `con` smallint(4) unsigned NOT NULL default '0',
  210. `crt` smallint(4) unsigned NOT NULL default '0',
  211. `max_hp` int(11) unsigned NOT NULL default '0',
  212. `hp` int(11) unsigned NOT NULL default '0',
  213. `max_sp` int(11) unsigned NOT NULL default '0',
  214. `sp` int(11) unsigned NOT NULL default '0',
  215. `max_ap` int(11) unsigned NOT NULL default '0',
  216. `ap` int(11) unsigned NOT NULL default '0',
  217. `status_point` int(11) unsigned NOT NULL default '0',
  218. `skill_point` int(11) unsigned NOT NULL default '0',
  219. `trait_point` int(11) unsigned NOT NULL default '0',
  220. `option` int(11) NOT NULL default '0',
  221. `karma` tinyint(3) NOT NULL default '0',
  222. `manner` smallint(6) NOT NULL default '0',
  223. `party_id` int(11) unsigned NOT NULL default '0',
  224. `guild_id` int(11) unsigned NOT NULL default '0',
  225. `pet_id` int(11) unsigned NOT NULL default '0',
  226. `homun_id` int(11) unsigned NOT NULL default '0',
  227. `elemental_id` int(11) unsigned NOT NULL default '0',
  228. `hair` tinyint(4) unsigned NOT NULL default '0',
  229. `hair_color` smallint(5) unsigned NOT NULL default '0',
  230. `clothes_color` smallint(5) unsigned NOT NULL default '0',
  231. `body` smallint(5) unsigned NOT NULL default '0',
  232. `weapon` smallint(6) unsigned NOT NULL default '0',
  233. `shield` smallint(6) unsigned NOT NULL default '0',
  234. `head_top` smallint(6) unsigned NOT NULL default '0',
  235. `head_mid` smallint(6) unsigned NOT NULL default '0',
  236. `head_bottom` smallint(6) unsigned NOT NULL default '0',
  237. `robe` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0',
  238. `last_map` varchar(11) NOT NULL default '',
  239. `last_x` smallint(4) unsigned NOT NULL default '53',
  240. `last_y` smallint(4) unsigned NOT NULL default '111',
  241. `last_instanceid` int(11) unsigned NOT NULL default '0',
  242. `save_map` varchar(11) NOT NULL default '',
  243. `save_x` smallint(4) unsigned NOT NULL default '53',
  244. `save_y` smallint(4) unsigned NOT NULL default '111',
  245. `partner_id` int(11) unsigned NOT NULL default '0',
  246. `online` tinyint(2) NOT NULL default '0',
  247. `father` int(11) unsigned NOT NULL default '0',
  248. `mother` int(11) unsigned NOT NULL default '0',
  249. `child` int(11) unsigned NOT NULL default '0',
  250. `fame` int(11) unsigned NOT NULL default '0',
  251. `rename` SMALLINT(3) unsigned NOT NULL default '0',
  252. `delete_date` INT(11) UNSIGNED NOT NULL DEFAULT '0',
  253. `moves` int(11) unsigned NOT NULL DEFAULT '0',
  254. `unban_time` int(11) unsigned NOT NULL default '0',
  255. `font` tinyint(3) unsigned NOT NULL default '0',
  256. `uniqueitem_counter` int(11) unsigned NOT NULL default '0',
  257. `sex` ENUM('M','F') NOT NULL,
  258. `hotkey_rowshift` tinyint(3) unsigned NOT NULL default '0',
  259. `hotkey_rowshift2` tinyint(3) unsigned NOT NULL default '0',
  260. `clan_id` int(11) unsigned NOT NULL default '0',
  261. `last_login` datetime DEFAULT NULL,
  262. `title_id` INT(11) unsigned NOT NULL default '0',
  263. `show_equip` tinyint(3) unsigned NOT NULL default '0',
  264. `inventory_slots` smallint(6) NOT NULL default '100',
  265. `body_direction` tinyint(1) unsigned NOT NULL default '0',
  266. `disable_call` tinyint(3) unsigned NOT NULL default '0',
  267. `disable_partyinvite` tinyint(1) unsigned NOT NULL default '0',
  268. PRIMARY KEY (`char_id`),
  269. UNIQUE KEY `name_key` (`name`),
  270. KEY `account_id` (`account_id`),
  271. KEY `party_id` (`party_id`),
  272. KEY `guild_id` (`guild_id`),
  273. KEY `online` (`online`)
  274. ) ENGINE=MyISAM AUTO_INCREMENT=150000;
  275. --
  276. -- Table structure for table `char_reg_num`
  277. --
  278. CREATE TABLE IF NOT EXISTS `char_reg_num` (
  279. `char_id` int(11) unsigned NOT NULL default '0',
  280. `key` varchar(32) binary NOT NULL default '',
  281. `index` int(11) unsigned NOT NULL default '0',
  282. `value` bigint(11) NOT NULL default '0',
  283. PRIMARY KEY (`char_id`,`key`,`index`),
  284. KEY `char_id` (`char_id`)
  285. ) ENGINE=MyISAM;
  286. --
  287. -- Table structure for table `char_reg_str`
  288. --
  289. CREATE TABLE IF NOT EXISTS `char_reg_str` (
  290. `char_id` int(11) unsigned NOT NULL default '0',
  291. `key` varchar(32) binary NOT NULL default '',
  292. `index` int(11) unsigned NOT NULL default '0',
  293. `value` varchar(254) NOT NULL default '0',
  294. PRIMARY KEY (`char_id`,`key`,`index`),
  295. KEY `char_id` (`char_id`)
  296. ) ENGINE=MyISAM;
  297. --
  298. -- Table structure for table `charlog`
  299. --
  300. CREATE TABLE IF NOT EXISTS `charlog` (
  301. `id` bigint(20) unsigned NOT NULL auto_increment,
  302. `time` datetime NOT NULL,
  303. `char_msg` varchar(255) NOT NULL default 'char select',
  304. `account_id` int(11) NOT NULL default '0',
  305. `char_num` tinyint(4) NOT NULL default '0',
  306. `name` varchar(23) NOT NULL default '',
  307. `str` int(11) unsigned NOT NULL default '0',
  308. `agi` int(11) unsigned NOT NULL default '0',
  309. `vit` int(11) unsigned NOT NULL default '0',
  310. `int` int(11) unsigned NOT NULL default '0',
  311. `dex` int(11) unsigned NOT NULL default '0',
  312. `luk` int(11) unsigned NOT NULL default '0',
  313. `hair` tinyint(4) NOT NULL default '0',
  314. `hair_color` int(11) NOT NULL default '0',
  315. PRIMARY KEY (`id`),
  316. KEY `account_id` (`account_id`)
  317. ) ENGINE=MyISAM;
  318. --
  319. -- Table structure for table `clan`
  320. --
  321. CREATE TABLE IF NOT EXISTS `clan` (
  322. `clan_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  323. `name` varchar(24) NOT NULL DEFAULT '',
  324. `master` varchar(24) NOT NULL DEFAULT '',
  325. `mapname` varchar(24) NOT NULL DEFAULT '',
  326. `max_member` smallint(6) unsigned NOT NULL DEFAULT '0',
  327. PRIMARY KEY (`clan_id`)
  328. ) ENGINE=MyISAM AUTO_INCREMENT=5;
  329. -- ----------------------------
  330. -- Records of clan
  331. -- ----------------------------
  332. INSERT INTO `clan` VALUES ('1', 'Swordman Clan', 'Raffam Oranpere', 'prontera', '500');
  333. INSERT INTO `clan` VALUES ('2', 'Arcwand Clan', 'Devon Aire', 'geffen', '500');
  334. INSERT INTO `clan` VALUES ('3', 'Golden Mace Clan', 'Berman Aire', 'prontera', '500');
  335. INSERT INTO `clan` VALUES ('4', 'Crossbow Clan', 'Shaam Rumi', 'payon', '500');
  336. --
  337. -- Table structure for `clan_alliance`
  338. --
  339. CREATE TABLE IF NOT EXISTS `clan_alliance` (
  340. `clan_id` int(11) unsigned NOT NULL DEFAULT '0',
  341. `opposition` int(11) unsigned NOT NULL DEFAULT '0',
  342. `alliance_id` int(11) unsigned NOT NULL DEFAULT '0',
  343. `name` varchar(24) NOT NULL DEFAULT '',
  344. PRIMARY KEY (`clan_id`,`alliance_id`),
  345. KEY `alliance_id` (`alliance_id`)
  346. ) ENGINE=MyISAM;
  347. -- ----------------------------
  348. -- Records of clan_alliance
  349. -- ----------------------------
  350. INSERT INTO `clan_alliance` VALUES ('1', '0', '3', 'Golden Mace Clan');
  351. INSERT INTO `clan_alliance` VALUES ('2', '0', '3', 'Golden Mace Clan');
  352. INSERT INTO `clan_alliance` VALUES ('2', '1', '4', 'Crossbow Clan');
  353. INSERT INTO `clan_alliance` VALUES ('3', '0', '1', 'Swordman Clan');
  354. INSERT INTO `clan_alliance` VALUES ('3', '0', '2', 'Arcwand Clan');
  355. INSERT INTO `clan_alliance` VALUES ('3', '0', '4', 'Crossbow Clan');
  356. INSERT INTO `clan_alliance` VALUES ('4', '0', '3', 'Golden Mace Clan');
  357. INSERT INTO `clan_alliance` VALUES ('4', '1', '2', 'Arcwand Clan');
  358. --
  359. -- Table structure for table `elemental`
  360. --
  361. CREATE TABLE IF NOT EXISTS `elemental` (
  362. `ele_id` int(11) unsigned NOT NULL auto_increment,
  363. `char_id` int(11) NOT NULL,
  364. `class` mediumint(9) unsigned NOT NULL default '0',
  365. `mode` int(11) unsigned NOT NULL default '1',
  366. `hp` int(11) unsigned NOT NULL default '0',
  367. `sp` int(11) unsigned NOT NULL default '0',
  368. `max_hp` int(11) unsigned NOT NULL default '0',
  369. `max_sp` int(11) unsigned NOT NULL default '0',
  370. `atk1` MEDIUMINT(6) unsigned NOT NULL default '0',
  371. `atk2` MEDIUMINT(6) unsigned NOT NULL default '0',
  372. `matk` MEDIUMINT(6) unsigned NOT NULL default '0',
  373. `aspd` smallint(4) unsigned NOT NULL default '0',
  374. `def` smallint(4) unsigned NOT NULL default '0',
  375. `mdef` smallint(4) unsigned NOT NULL default '0',
  376. `flee` smallint(4) unsigned NOT NULL default '0',
  377. `hit` smallint(4) unsigned NOT NULL default '0',
  378. `life_time` bigint(20) NOT NULL default '0',
  379. PRIMARY KEY (`ele_id`)
  380. ) ENGINE=MyISAM;
  381. --
  382. -- Table structure for table `friends`
  383. --
  384. CREATE TABLE IF NOT EXISTS `friends` (
  385. `char_id` int(11) NOT NULL default '0',
  386. `friend_id` int(11) NOT NULL default '0',
  387. PRIMARY KEY (`char_id`, `friend_id`)
  388. ) ENGINE=MyISAM;
  389. --
  390. -- Table structure for table `global_acc_reg_num`
  391. --
  392. CREATE TABLE IF NOT EXISTS `global_acc_reg_num` (
  393. `account_id` int(11) unsigned NOT NULL default '0',
  394. `key` varchar(32) binary NOT NULL default '',
  395. `index` int(11) unsigned NOT NULL default '0',
  396. `value` bigint(11) NOT NULL default '0',
  397. PRIMARY KEY (`account_id`,`key`,`index`),
  398. KEY `account_id` (`account_id`)
  399. ) ENGINE=MyISAM;
  400. --
  401. -- Table structure for table `global_acc_reg_str`
  402. --
  403. CREATE TABLE IF NOT EXISTS `global_acc_reg_str` (
  404. `account_id` int(11) unsigned NOT NULL default '0',
  405. `key` varchar(32) binary NOT NULL default '',
  406. `index` int(11) unsigned NOT NULL default '0',
  407. `value` varchar(254) NOT NULL default '0',
  408. PRIMARY KEY (`account_id`,`key`,`index`),
  409. KEY `account_id` (`account_id`)
  410. ) ENGINE=MyISAM;
  411. --
  412. -- Table structure for table `guild`
  413. --
  414. CREATE TABLE IF NOT EXISTS `guild` (
  415. `guild_id` int(11) unsigned NOT NULL auto_increment,
  416. `name` varchar(24) NOT NULL default '',
  417. `char_id` int(11) unsigned NOT NULL default '0',
  418. `master` varchar(24) NOT NULL default '',
  419. `guild_lv` tinyint(6) unsigned NOT NULL default '0',
  420. `connect_member` tinyint(6) unsigned NOT NULL default '0',
  421. `max_member` tinyint(6) unsigned NOT NULL default '0',
  422. `average_lv` smallint(6) unsigned NOT NULL default '1',
  423. `exp` bigint(20) unsigned NOT NULL default '0',
  424. `next_exp` bigint(20) unsigned NOT NULL default '0',
  425. `skill_point` tinyint(11) unsigned NOT NULL default '0',
  426. `mes1` varchar(60) NOT NULL default '',
  427. `mes2` varchar(120) NOT NULL default '',
  428. `emblem_len` int(11) unsigned NOT NULL default '0',
  429. `emblem_id` int(11) unsigned NOT NULL default '0',
  430. `emblem_data` blob,
  431. `last_master_change` datetime,
  432. PRIMARY KEY (`guild_id`,`char_id`),
  433. UNIQUE KEY `guild_id` (`guild_id`),
  434. KEY `char_id` (`char_id`)
  435. ) ENGINE=MyISAM;
  436. --
  437. -- Table structure for table `guild_alliance`
  438. --
  439. CREATE TABLE IF NOT EXISTS `guild_alliance` (
  440. `guild_id` int(11) unsigned NOT NULL default '0',
  441. `opposition` int(11) unsigned NOT NULL default '0',
  442. `alliance_id` int(11) unsigned NOT NULL default '0',
  443. `name` varchar(24) NOT NULL default '',
  444. PRIMARY KEY (`guild_id`,`alliance_id`),
  445. KEY `alliance_id` (`alliance_id`)
  446. ) ENGINE=MyISAM;
  447. --
  448. -- Table structure for table `guild_castle`
  449. --
  450. CREATE TABLE IF NOT EXISTS `guild_castle` (
  451. `castle_id` int(11) unsigned NOT NULL default '0',
  452. `guild_id` int(11) unsigned NOT NULL default '0',
  453. `economy` int(11) unsigned NOT NULL default '0',
  454. `defense` int(11) unsigned NOT NULL default '0',
  455. `triggerE` int(11) unsigned NOT NULL default '0',
  456. `triggerD` int(11) unsigned NOT NULL default '0',
  457. `nextTime` int(11) unsigned NOT NULL default '0',
  458. `payTime` int(11) unsigned NOT NULL default '0',
  459. `createTime` int(11) unsigned NOT NULL default '0',
  460. `visibleC` int(11) unsigned NOT NULL default '0',
  461. `visibleG0` int(11) unsigned NOT NULL default '0',
  462. `visibleG1` int(11) unsigned NOT NULL default '0',
  463. `visibleG2` int(11) unsigned NOT NULL default '0',
  464. `visibleG3` int(11) unsigned NOT NULL default '0',
  465. `visibleG4` int(11) unsigned NOT NULL default '0',
  466. `visibleG5` int(11) unsigned NOT NULL default '0',
  467. `visibleG6` int(11) unsigned NOT NULL default '0',
  468. `visibleG7` int(11) unsigned NOT NULL default '0',
  469. PRIMARY KEY (`castle_id`),
  470. KEY `guild_id` (`guild_id`)
  471. ) ENGINE=MyISAM;
  472. --
  473. -- Table structure for table `guild_expulsion`
  474. --
  475. CREATE TABLE IF NOT EXISTS `guild_expulsion` (
  476. `guild_id` int(11) unsigned NOT NULL default '0',
  477. `account_id` int(11) unsigned NOT NULL default '0',
  478. `name` varchar(24) NOT NULL default '',
  479. `mes` varchar(40) NOT NULL default '',
  480. `char_id` int(11) unsigned NOT NULL default '0',
  481. PRIMARY KEY (`guild_id`,`name`)
  482. ) ENGINE=MyISAM;
  483. --
  484. -- Table structure for table `guild_member`
  485. --
  486. CREATE TABLE IF NOT EXISTS `guild_member` (
  487. `guild_id` int(11) unsigned NOT NULL default '0',
  488. `char_id` int(11) unsigned NOT NULL default '0',
  489. `exp` bigint(20) unsigned NOT NULL default '0',
  490. `position` tinyint(6) unsigned NOT NULL default '0',
  491. PRIMARY KEY (`guild_id`,`char_id`),
  492. KEY `char_id` (`char_id`)
  493. ) ENGINE=MyISAM;
  494. --
  495. -- Table structure for table `guild_position`
  496. --
  497. CREATE TABLE IF NOT EXISTS `guild_position` (
  498. `guild_id` int(9) unsigned NOT NULL default '0',
  499. `position` tinyint(6) unsigned NOT NULL default '0',
  500. `name` varchar(24) NOT NULL default '',
  501. `mode` smallint(11) unsigned NOT NULL default '0',
  502. `exp_mode` tinyint(11) unsigned NOT NULL default '0',
  503. PRIMARY KEY (`guild_id`,`position`)
  504. ) ENGINE=MyISAM;
  505. --
  506. -- Table structure for table `guild_skill`
  507. --
  508. CREATE TABLE IF NOT EXISTS `guild_skill` (
  509. `guild_id` int(11) unsigned NOT NULL default '0',
  510. `id` smallint(11) unsigned NOT NULL default '0',
  511. `lv` tinyint(11) unsigned NOT NULL default '0',
  512. PRIMARY KEY (`guild_id`,`id`)
  513. ) ENGINE=MyISAM;
  514. --
  515. -- Table structure for table `guild_storage`
  516. --
  517. CREATE TABLE IF NOT EXISTS `guild_storage` (
  518. `id` int(10) unsigned NOT NULL auto_increment,
  519. `guild_id` int(11) unsigned NOT NULL default '0',
  520. `nameid` int(10) unsigned NOT NULL default '0',
  521. `amount` int(11) unsigned NOT NULL default '0',
  522. `equip` int(11) unsigned NOT NULL default '0',
  523. `identify` smallint(6) unsigned NOT NULL default '0',
  524. `refine` tinyint(3) unsigned NOT NULL default '0',
  525. `attribute` tinyint(4) unsigned NOT NULL default '0',
  526. `card0` int(10) unsigned NOT NULL default '0',
  527. `card1` int(10) unsigned NOT NULL default '0',
  528. `card2` int(10) unsigned NOT NULL default '0',
  529. `card3` int(10) unsigned NOT NULL default '0',
  530. `option_id0` smallint(5) NOT NULL default '0',
  531. `option_val0` smallint(5) NOT NULL default '0',
  532. `option_parm0` tinyint(3) NOT NULL default '0',
  533. `option_id1` smallint(5) NOT NULL default '0',
  534. `option_val1` smallint(5) NOT NULL default '0',
  535. `option_parm1` tinyint(3) NOT NULL default '0',
  536. `option_id2` smallint(5) NOT NULL default '0',
  537. `option_val2` smallint(5) NOT NULL default '0',
  538. `option_parm2` tinyint(3) NOT NULL default '0',
  539. `option_id3` smallint(5) NOT NULL default '0',
  540. `option_val3` smallint(5) NOT NULL default '0',
  541. `option_parm3` tinyint(3) NOT NULL default '0',
  542. `option_id4` smallint(5) NOT NULL default '0',
  543. `option_val4` smallint(5) NOT NULL default '0',
  544. `option_parm4` tinyint(3) NOT NULL default '0',
  545. `expire_time` int(11) unsigned NOT NULL default '0',
  546. `bound` tinyint(3) unsigned NOT NULL default '0',
  547. `unique_id` bigint(20) unsigned NOT NULL default '0',
  548. `enchantgrade` tinyint unsigned NOT NULL default '0',
  549. PRIMARY KEY (`id`),
  550. KEY `guild_id` (`guild_id`)
  551. ) ENGINE=MyISAM;
  552. --
  553. -- Table structure for table `guild_storage_log`
  554. --
  555. CREATE TABLE IF NOT EXISTS `guild_storage_log` (
  556. `id` int(11) NOT NULL auto_increment,
  557. `guild_id` int(11) unsigned NOT NULL default '0',
  558. `time` datetime NOT NULL,
  559. `char_id` int(11) NOT NULL default '0',
  560. `name` varchar(24) NOT NULL default '',
  561. `nameid` int(10) unsigned NOT NULL default '0',
  562. `amount` int(11) NOT NULL default '1',
  563. `identify` smallint(6) NOT NULL default '0',
  564. `refine` tinyint(3) unsigned NOT NULL default '0',
  565. `attribute` tinyint(4) unsigned NOT NULL default '0',
  566. `card0` int(10) unsigned NOT NULL default '0',
  567. `card1` int(10) unsigned NOT NULL default '0',
  568. `card2` int(10) unsigned NOT NULL default '0',
  569. `card3` int(10) unsigned NOT NULL default '0',
  570. `option_id0` smallint(5) NOT NULL default '0',
  571. `option_val0` smallint(5) NOT NULL default '0',
  572. `option_parm0` tinyint(3) NOT NULL default '0',
  573. `option_id1` smallint(5) NOT NULL default '0',
  574. `option_val1` smallint(5) NOT NULL default '0',
  575. `option_parm1` tinyint(3) NOT NULL default '0',
  576. `option_id2` smallint(5) NOT NULL default '0',
  577. `option_val2` smallint(5) NOT NULL default '0',
  578. `option_parm2` tinyint(3) NOT NULL default '0',
  579. `option_id3` smallint(5) NOT NULL default '0',
  580. `option_val3` smallint(5) NOT NULL default '0',
  581. `option_parm3` tinyint(3) NOT NULL default '0',
  582. `option_id4` smallint(5) NOT NULL default '0',
  583. `option_val4` smallint(5) NOT NULL default '0',
  584. `option_parm4` tinyint(3) NOT NULL default '0',
  585. `expire_time` int(11) unsigned NOT NULL default '0',
  586. `unique_id` bigint(20) unsigned NOT NULL default '0',
  587. `bound` tinyint(1) unsigned NOT NULL default '0',
  588. `enchantgrade` tinyint unsigned NOT NULL default '0',
  589. PRIMARY KEY (`id`),
  590. INDEX (`guild_id`)
  591. ) ENGINE=MyISAM AUTO_INCREMENT=1;
  592. --
  593. -- Table structure for table `homunculus`
  594. --
  595. CREATE TABLE IF NOT EXISTS `homunculus` (
  596. `homun_id` int(11) NOT NULL auto_increment,
  597. `char_id` int(11) NOT NULL,
  598. `class` mediumint(9) unsigned NOT NULL default '0',
  599. `prev_class` mediumint(9) NOT NULL default '0',
  600. `name` varchar(24) NOT NULL default '',
  601. `level` smallint(4) NOT NULL default '0',
  602. `exp` bigint(20) unsigned NOT NULL default '0',
  603. `intimacy` int(12) NOT NULL default '0',
  604. `hunger` smallint(4) NOT NULL default '0',
  605. `str` smallint(4) unsigned NOT NULL default '0',
  606. `agi` smallint(4) unsigned NOT NULL default '0',
  607. `vit` smallint(4) unsigned NOT NULL default '0',
  608. `int` smallint(4) unsigned NOT NULL default '0',
  609. `dex` smallint(4) unsigned NOT NULL default '0',
  610. `luk` smallint(4) unsigned NOT NULL default '0',
  611. `hp` int(11) unsigned NOT NULL default '0',
  612. `max_hp` int(11) unsigned NOT NULL default '0',
  613. `sp` int(11) unsigned NOT NULL default '0',
  614. `max_sp` int(11) unsigned NOT NULL default '0',
  615. `skill_point` smallint(4) unsigned NOT NULL default '0',
  616. `alive` tinyint(2) NOT NULL default '1',
  617. `rename_flag` tinyint(2) NOT NULL default '0',
  618. `vaporize` tinyint(2) NOT NULL default '0',
  619. `autofeed` tinyint(2) NOT NULL default '0',
  620. PRIMARY KEY (`homun_id`)
  621. ) ENGINE=MyISAM;
  622. --
  623. -- Table structure for table `hotkey`
  624. --
  625. CREATE TABLE IF NOT EXISTS `hotkey` (
  626. `char_id` INT(11) NOT NULL,
  627. `hotkey` TINYINT(2) unsigned NOT NULL,
  628. `type` TINYINT(1) unsigned NOT NULL default '0',
  629. `itemskill_id` INT(11) unsigned NOT NULL default '0',
  630. `skill_lvl` TINYINT(4) unsigned NOT NULL default '0',
  631. PRIMARY KEY (`char_id`,`hotkey`)
  632. ) ENGINE=MyISAM;
  633. --
  634. -- Table structure for table `interlog`
  635. --
  636. CREATE TABLE IF NOT EXISTS `interlog` (
  637. `id` INT NOT NULL AUTO_INCREMENT,
  638. `time` datetime NOT NULL,
  639. `log` varchar(255) NOT NULL default '',
  640. PRIMARY KEY (`id`),
  641. INDEX `time` (`time`)
  642. ) ENGINE=MyISAM;
  643. --
  644. -- Table structure for table `inventory`
  645. --
  646. CREATE TABLE IF NOT EXISTS `inventory` (
  647. `id` int(11) unsigned NOT NULL auto_increment,
  648. `char_id` int(11) unsigned NOT NULL default '0',
  649. `nameid` int(10) unsigned NOT NULL default '0',
  650. `amount` int(11) unsigned NOT NULL default '0',
  651. `equip` int(11) unsigned NOT NULL default '0',
  652. `identify` smallint(6) NOT NULL default '0',
  653. `refine` tinyint(3) unsigned NOT NULL default '0',
  654. `attribute` tinyint(4) unsigned NOT NULL default '0',
  655. `card0` int(10) unsigned NOT NULL default '0',
  656. `card1` int(10) unsigned NOT NULL default '0',
  657. `card2` int(10) unsigned NOT NULL default '0',
  658. `card3` int(10) unsigned NOT NULL default '0',
  659. `option_id0` smallint(5) NOT NULL default '0',
  660. `option_val0` smallint(5) NOT NULL default '0',
  661. `option_parm0` tinyint(3) NOT NULL default '0',
  662. `option_id1` smallint(5) NOT NULL default '0',
  663. `option_val1` smallint(5) NOT NULL default '0',
  664. `option_parm1` tinyint(3) NOT NULL default '0',
  665. `option_id2` smallint(5) NOT NULL default '0',
  666. `option_val2` smallint(5) NOT NULL default '0',
  667. `option_parm2` tinyint(3) NOT NULL default '0',
  668. `option_id3` smallint(5) NOT NULL default '0',
  669. `option_val3` smallint(5) NOT NULL default '0',
  670. `option_parm3` tinyint(3) NOT NULL default '0',
  671. `option_id4` smallint(5) NOT NULL default '0',
  672. `option_val4` smallint(5) NOT NULL default '0',
  673. `option_parm4` tinyint(3) NOT NULL default '0',
  674. `expire_time` int(11) unsigned NOT NULL default '0',
  675. `favorite` tinyint(3) unsigned NOT NULL default '0',
  676. `bound` tinyint(3) unsigned NOT NULL default '0',
  677. `unique_id` bigint(20) unsigned NOT NULL default '0',
  678. `equip_switch` int(11) unsigned NOT NULL default '0',
  679. `enchantgrade` tinyint unsigned NOT NULL default '0',
  680. PRIMARY KEY (`id`),
  681. KEY `char_id` (`char_id`)
  682. ) ENGINE=MyISAM;
  683. --
  684. -- Table structure for table `ipbanlist`
  685. --
  686. CREATE TABLE IF NOT EXISTS `ipbanlist` (
  687. `list` varchar(15) NOT NULL default '',
  688. `btime` datetime NOT NULL,
  689. `rtime` datetime NOT NULL,
  690. `reason` varchar(255) NOT NULL default '',
  691. PRIMARY KEY (`list`, `btime`)
  692. ) ENGINE=MyISAM;
  693. --
  694. -- Table structure for table `login`
  695. --
  696. CREATE TABLE IF NOT EXISTS `login` (
  697. `account_id` int(11) unsigned NOT NULL auto_increment,
  698. `userid` varchar(23) NOT NULL default '',
  699. `user_pass` varchar(32) NOT NULL default '',
  700. `sex` enum('M','F','S') NOT NULL default 'M',
  701. `email` varchar(39) NOT NULL default '',
  702. `group_id` tinyint(3) NOT NULL default '0',
  703. `state` int(11) unsigned NOT NULL default '0',
  704. `unban_time` int(11) unsigned NOT NULL default '0',
  705. `expiration_time` int(11) unsigned NOT NULL default '0',
  706. `logincount` mediumint(9) unsigned NOT NULL default '0',
  707. `lastlogin` datetime,
  708. `last_ip` varchar(100) NOT NULL default '',
  709. `birthdate` DATE,
  710. `character_slots` tinyint(3) unsigned NOT NULL default '0',
  711. `pincode` varchar(4) NOT NULL DEFAULT '',
  712. `pincode_change` int(11) unsigned NOT NULL DEFAULT '0',
  713. `vip_time` int(11) unsigned NOT NULL default '0',
  714. `old_group` tinyint(3) NOT NULL default '0',
  715. `web_auth_token` varchar(17) null,
  716. `web_auth_token_enabled` tinyint(2) NOT NULL default '0',
  717. PRIMARY KEY (`account_id`),
  718. KEY `name` (`userid`),
  719. UNIQUE KEY `web_auth_token_key` (`web_auth_token`)
  720. ) ENGINE=MyISAM AUTO_INCREMENT=2000000;
  721. -- added standard accounts for servers, VERY INSECURE!!!
  722. -- inserted into the table called login which is above
  723. INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
  724. --
  725. -- Table structure for table `mail`
  726. --
  727. CREATE TABLE IF NOT EXISTS `mail` (
  728. `id` bigint(20) unsigned NOT NULL auto_increment,
  729. `send_name` varchar(30) NOT NULL default '',
  730. `send_id` int(11) unsigned NOT NULL default '0',
  731. `dest_name` varchar(30) NOT NULL default '',
  732. `dest_id` int(11) unsigned NOT NULL default '0',
  733. `title` varchar(45) NOT NULL default '',
  734. `message` varchar(500) NOT NULL default '',
  735. `time` int(11) unsigned NOT NULL default '0',
  736. `status` tinyint(2) NOT NULL default '0',
  737. `zeny` int(11) unsigned NOT NULL default '0',
  738. `type` smallint(5) NOT NULL default '0',
  739. PRIMARY KEY (`id`)
  740. ) ENGINE=MyISAM;
  741. -- ----------------------------
  742. -- Table structure for `mail_attachments`
  743. -- ----------------------------
  744. CREATE TABLE IF NOT EXISTS `mail_attachments` (
  745. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  746. `index` smallint(5) unsigned NOT NULL DEFAULT '0',
  747. `nameid` int(10) unsigned NOT NULL DEFAULT '0',
  748. `amount` int(11) unsigned NOT NULL DEFAULT '0',
  749. `refine` tinyint(3) unsigned NOT NULL DEFAULT '0',
  750. `attribute` tinyint(4) unsigned NOT NULL DEFAULT '0',
  751. `identify` smallint(6) NOT NULL DEFAULT '0',
  752. `card0` int(10) unsigned NOT NULL DEFAULT '0',
  753. `card1` int(10) unsigned NOT NULL DEFAULT '0',
  754. `card2` int(10) unsigned NOT NULL DEFAULT '0',
  755. `card3` int(10) unsigned NOT NULL DEFAULT '0',
  756. `option_id0` smallint(5) NOT NULL default '0',
  757. `option_val0` smallint(5) NOT NULL default '0',
  758. `option_parm0` tinyint(3) NOT NULL default '0',
  759. `option_id1` smallint(5) NOT NULL default '0',
  760. `option_val1` smallint(5) NOT NULL default '0',
  761. `option_parm1` tinyint(3) NOT NULL default '0',
  762. `option_id2` smallint(5) NOT NULL default '0',
  763. `option_val2` smallint(5) NOT NULL default '0',
  764. `option_parm2` tinyint(3) NOT NULL default '0',
  765. `option_id3` smallint(5) NOT NULL default '0',
  766. `option_val3` smallint(5) NOT NULL default '0',
  767. `option_parm3` tinyint(3) NOT NULL default '0',
  768. `option_id4` smallint(5) NOT NULL default '0',
  769. `option_val4` smallint(5) NOT NULL default '0',
  770. `option_parm4` tinyint(3) NOT NULL default '0',
  771. `unique_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  772. `bound` tinyint(1) unsigned NOT NULL DEFAULT '0',
  773. `enchantgrade` tinyint unsigned NOT NULL default '0',
  774. PRIMARY KEY (`id`,`index`)
  775. ) ENGINE=MyISAM;
  776. --
  777. -- Table structure for table `mapreg`
  778. --
  779. CREATE TABLE IF NOT EXISTS `mapreg` (
  780. `varname` varchar(32) binary NOT NULL,
  781. `index` int(11) unsigned NOT NULL default '0',
  782. `value` varchar(255) NOT NULL,
  783. PRIMARY KEY (`varname`,`index`)
  784. ) ENGINE=MyISAM;
  785. --
  786. -- Table `market` for market shop persistency
  787. --
  788. CREATE TABLE IF NOT EXISTS `market` (
  789. `name` varchar(50) NOT NULL DEFAULT '',
  790. `nameid` int(10) UNSIGNED NOT NULL,
  791. `price` INT(11) UNSIGNED NOT NULL,
  792. `amount` INT(11) NOT NULL,
  793. `flag` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
  794. PRIMARY KEY (`name`,`nameid`)
  795. ) ENGINE = MyISAM;
  796. --
  797. -- Table structure for table `memo`
  798. --
  799. CREATE TABLE IF NOT EXISTS `memo` (
  800. `memo_id` int(11) unsigned NOT NULL auto_increment,
  801. `char_id` int(11) unsigned NOT NULL default '0',
  802. `map` varchar(11) NOT NULL default '',
  803. `x` smallint(4) unsigned NOT NULL default '0',
  804. `y` smallint(4) unsigned NOT NULL default '0',
  805. PRIMARY KEY (`memo_id`),
  806. KEY `char_id` (`char_id`)
  807. ) ENGINE=MyISAM;
  808. --
  809. -- Table structure for table `mercenary`
  810. --
  811. CREATE TABLE IF NOT EXISTS `mercenary` (
  812. `mer_id` int(11) unsigned NOT NULL auto_increment,
  813. `char_id` int(11) NOT NULL,
  814. `class` mediumint(9) unsigned NOT NULL default '0',
  815. `hp` int(11) unsigned NOT NULL default '0',
  816. `sp` int(11) unsigned NOT NULL default '0',
  817. `kill_counter` int(11) NOT NULL,
  818. `life_time` bigint(20) NOT NULL default '0',
  819. PRIMARY KEY (`mer_id`)
  820. ) ENGINE=MyISAM;
  821. --
  822. -- Table structure for table `mercenary_owner`
  823. --
  824. CREATE TABLE IF NOT EXISTS `mercenary_owner` (
  825. `char_id` int(11) NOT NULL,
  826. `merc_id` int(11) NOT NULL default '0',
  827. `arch_calls` int(11) NOT NULL default '0',
  828. `arch_faith` int(11) NOT NULL default '0',
  829. `spear_calls` int(11) NOT NULL default '0',
  830. `spear_faith` int(11) NOT NULL default '0',
  831. `sword_calls` int(11) NOT NULL default '0',
  832. `sword_faith` int(11) NOT NULL default '0',
  833. PRIMARY KEY (`char_id`)
  834. ) ENGINE=MyISAM;
  835. -- ----------------------------
  836. -- Table structure for `sales`
  837. -- ----------------------------
  838. CREATE TABLE IF NOT EXISTS `sales` (
  839. `nameid` int(10) unsigned NOT NULL,
  840. `start` datetime NOT NULL,
  841. `end` datetime NOT NULL,
  842. `amount` int(11) NOT NULL,
  843. PRIMARY KEY (`nameid`)
  844. ) ENGINE=MyISAM;
  845. --
  846. -- Table structure for table `sc_data`
  847. --
  848. CREATE TABLE IF NOT EXISTS `sc_data` (
  849. `account_id` int(11) unsigned NOT NULL,
  850. `char_id` int(11) unsigned NOT NULL,
  851. `type` smallint(11) unsigned NOT NULL,
  852. `tick` bigint(20) NOT NULL,
  853. `val1` int(11) NOT NULL default '0',
  854. `val2` int(11) NOT NULL default '0',
  855. `val3` int(11) NOT NULL default '0',
  856. `val4` int(11) NOT NULL default '0',
  857. PRIMARY KEY (`char_id`, `type`)
  858. ) ENGINE=MyISAM;
  859. --
  860. -- Table structure for table `skillcooldown`
  861. --
  862. CREATE TABLE IF NOT EXISTS `skillcooldown` (
  863. `account_id` int(11) unsigned NOT NULL,
  864. `char_id` int(11) unsigned NOT NULL,
  865. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  866. `tick` bigint(20) NOT NULL,
  867. PRIMARY KEY (`char_id`, `skill`)
  868. ) ENGINE=MyISAM;
  869. --
  870. -- Table structure for table `party`
  871. --
  872. CREATE TABLE IF NOT EXISTS `party` (
  873. `party_id` int(11) unsigned NOT NULL auto_increment,
  874. `name` varchar(24) NOT NULL default '',
  875. `exp` tinyint(11) unsigned NOT NULL default '0',
  876. `item` tinyint(11) unsigned NOT NULL default '0',
  877. `leader_id` int(11) unsigned NOT NULL default '0',
  878. `leader_char` int(11) unsigned NOT NULL default '0',
  879. PRIMARY KEY (`party_id`)
  880. ) ENGINE=MyISAM;
  881. --
  882. -- Table structure for table `party_bookings`
  883. --
  884. CREATE TABLE IF NOT EXISTS `party_bookings` (
  885. `world_name` varchar(32) NOT NULL,
  886. `account_id` int(11) unsigned NOT NULL,
  887. `char_id` int(11) unsigned NOT NULL,
  888. `char_name` varchar(23) NOT NULL,
  889. `purpose` smallint(5) unsigned NOT NULL DEFAULT '0',
  890. `assist` tinyint(3) unsigned NOT NULL DEFAULT '0',
  891. `damagedealer` tinyint(3) unsigned NOT NULL DEFAULT '0',
  892. `healer` tinyint(3) unsigned NOT NULL DEFAULT '0',
  893. `tanker` tinyint(3) unsigned NOT NULL DEFAULT '0',
  894. `minimum_level` smallint(5) unsigned NOT NULL,
  895. `maximum_level` smallint(5) unsigned NOT NULL,
  896. `comment` varchar(255) NOT NULL DEFAULT '',
  897. `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  898. PRIMARY KEY (`world_name`, `account_id`, `char_id`)
  899. ) ENGINE=MyISAM;
  900. --
  901. -- Table structure for table `pet`
  902. --
  903. CREATE TABLE IF NOT EXISTS `pet` (
  904. `pet_id` int(11) unsigned NOT NULL auto_increment,
  905. `class` mediumint(9) unsigned NOT NULL default '0',
  906. `name` varchar(24) NOT NULL default '',
  907. `account_id` int(11) unsigned NOT NULL default '0',
  908. `char_id` int(11) unsigned NOT NULL default '0',
  909. `level` smallint(4) unsigned NOT NULL default '0',
  910. `egg_id` int(10) unsigned NOT NULL default '0',
  911. `equip` int(10) unsigned NOT NULL default '0',
  912. `intimate` smallint(9) unsigned NOT NULL default '0',
  913. `hungry` smallint(9) unsigned NOT NULL default '0',
  914. `rename_flag` tinyint(4) unsigned NOT NULL default '0',
  915. `incubate` int(11) unsigned NOT NULL default '0',
  916. `autofeed` tinyint(2) NOT NULL default '0',
  917. PRIMARY KEY (`pet_id`)
  918. ) ENGINE=MyISAM;
  919. --
  920. -- Table structure for table `quest`
  921. --
  922. CREATE TABLE IF NOT EXISTS `quest` (
  923. `char_id` int(11) unsigned NOT NULL default '0',
  924. `quest_id` int(10) unsigned NOT NULL,
  925. `state` enum('0','1','2') NOT NULL default '0',
  926. `time` int(11) unsigned NOT NULL default '0',
  927. `count1` mediumint(8) unsigned NOT NULL default '0',
  928. `count2` mediumint(8) unsigned NOT NULL default '0',
  929. `count3` mediumint(8) unsigned NOT NULL default '0',
  930. PRIMARY KEY (`char_id`,`quest_id`)
  931. ) ENGINE=MyISAM;
  932. --
  933. -- Table structure for table `skill`
  934. --
  935. CREATE TABLE IF NOT EXISTS `skill` (
  936. `char_id` int(11) unsigned NOT NULL default '0',
  937. `id` smallint(11) unsigned NOT NULL default '0',
  938. `lv` tinyint(4) unsigned NOT NULL default '0',
  939. `flag` TINYINT(1) UNSIGNED NOT NULL default 0,
  940. PRIMARY KEY (`char_id`,`id`)
  941. ) ENGINE=MyISAM;
  942. --
  943. -- Table structure for table `skill_homunculus`
  944. --
  945. CREATE TABLE IF NOT EXISTS `skill_homunculus` (
  946. `homun_id` int(11) NOT NULL,
  947. `id` int(11) NOT NULL,
  948. `lv` smallint(6) NOT NULL,
  949. PRIMARY KEY (`homun_id`,`id`)
  950. ) ENGINE=MyISAM;
  951. --
  952. -- Table structure for table `skillcooldown_homunculus`
  953. --
  954. CREATE TABLE IF NOT EXISTS `skillcooldown_homunculus` (
  955. `homun_id` int(11) NOT NULL,
  956. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  957. `tick` bigint(20) NOT NULL,
  958. PRIMARY KEY (`homun_id`,`skill`)
  959. ) ENGINE=MyISAM;
  960. --
  961. -- Table structure for table `skillcooldown_mercenary`
  962. --
  963. CREATE TABLE IF NOT EXISTS `skillcooldown_mercenary` (
  964. `mer_id` int(11) NOT NULL,
  965. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  966. `tick` bigint(20) NOT NULL,
  967. PRIMARY KEY (`mer_id`,`skill`)
  968. ) ENGINE=MyISAM;
  969. --
  970. -- Table structure for table `storage`
  971. --
  972. CREATE TABLE IF NOT EXISTS `storage` (
  973. `id` int(11) unsigned NOT NULL auto_increment,
  974. `account_id` int(11) unsigned NOT NULL default '0',
  975. `nameid` int(10) unsigned NOT NULL default '0',
  976. `amount` smallint(11) unsigned NOT NULL default '0',
  977. `equip` int(11) unsigned NOT NULL default '0',
  978. `identify` smallint(6) unsigned NOT NULL default '0',
  979. `refine` tinyint(3) unsigned NOT NULL default '0',
  980. `attribute` tinyint(4) unsigned NOT NULL default '0',
  981. `card0` int(10) unsigned NOT NULL default '0',
  982. `card1` int(10) unsigned NOT NULL default '0',
  983. `card2` int(10) unsigned NOT NULL default '0',
  984. `card3` int(10) unsigned NOT NULL default '0',
  985. `option_id0` smallint(5) NOT NULL default '0',
  986. `option_val0` smallint(5) NOT NULL default '0',
  987. `option_parm0` tinyint(3) NOT NULL default '0',
  988. `option_id1` smallint(5) NOT NULL default '0',
  989. `option_val1` smallint(5) NOT NULL default '0',
  990. `option_parm1` tinyint(3) NOT NULL default '0',
  991. `option_id2` smallint(5) NOT NULL default '0',
  992. `option_val2` smallint(5) NOT NULL default '0',
  993. `option_parm2` tinyint(3) NOT NULL default '0',
  994. `option_id3` smallint(5) NOT NULL default '0',
  995. `option_val3` smallint(5) NOT NULL default '0',
  996. `option_parm3` tinyint(3) NOT NULL default '0',
  997. `option_id4` smallint(5) NOT NULL default '0',
  998. `option_val4` smallint(5) NOT NULL default '0',
  999. `option_parm4` tinyint(3) NOT NULL default '0',
  1000. `expire_time` int(11) unsigned NOT NULL default '0',
  1001. `bound` tinyint(3) unsigned NOT NULL default '0',
  1002. `unique_id` bigint(20) unsigned NOT NULL default '0',
  1003. `enchantgrade` tinyint unsigned NOT NULL default '0',
  1004. PRIMARY KEY (`id`),
  1005. KEY `account_id` (`account_id`)
  1006. ) ENGINE=MyISAM;
  1007. --
  1008. -- Table structure for table `vending_items`
  1009. --
  1010. CREATE TABLE IF NOT EXISTS `vending_items` (
  1011. `vending_id` int(10) unsigned NOT NULL,
  1012. `index` smallint(5) unsigned NOT NULL,
  1013. `cartinventory_id` int(10) unsigned NOT NULL,
  1014. `amount` smallint(5) unsigned NOT NULL,
  1015. `price` int(10) unsigned NOT NULL,
  1016. PRIMARY KEY (`vending_id`, `index`)
  1017. ) ENGINE=MyISAM;
  1018. --
  1019. -- Table structure for table `vendings`
  1020. --
  1021. CREATE TABLE IF NOT EXISTS `vendings` (
  1022. `id` int(10) unsigned NOT NULL,
  1023. `account_id` int(11) unsigned NOT NULL,
  1024. `char_id` int(10) unsigned NOT NULL,
  1025. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  1026. `map` varchar(20) NOT NULL,
  1027. `x` smallint(5) unsigned NOT NULL,
  1028. `y` smallint(5) unsigned NOT NULL,
  1029. `title` varchar(80) NOT NULL,
  1030. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  1031. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  1032. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  1033. `autotrade` tinyint(4) NOT NULL,
  1034. PRIMARY KEY (`id`)
  1035. ) ENGINE=MyISAM;