main.sql 37 KB

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