main.sql 38 KB

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