main.sql 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  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. `last_master_change` datetime,
  379. PRIMARY KEY (`guild_id`,`char_id`),
  380. UNIQUE KEY `guild_id` (`guild_id`),
  381. KEY `char_id` (`char_id`)
  382. ) ENGINE=MyISAM;
  383. --
  384. -- Table structure for table `guild_alliance`
  385. --
  386. CREATE TABLE IF NOT EXISTS `guild_alliance` (
  387. `guild_id` int(11) unsigned NOT NULL default '0',
  388. `opposition` int(11) unsigned NOT NULL default '0',
  389. `alliance_id` int(11) unsigned NOT NULL default '0',
  390. `name` varchar(24) NOT NULL default '',
  391. PRIMARY KEY (`guild_id`,`alliance_id`),
  392. KEY `alliance_id` (`alliance_id`)
  393. ) ENGINE=MyISAM;
  394. --
  395. -- Table structure for table `guild_castle`
  396. --
  397. CREATE TABLE IF NOT EXISTS `guild_castle` (
  398. `castle_id` int(11) unsigned NOT NULL default '0',
  399. `guild_id` int(11) unsigned NOT NULL default '0',
  400. `economy` int(11) unsigned NOT NULL default '0',
  401. `defense` int(11) unsigned NOT NULL default '0',
  402. `triggerE` int(11) unsigned NOT NULL default '0',
  403. `triggerD` int(11) unsigned NOT NULL default '0',
  404. `nextTime` int(11) unsigned NOT NULL default '0',
  405. `payTime` int(11) unsigned NOT NULL default '0',
  406. `createTime` int(11) unsigned NOT NULL default '0',
  407. `visibleC` int(11) unsigned NOT NULL default '0',
  408. `visibleG0` int(11) unsigned NOT NULL default '0',
  409. `visibleG1` int(11) unsigned NOT NULL default '0',
  410. `visibleG2` int(11) unsigned NOT NULL default '0',
  411. `visibleG3` int(11) unsigned NOT NULL default '0',
  412. `visibleG4` int(11) unsigned NOT NULL default '0',
  413. `visibleG5` int(11) unsigned NOT NULL default '0',
  414. `visibleG6` int(11) unsigned NOT NULL default '0',
  415. `visibleG7` int(11) unsigned NOT NULL default '0',
  416. PRIMARY KEY (`castle_id`),
  417. KEY `guild_id` (`guild_id`)
  418. ) ENGINE=MyISAM;
  419. --
  420. -- Table structure for table `guild_expulsion`
  421. --
  422. CREATE TABLE IF NOT EXISTS `guild_expulsion` (
  423. `guild_id` int(11) unsigned NOT NULL default '0',
  424. `account_id` int(11) unsigned NOT NULL default '0',
  425. `name` varchar(24) NOT NULL default '',
  426. `mes` varchar(40) NOT NULL default '',
  427. PRIMARY KEY (`guild_id`,`name`)
  428. ) ENGINE=MyISAM;
  429. --
  430. -- Table structure for table `guild_member`
  431. --
  432. CREATE TABLE IF NOT EXISTS `guild_member` (
  433. `guild_id` int(11) unsigned NOT NULL default '0',
  434. `account_id` int(11) unsigned NOT NULL default '0',
  435. `char_id` int(11) unsigned NOT NULL default '0',
  436. `hair` tinyint(6) unsigned NOT NULL default '0',
  437. `hair_color` smallint(6) unsigned NOT NULL default '0',
  438. `gender` tinyint(6) unsigned NOT NULL default '0',
  439. `class` smallint(6) unsigned NOT NULL default '0',
  440. `lv` smallint(6) unsigned NOT NULL default '0',
  441. `exp` bigint(20) unsigned NOT NULL default '0',
  442. `exp_payper` tinyint(11) unsigned NOT NULL default '0',
  443. `online` tinyint(4) unsigned NOT NULL default '0',
  444. `position` tinyint(6) unsigned NOT NULL default '0',
  445. `name` varchar(24) NOT NULL default '',
  446. PRIMARY KEY (`guild_id`,`char_id`),
  447. KEY `char_id` (`char_id`)
  448. ) ENGINE=MyISAM;
  449. --
  450. -- Table structure for table `guild_position`
  451. --
  452. CREATE TABLE IF NOT EXISTS `guild_position` (
  453. `guild_id` int(9) unsigned NOT NULL default '0',
  454. `position` tinyint(6) unsigned NOT NULL default '0',
  455. `name` varchar(24) NOT NULL default '',
  456. `mode` tinyint(11) unsigned NOT NULL default '0',
  457. `exp_mode` tinyint(11) unsigned NOT NULL default '0',
  458. PRIMARY KEY (`guild_id`,`position`)
  459. ) ENGINE=MyISAM;
  460. --
  461. -- Table structure for table `guild_skill`
  462. --
  463. CREATE TABLE IF NOT EXISTS `guild_skill` (
  464. `guild_id` int(11) unsigned NOT NULL default '0',
  465. `id` smallint(11) unsigned NOT NULL default '0',
  466. `lv` tinyint(11) unsigned NOT NULL default '0',
  467. PRIMARY KEY (`guild_id`,`id`)
  468. ) ENGINE=MyISAM;
  469. --
  470. -- Table structure for table `guild_storage`
  471. --
  472. CREATE TABLE IF NOT EXISTS `guild_storage` (
  473. `id` int(10) unsigned NOT NULL auto_increment,
  474. `guild_id` int(11) unsigned NOT NULL default '0',
  475. `nameid` smallint(5) unsigned NOT NULL default '0',
  476. `amount` int(11) unsigned NOT NULL default '0',
  477. `equip` int(11) unsigned NOT NULL default '0',
  478. `identify` smallint(6) unsigned NOT NULL default '0',
  479. `refine` tinyint(3) unsigned NOT NULL default '0',
  480. `attribute` tinyint(4) unsigned NOT NULL default '0',
  481. `card0` smallint(5) unsigned NOT NULL default '0',
  482. `card1` smallint(5) unsigned NOT NULL default '0',
  483. `card2` smallint(5) unsigned NOT NULL default '0',
  484. `card3` smallint(5) unsigned NOT NULL default '0',
  485. `option_id0` smallint(5) unsigned NOT NULL default '0',
  486. `option_val0` smallint(5) unsigned NOT NULL default '0',
  487. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  488. `option_id1` smallint(5) unsigned NOT NULL default '0',
  489. `option_val1` smallint(5) unsigned NOT NULL default '0',
  490. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  491. `option_id2` smallint(5) unsigned NOT NULL default '0',
  492. `option_val2` smallint(5) unsigned NOT NULL default '0',
  493. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  494. `option_id3` smallint(5) unsigned NOT NULL default '0',
  495. `option_val3` smallint(5) unsigned NOT NULL default '0',
  496. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  497. `option_id4` smallint(5) unsigned NOT NULL default '0',
  498. `option_val4` smallint(5) unsigned NOT NULL default '0',
  499. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  500. `expire_time` int(11) unsigned NOT NULL default '0',
  501. `bound` tinyint(3) unsigned NOT NULL default '0',
  502. `unique_id` bigint(20) unsigned NOT NULL default '0',
  503. PRIMARY KEY (`id`),
  504. KEY `guild_id` (`guild_id`)
  505. ) ENGINE=MyISAM;
  506. --
  507. -- Table structure for table `homunculus`
  508. --
  509. CREATE TABLE IF NOT EXISTS `homunculus` (
  510. `homun_id` int(11) NOT NULL auto_increment,
  511. `char_id` int(11) NOT NULL,
  512. `class` mediumint(9) unsigned NOT NULL default '0',
  513. `prev_class` mediumint(9) NOT NULL default '0',
  514. `name` varchar(24) NOT NULL default '',
  515. `level` smallint(4) NOT NULL default '0',
  516. `exp` bigint(20) unsigned NOT NULL default '0',
  517. `intimacy` int(12) NOT NULL default '0',
  518. `hunger` smallint(4) NOT NULL default '0',
  519. `str` smallint(4) unsigned NOT NULL default '0',
  520. `agi` smallint(4) unsigned NOT NULL default '0',
  521. `vit` smallint(4) unsigned NOT NULL default '0',
  522. `int` smallint(4) unsigned NOT NULL default '0',
  523. `dex` smallint(4) unsigned NOT NULL default '0',
  524. `luk` smallint(4) unsigned NOT NULL default '0',
  525. `hp` int(12) NOT NULL default '1',
  526. `max_hp` int(12) NOT NULL default '1',
  527. `sp` int(12) NOT NULL default '1',
  528. `max_sp` int(12) NOT NULL default '1',
  529. `skill_point` smallint(4) unsigned NOT NULL default '0',
  530. `alive` tinyint(2) NOT NULL default '1',
  531. `rename_flag` tinyint(2) NOT NULL default '0',
  532. `vaporize` tinyint(2) NOT NULL default '0',
  533. PRIMARY KEY (`homun_id`)
  534. ) ENGINE=MyISAM;
  535. --
  536. -- Table structure for table `hotkey`
  537. --
  538. CREATE TABLE IF NOT EXISTS `hotkey` (
  539. `char_id` INT(11) NOT NULL,
  540. `hotkey` TINYINT(2) unsigned NOT NULL,
  541. `type` TINYINT(1) unsigned NOT NULL default '0',
  542. `itemskill_id` INT(11) unsigned NOT NULL default '0',
  543. `skill_lvl` TINYINT(4) unsigned NOT NULL default '0',
  544. PRIMARY KEY (`char_id`,`hotkey`)
  545. ) ENGINE=MyISAM;
  546. --
  547. -- Table structure for table `interlog`
  548. --
  549. CREATE TABLE IF NOT EXISTS `interlog` (
  550. `time` datetime NOT NULL,
  551. `log` varchar(255) NOT NULL default ''
  552. ) ENGINE=MyISAM;
  553. --
  554. -- Table structure for table `interreg`
  555. --
  556. CREATE TABLE IF NOT EXISTS `interreg` (
  557. `varname` varchar(11) NOT NULL,
  558. `value` varchar(20) NOT NULL,
  559. PRIMARY KEY (`varname`)
  560. ) ENGINE=InnoDB;
  561. --
  562. -- Table structure for table `inventory`
  563. --
  564. CREATE TABLE IF NOT EXISTS `inventory` (
  565. `id` int(11) unsigned NOT NULL auto_increment,
  566. `char_id` int(11) unsigned NOT NULL default '0',
  567. `nameid` smallint(5) unsigned NOT NULL default '0',
  568. `amount` int(11) unsigned NOT NULL default '0',
  569. `equip` int(11) unsigned NOT NULL default '0',
  570. `identify` smallint(6) NOT NULL default '0',
  571. `refine` tinyint(3) unsigned NOT NULL default '0',
  572. `attribute` tinyint(4) unsigned NOT NULL default '0',
  573. `card0` smallint(5) unsigned NOT NULL default '0',
  574. `card1` smallint(5) unsigned NOT NULL default '0',
  575. `card2` smallint(5) unsigned NOT NULL default '0',
  576. `card3` smallint(5) unsigned NOT NULL default '0',
  577. `option_id0` smallint(5) unsigned NOT NULL default '0',
  578. `option_val0` smallint(5) unsigned NOT NULL default '0',
  579. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  580. `option_id1` smallint(5) unsigned NOT NULL default '0',
  581. `option_val1` smallint(5) unsigned NOT NULL default '0',
  582. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  583. `option_id2` smallint(5) unsigned NOT NULL default '0',
  584. `option_val2` smallint(5) unsigned NOT NULL default '0',
  585. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  586. `option_id3` smallint(5) unsigned NOT NULL default '0',
  587. `option_val3` smallint(5) unsigned NOT NULL default '0',
  588. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  589. `option_id4` smallint(5) unsigned NOT NULL default '0',
  590. `option_val4` smallint(5) unsigned NOT NULL default '0',
  591. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  592. `expire_time` int(11) unsigned NOT NULL default '0',
  593. `favorite` tinyint(3) unsigned NOT NULL default '0',
  594. `bound` tinyint(3) unsigned NOT NULL default '0',
  595. `unique_id` bigint(20) unsigned NOT NULL default '0',
  596. PRIMARY KEY (`id`),
  597. KEY `char_id` (`char_id`)
  598. ) ENGINE=MyISAM;
  599. --
  600. -- Table structure for table `ipbanlist`
  601. --
  602. CREATE TABLE IF NOT EXISTS `ipbanlist` (
  603. `list` varchar(255) NOT NULL default '',
  604. `btime` datetime NOT NULL,
  605. `rtime` datetime NOT NULL,
  606. `reason` varchar(255) NOT NULL default '',
  607. KEY (`list`)
  608. ) ENGINE=MyISAM;
  609. --
  610. -- Table structure for table `login`
  611. --
  612. CREATE TABLE IF NOT EXISTS `login` (
  613. `account_id` int(11) unsigned NOT NULL auto_increment,
  614. `userid` varchar(23) NOT NULL default '',
  615. `user_pass` varchar(32) NOT NULL default '',
  616. `sex` enum('M','F','S') NOT NULL default 'M',
  617. `email` varchar(39) NOT NULL default '',
  618. `group_id` tinyint(3) NOT NULL default '0',
  619. `state` int(11) unsigned NOT NULL default '0',
  620. `unban_time` int(11) unsigned NOT NULL default '0',
  621. `expiration_time` int(11) unsigned NOT NULL default '0',
  622. `logincount` mediumint(9) unsigned NOT NULL default '0',
  623. `lastlogin` datetime,
  624. `last_ip` varchar(100) NOT NULL default '',
  625. `birthdate` DATE,
  626. `character_slots` tinyint(3) unsigned NOT NULL default '0',
  627. `pincode` varchar(4) NOT NULL DEFAULT '',
  628. `pincode_change` int(11) unsigned NOT NULL DEFAULT '0',
  629. `vip_time` int(11) unsigned NOT NULL default '0',
  630. `old_group` tinyint(3) NOT NULL default '0',
  631. PRIMARY KEY (`account_id`),
  632. KEY `name` (`userid`)
  633. ) ENGINE=MyISAM AUTO_INCREMENT=2000000;
  634. -- added standard accounts for servers, VERY INSECURE!!!
  635. -- inserted into the table called login which is above
  636. INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
  637. --
  638. -- Table structure for table `mail`
  639. --
  640. CREATE TABLE IF NOT EXISTS `mail` (
  641. `id` bigint(20) unsigned NOT NULL auto_increment,
  642. `send_name` varchar(30) NOT NULL default '',
  643. `send_id` int(11) unsigned NOT NULL default '0',
  644. `dest_name` varchar(30) NOT NULL default '',
  645. `dest_id` int(11) unsigned NOT NULL default '0',
  646. `title` varchar(45) NOT NULL default '',
  647. `message` varchar(255) NOT NULL default '',
  648. `time` int(11) unsigned NOT NULL default '0',
  649. `status` tinyint(2) NOT NULL default '0',
  650. `zeny` int(11) unsigned NOT NULL default '0',
  651. `type` smallint(5) NOT NULL default '0',
  652. PRIMARY KEY (`id`)
  653. ) ENGINE=MyISAM;
  654. -- ----------------------------
  655. -- Table structure for `mail_attachments`
  656. -- ----------------------------
  657. CREATE TABLE IF NOT EXISTS `mail_attachments` (
  658. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  659. `index` smallint(5) unsigned NOT NULL DEFAULT '0',
  660. `nameid` smallint(5) unsigned NOT NULL DEFAULT '0',
  661. `amount` int(11) unsigned NOT NULL DEFAULT '0',
  662. `refine` tinyint(3) unsigned NOT NULL DEFAULT '0',
  663. `attribute` tinyint(4) unsigned NOT NULL DEFAULT '0',
  664. `identify` smallint(6) NOT NULL DEFAULT '0',
  665. `card0` smallint(5) unsigned NOT NULL DEFAULT '0',
  666. `card1` smallint(5) unsigned NOT NULL DEFAULT '0',
  667. `card2` smallint(5) unsigned NOT NULL DEFAULT '0',
  668. `card3` smallint(5) unsigned NOT NULL DEFAULT '0',
  669. `option_id0` smallint(5) unsigned NOT NULL DEFAULT '0',
  670. `option_val0` smallint(5) unsigned NOT NULL DEFAULT '0',
  671. `option_parm0` tinyint(3) unsigned NOT NULL DEFAULT '0',
  672. `option_id1` smallint(5) unsigned NOT NULL DEFAULT '0',
  673. `option_val1` smallint(5) unsigned NOT NULL DEFAULT '0',
  674. `option_parm1` tinyint(3) unsigned NOT NULL DEFAULT '0',
  675. `option_id2` smallint(5) unsigned NOT NULL DEFAULT '0',
  676. `option_val2` smallint(5) unsigned NOT NULL DEFAULT '0',
  677. `option_parm2` tinyint(3) unsigned NOT NULL DEFAULT '0',
  678. `option_id3` smallint(5) unsigned NOT NULL DEFAULT '0',
  679. `option_val3` smallint(5) unsigned NOT NULL DEFAULT '0',
  680. `option_parm3` tinyint(3) unsigned NOT NULL DEFAULT '0',
  681. `option_id4` smallint(5) unsigned NOT NULL DEFAULT '0',
  682. `option_val4` smallint(5) unsigned NOT NULL DEFAULT '0',
  683. `option_parm4` tinyint(3) unsigned NOT NULL DEFAULT '0',
  684. `unique_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  685. `bound` tinyint(1) unsigned NOT NULL DEFAULT '0',
  686. PRIMARY KEY (`id`,`index`)
  687. ) ENGINE=MyISAM;
  688. --
  689. -- Table structure for table `mapreg`
  690. --
  691. CREATE TABLE IF NOT EXISTS `mapreg` (
  692. `varname` varchar(32) binary NOT NULL,
  693. `index` int(11) unsigned NOT NULL default '0',
  694. `value` varchar(255) NOT NULL,
  695. PRIMARY KEY (`varname`,`index`)
  696. ) ENGINE=MyISAM;
  697. --
  698. -- Table `market` for market shop persistency
  699. --
  700. CREATE TABLE IF NOT EXISTS `market` (
  701. `name` varchar(50) NOT NULL DEFAULT '',
  702. `nameid` SMALLINT(5) UNSIGNED NOT NULL,
  703. `price` INT(11) UNSIGNED NOT NULL,
  704. `amount` SMALLINT(5) UNSIGNED NOT NULL,
  705. `flag` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
  706. PRIMARY KEY (`name`,`nameid`)
  707. ) ENGINE = MyISAM;
  708. --
  709. -- Table structure for table `memo`
  710. --
  711. CREATE TABLE IF NOT EXISTS `memo` (
  712. `memo_id` int(11) unsigned NOT NULL auto_increment,
  713. `char_id` int(11) unsigned NOT NULL default '0',
  714. `map` varchar(11) NOT NULL default '',
  715. `x` smallint(4) unsigned NOT NULL default '0',
  716. `y` smallint(4) unsigned NOT NULL default '0',
  717. PRIMARY KEY (`memo_id`),
  718. KEY `char_id` (`char_id`)
  719. ) ENGINE=MyISAM;
  720. --
  721. -- Table structure for table `mercenary`
  722. --
  723. CREATE TABLE IF NOT EXISTS `mercenary` (
  724. `mer_id` int(11) unsigned NOT NULL auto_increment,
  725. `char_id` int(11) NOT NULL,
  726. `class` mediumint(9) unsigned NOT NULL default '0',
  727. `hp` int(12) NOT NULL default '1',
  728. `sp` int(12) NOT NULL default '1',
  729. `kill_counter` int(11) NOT NULL,
  730. `life_time` int(11) NOT NULL default '0',
  731. PRIMARY KEY (`mer_id`)
  732. ) ENGINE=MyISAM;
  733. --
  734. -- Table structure for table `mercenary_owner`
  735. --
  736. CREATE TABLE IF NOT EXISTS `mercenary_owner` (
  737. `char_id` int(11) NOT NULL,
  738. `merc_id` int(11) NOT NULL default '0',
  739. `arch_calls` int(11) NOT NULL default '0',
  740. `arch_faith` int(11) NOT NULL default '0',
  741. `spear_calls` int(11) NOT NULL default '0',
  742. `spear_faith` int(11) NOT NULL default '0',
  743. `sword_calls` int(11) NOT NULL default '0',
  744. `sword_faith` int(11) NOT NULL default '0',
  745. PRIMARY KEY (`char_id`)
  746. ) ENGINE=MyISAM;
  747. -- ----------------------------
  748. -- Table structure for `sales`
  749. -- ----------------------------
  750. CREATE TABLE IF NOT EXISTS `sales` (
  751. `nameid` smallint(5) unsigned NOT NULL,
  752. `start` datetime NOT NULL,
  753. `end` datetime NOT NULL,
  754. `amount` int(11) NOT NULL,
  755. PRIMARY KEY (`nameid`)
  756. ) ENGINE=MyISAM;
  757. --
  758. -- Table structure for table `sc_data`
  759. --
  760. CREATE TABLE IF NOT EXISTS `sc_data` (
  761. `account_id` int(11) unsigned NOT NULL,
  762. `char_id` int(11) unsigned NOT NULL,
  763. `type` smallint(11) unsigned NOT NULL,
  764. `tick` int(11) NOT NULL,
  765. `val1` int(11) NOT NULL default '0',
  766. `val2` int(11) NOT NULL default '0',
  767. `val3` int(11) NOT NULL default '0',
  768. `val4` int(11) NOT NULL default '0',
  769. KEY (`account_id`),
  770. KEY (`char_id`)
  771. ) ENGINE=MyISAM;
  772. --
  773. -- Table structure for table `skillcooldown`
  774. --
  775. CREATE TABLE IF NOT EXISTS `skillcooldown` (
  776. `account_id` int(11) unsigned NOT NULL,
  777. `char_id` int(11) unsigned NOT NULL,
  778. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  779. `tick` int(11) NOT NULL,
  780. KEY `account_id` (`account_id`),
  781. KEY `char_id` (`char_id`)
  782. ) ENGINE=MyISAM;
  783. --
  784. -- Table structure for table `party`
  785. --
  786. CREATE TABLE IF NOT EXISTS `party` (
  787. `party_id` int(11) unsigned NOT NULL auto_increment,
  788. `name` varchar(24) NOT NULL default '',
  789. `exp` tinyint(11) unsigned NOT NULL default '0',
  790. `item` tinyint(11) unsigned NOT NULL default '0',
  791. `leader_id` int(11) unsigned NOT NULL default '0',
  792. `leader_char` int(11) unsigned NOT NULL default '0',
  793. PRIMARY KEY (`party_id`)
  794. ) ENGINE=MyISAM;
  795. --
  796. -- Table structure for table `pet`
  797. --
  798. CREATE TABLE IF NOT EXISTS `pet` (
  799. `pet_id` int(11) unsigned NOT NULL auto_increment,
  800. `class` mediumint(9) unsigned NOT NULL default '0',
  801. `name` varchar(24) NOT NULL default '',
  802. `account_id` int(11) unsigned NOT NULL default '0',
  803. `char_id` int(11) unsigned NOT NULL default '0',
  804. `level` smallint(4) unsigned NOT NULL default '0',
  805. `egg_id` smallint(5) unsigned NOT NULL default '0',
  806. `equip` mediumint(8) unsigned NOT NULL default '0',
  807. `intimate` smallint(9) unsigned NOT NULL default '0',
  808. `hungry` smallint(9) unsigned NOT NULL default '0',
  809. `rename_flag` tinyint(4) unsigned NOT NULL default '0',
  810. `incubate` int(11) unsigned NOT NULL default '0',
  811. PRIMARY KEY (`pet_id`)
  812. ) ENGINE=MyISAM;
  813. --
  814. -- Table structure for table `quest`
  815. --
  816. CREATE TABLE IF NOT EXISTS `quest` (
  817. `char_id` int(11) unsigned NOT NULL default '0',
  818. `quest_id` int(10) unsigned NOT NULL,
  819. `state` enum('0','1','2') NOT NULL default '0',
  820. `time` int(11) unsigned NOT NULL default '0',
  821. `count1` mediumint(8) unsigned NOT NULL default '0',
  822. `count2` mediumint(8) unsigned NOT NULL default '0',
  823. `count3` mediumint(8) unsigned NOT NULL default '0',
  824. PRIMARY KEY (`char_id`,`quest_id`)
  825. ) ENGINE=MyISAM;
  826. --
  827. -- Table structure for table `ragsrvinfo`
  828. --
  829. CREATE TABLE IF NOT EXISTS `ragsrvinfo` (
  830. `index` int(11) NOT NULL default '0',
  831. `name` varchar(255) NOT NULL default '',
  832. `exp` int(11) unsigned NOT NULL default '0',
  833. `jexp` int(11) unsigned NOT NULL default '0',
  834. `drop` int(11) unsigned NOT NULL default '0'
  835. ) ENGINE=MyISAM;
  836. --
  837. -- Table structure for table `skill`
  838. --
  839. CREATE TABLE IF NOT EXISTS `skill` (
  840. `char_id` int(11) unsigned NOT NULL default '0',
  841. `id` smallint(11) unsigned NOT NULL default '0',
  842. `lv` tinyint(4) unsigned NOT NULL default '0',
  843. `flag` TINYINT(1) UNSIGNED NOT NULL default 0,
  844. PRIMARY KEY (`char_id`,`id`)
  845. ) ENGINE=MyISAM;
  846. --
  847. -- Table structure for table `skill_homunculus`
  848. --
  849. CREATE TABLE IF NOT EXISTS `skill_homunculus` (
  850. `homun_id` int(11) NOT NULL,
  851. `id` int(11) NOT NULL,
  852. `lv` smallint(6) NOT NULL,
  853. PRIMARY KEY (`homun_id`,`id`)
  854. ) ENGINE=MyISAM;
  855. --
  856. -- Table structure for table `sstatus`
  857. --
  858. CREATE TABLE IF NOT EXISTS `sstatus` (
  859. `index` tinyint(4) unsigned NOT NULL default '0',
  860. `name` varchar(255) NOT NULL default '',
  861. `user` int(11) unsigned NOT NULL default '0'
  862. ) ENGINE=MyISAM;
  863. --
  864. -- Table structure for table `storage`
  865. --
  866. CREATE TABLE IF NOT EXISTS `storage` (
  867. `id` int(11) unsigned NOT NULL auto_increment,
  868. `account_id` int(11) unsigned NOT NULL default '0',
  869. `nameid` smallint(5) unsigned NOT NULL default '0',
  870. `amount` smallint(11) unsigned NOT NULL default '0',
  871. `equip` int(11) unsigned NOT NULL default '0',
  872. `identify` smallint(6) unsigned NOT NULL default '0',
  873. `refine` tinyint(3) unsigned NOT NULL default '0',
  874. `attribute` tinyint(4) unsigned NOT NULL default '0',
  875. `card0` smallint(5) unsigned NOT NULL default '0',
  876. `card1` smallint(5) unsigned NOT NULL default '0',
  877. `card2` smallint(5) unsigned NOT NULL default '0',
  878. `card3` smallint(5) unsigned NOT NULL default '0',
  879. `option_id0` smallint(5) unsigned NOT NULL default '0',
  880. `option_val0` smallint(5) unsigned NOT NULL default '0',
  881. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  882. `option_id1` smallint(5) unsigned NOT NULL default '0',
  883. `option_val1` smallint(5) unsigned NOT NULL default '0',
  884. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  885. `option_id2` smallint(5) unsigned NOT NULL default '0',
  886. `option_val2` smallint(5) unsigned NOT NULL default '0',
  887. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  888. `option_id3` smallint(5) unsigned NOT NULL default '0',
  889. `option_val3` smallint(5) unsigned NOT NULL default '0',
  890. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  891. `option_id4` smallint(5) unsigned NOT NULL default '0',
  892. `option_val4` smallint(5) unsigned NOT NULL default '0',
  893. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  894. `expire_time` int(11) unsigned NOT NULL default '0',
  895. `bound` tinyint(3) unsigned NOT NULL default '0',
  896. `unique_id` bigint(20) unsigned NOT NULL default '0',
  897. PRIMARY KEY (`id`),
  898. KEY `account_id` (`account_id`)
  899. ) ENGINE=MyISAM;
  900. --
  901. -- Table structure for table `vending_items`
  902. --
  903. CREATE TABLE IF NOT EXISTS `vending_items` (
  904. `vending_id` int(10) unsigned NOT NULL,
  905. `index` smallint(5) unsigned NOT NULL,
  906. `cartinventory_id` int(10) unsigned NOT NULL,
  907. `amount` smallint(5) unsigned NOT NULL,
  908. `price` int(10) unsigned NOT NULL
  909. ) ENGINE=MyISAM;
  910. --
  911. -- Table structure for table `vendings`
  912. --
  913. CREATE TABLE IF NOT EXISTS `vendings` (
  914. `id` int(10) unsigned NOT NULL,
  915. `account_id` int(11) unsigned NOT NULL,
  916. `char_id` int(10) unsigned NOT NULL,
  917. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  918. `map` varchar(20) NOT NULL,
  919. `x` smallint(5) unsigned NOT NULL,
  920. `y` smallint(5) unsigned NOT NULL,
  921. `title` varchar(80) NOT NULL,
  922. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  923. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  924. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  925. `autotrade` tinyint(4) NOT NULL,
  926. PRIMARY KEY (`id`)
  927. ) ENGINE=MyISAM;