main.sql 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964
  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 `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. PRIMARY KEY (`char_id`),
  216. UNIQUE KEY `name_key` (`name`),
  217. KEY `account_id` (`account_id`),
  218. KEY `party_id` (`party_id`),
  219. KEY `guild_id` (`guild_id`),
  220. KEY `online` (`online`)
  221. ) ENGINE=MyISAM AUTO_INCREMENT=150000;
  222. --
  223. -- Table structure for table `char_reg_num`
  224. --
  225. CREATE TABLE IF NOT EXISTS `char_reg_num` (
  226. `char_id` int(11) unsigned NOT NULL default '0',
  227. `key` varchar(32) binary NOT NULL default '',
  228. `index` int(11) unsigned NOT NULL default '0',
  229. `value` int(11) NOT NULL default '0',
  230. PRIMARY KEY (`char_id`,`key`,`index`),
  231. KEY `char_id` (`char_id`)
  232. ) ENGINE=MyISAM;
  233. --
  234. -- Table structure for table `char_reg_str`
  235. --
  236. CREATE TABLE IF NOT EXISTS `char_reg_str` (
  237. `char_id` int(11) unsigned NOT NULL default '0',
  238. `key` varchar(32) binary NOT NULL default '',
  239. `index` int(11) unsigned NOT NULL default '0',
  240. `value` varchar(254) NOT NULL default '0',
  241. PRIMARY KEY (`char_id`,`key`,`index`),
  242. KEY `char_id` (`char_id`)
  243. ) ENGINE=MyISAM;
  244. --
  245. -- Table structure for table `charlog`
  246. --
  247. CREATE TABLE IF NOT EXISTS `charlog` (
  248. `time` datetime NOT NULL default '0000-00-00 00:00:00',
  249. `char_msg` varchar(255) NOT NULL default 'char select',
  250. `account_id` int(11) NOT NULL default '0',
  251. `char_num` tinyint(4) NOT NULL default '0',
  252. `name` varchar(23) NOT NULL default '',
  253. `str` int(11) unsigned NOT NULL default '0',
  254. `agi` int(11) unsigned NOT NULL default '0',
  255. `vit` int(11) unsigned NOT NULL default '0',
  256. `int` int(11) unsigned NOT NULL default '0',
  257. `dex` int(11) unsigned NOT NULL default '0',
  258. `luk` int(11) unsigned NOT NULL default '0',
  259. `hair` tinyint(4) NOT NULL default '0',
  260. `hair_color` int(11) NOT NULL default '0'
  261. ) ENGINE=MyISAM;
  262. --
  263. -- Table structure for table `elemental`
  264. --
  265. CREATE TABLE IF NOT EXISTS `elemental` (
  266. `ele_id` int(11) unsigned NOT NULL auto_increment,
  267. `char_id` int(11) NOT NULL,
  268. `class` mediumint(9) unsigned NOT NULL default '0',
  269. `mode` int(11) unsigned NOT NULL default '1',
  270. `hp` int(12) NOT NULL default '1',
  271. `sp` int(12) NOT NULL default '1',
  272. `max_hp` mediumint(8) unsigned NOT NULL default '0',
  273. `max_sp` mediumint(6) unsigned NOT NULL default '0',
  274. `atk1` MEDIUMINT(6) unsigned NOT NULL default '0',
  275. `atk2` MEDIUMINT(6) unsigned NOT NULL default '0',
  276. `matk` MEDIUMINT(6) unsigned NOT NULL default '0',
  277. `aspd` smallint(4) unsigned NOT NULL default '0',
  278. `def` smallint(4) unsigned NOT NULL default '0',
  279. `mdef` smallint(4) unsigned NOT NULL default '0',
  280. `flee` smallint(4) unsigned NOT NULL default '0',
  281. `hit` smallint(4) unsigned NOT NULL default '0',
  282. `life_time` int(11) NOT NULL default '0',
  283. PRIMARY KEY (`ele_id`)
  284. ) ENGINE=MyISAM;
  285. --
  286. -- Table structure for table `friends`
  287. --
  288. CREATE TABLE IF NOT EXISTS `friends` (
  289. `char_id` int(11) NOT NULL default '0',
  290. `friend_account` int(11) NOT NULL default '0',
  291. `friend_id` int(11) NOT NULL default '0',
  292. KEY `char_id` (`char_id`)
  293. ) ENGINE=MyISAM;
  294. --
  295. -- Table structure for table `global_acc_reg_num`
  296. --
  297. CREATE TABLE IF NOT EXISTS `global_acc_reg_num` (
  298. `account_id` int(11) unsigned NOT NULL default '0',
  299. `key` varchar(32) binary NOT NULL default '',
  300. `index` int(11) unsigned NOT NULL default '0',
  301. `value` int(11) NOT NULL default '0',
  302. PRIMARY KEY (`account_id`,`key`,`index`),
  303. KEY `account_id` (`account_id`)
  304. ) ENGINE=MyISAM;
  305. --
  306. -- Table structure for table `global_acc_reg_str`
  307. --
  308. CREATE TABLE IF NOT EXISTS `global_acc_reg_str` (
  309. `account_id` int(11) unsigned NOT NULL default '0',
  310. `key` varchar(32) binary NOT NULL default '',
  311. `index` int(11) unsigned NOT NULL default '0',
  312. `value` varchar(254) NOT NULL default '0',
  313. PRIMARY KEY (`account_id`,`key`,`index`),
  314. KEY `account_id` (`account_id`)
  315. ) ENGINE=MyISAM;
  316. --
  317. -- Table structure for table `guild`
  318. --
  319. CREATE TABLE IF NOT EXISTS `guild` (
  320. `guild_id` int(11) unsigned NOT NULL auto_increment,
  321. `name` varchar(24) NOT NULL default '',
  322. `char_id` int(11) unsigned NOT NULL default '0',
  323. `master` varchar(24) NOT NULL default '',
  324. `guild_lv` tinyint(6) unsigned NOT NULL default '0',
  325. `connect_member` tinyint(6) unsigned NOT NULL default '0',
  326. `max_member` tinyint(6) unsigned NOT NULL default '0',
  327. `average_lv` smallint(6) unsigned NOT NULL default '1',
  328. `exp` bigint(20) unsigned NOT NULL default '0',
  329. `next_exp` int(11) unsigned NOT NULL default '0',
  330. `skill_point` tinyint(11) unsigned NOT NULL default '0',
  331. `mes1` varchar(60) NOT NULL default '',
  332. `mes2` varchar(120) NOT NULL default '',
  333. `emblem_len` int(11) unsigned NOT NULL default '0',
  334. `emblem_id` int(11) unsigned NOT NULL default '0',
  335. `emblem_data` blob,
  336. PRIMARY KEY (`guild_id`,`char_id`),
  337. UNIQUE KEY `guild_id` (`guild_id`),
  338. KEY `char_id` (`char_id`)
  339. ) ENGINE=MyISAM;
  340. --
  341. -- Table structure for table `guild_alliance`
  342. --
  343. CREATE TABLE IF NOT EXISTS `guild_alliance` (
  344. `guild_id` int(11) unsigned NOT NULL default '0',
  345. `opposition` int(11) unsigned NOT NULL default '0',
  346. `alliance_id` int(11) unsigned NOT NULL default '0',
  347. `name` varchar(24) NOT NULL default '',
  348. PRIMARY KEY (`guild_id`,`alliance_id`),
  349. KEY `alliance_id` (`alliance_id`)
  350. ) ENGINE=MyISAM;
  351. --
  352. -- Table structure for table `guild_castle`
  353. --
  354. CREATE TABLE IF NOT EXISTS `guild_castle` (
  355. `castle_id` int(11) unsigned NOT NULL default '0',
  356. `guild_id` int(11) unsigned NOT NULL default '0',
  357. `economy` int(11) unsigned NOT NULL default '0',
  358. `defense` int(11) unsigned NOT NULL default '0',
  359. `triggerE` int(11) unsigned NOT NULL default '0',
  360. `triggerD` int(11) unsigned NOT NULL default '0',
  361. `nextTime` int(11) unsigned NOT NULL default '0',
  362. `payTime` int(11) unsigned NOT NULL default '0',
  363. `createTime` int(11) unsigned NOT NULL default '0',
  364. `visibleC` int(11) unsigned NOT NULL default '0',
  365. `visibleG0` int(11) unsigned NOT NULL default '0',
  366. `visibleG1` int(11) unsigned NOT NULL default '0',
  367. `visibleG2` int(11) unsigned NOT NULL default '0',
  368. `visibleG3` int(11) unsigned NOT NULL default '0',
  369. `visibleG4` int(11) unsigned NOT NULL default '0',
  370. `visibleG5` int(11) unsigned NOT NULL default '0',
  371. `visibleG6` int(11) unsigned NOT NULL default '0',
  372. `visibleG7` int(11) unsigned NOT NULL default '0',
  373. PRIMARY KEY (`castle_id`),
  374. KEY `guild_id` (`guild_id`)
  375. ) ENGINE=MyISAM;
  376. --
  377. -- Table structure for table `guild_expulsion`
  378. --
  379. CREATE TABLE IF NOT EXISTS `guild_expulsion` (
  380. `guild_id` int(11) unsigned NOT NULL default '0',
  381. `account_id` int(11) unsigned NOT NULL default '0',
  382. `name` varchar(24) NOT NULL default '',
  383. `mes` varchar(40) NOT NULL default '',
  384. PRIMARY KEY (`guild_id`,`name`)
  385. ) ENGINE=MyISAM;
  386. --
  387. -- Table structure for table `guild_member`
  388. --
  389. CREATE TABLE IF NOT EXISTS `guild_member` (
  390. `guild_id` int(11) unsigned NOT NULL default '0',
  391. `account_id` int(11) unsigned NOT NULL default '0',
  392. `char_id` int(11) unsigned NOT NULL default '0',
  393. `hair` tinyint(6) unsigned NOT NULL default '0',
  394. `hair_color` smallint(6) unsigned NOT NULL default '0',
  395. `gender` tinyint(6) unsigned NOT NULL default '0',
  396. `class` smallint(6) unsigned NOT NULL default '0',
  397. `lv` smallint(6) unsigned NOT NULL default '0',
  398. `exp` bigint(20) unsigned NOT NULL default '0',
  399. `exp_payper` tinyint(11) unsigned NOT NULL default '0',
  400. `online` tinyint(4) unsigned NOT NULL default '0',
  401. `position` tinyint(6) unsigned NOT NULL default '0',
  402. `name` varchar(24) NOT NULL default '',
  403. PRIMARY KEY (`guild_id`,`char_id`),
  404. KEY `char_id` (`char_id`)
  405. ) ENGINE=MyISAM;
  406. --
  407. -- Table structure for table `guild_position`
  408. --
  409. CREATE TABLE IF NOT EXISTS `guild_position` (
  410. `guild_id` int(9) unsigned NOT NULL default '0',
  411. `position` tinyint(6) unsigned NOT NULL default '0',
  412. `name` varchar(24) NOT NULL default '',
  413. `mode` tinyint(11) unsigned NOT NULL default '0',
  414. `exp_mode` tinyint(11) unsigned NOT NULL default '0',
  415. PRIMARY KEY (`guild_id`,`position`)
  416. ) ENGINE=MyISAM;
  417. --
  418. -- Table structure for table `guild_skill`
  419. --
  420. CREATE TABLE IF NOT EXISTS `guild_skill` (
  421. `guild_id` int(11) unsigned NOT NULL default '0',
  422. `id` smallint(11) unsigned NOT NULL default '0',
  423. `lv` tinyint(11) unsigned NOT NULL default '0',
  424. PRIMARY KEY (`guild_id`,`id`)
  425. ) ENGINE=MyISAM;
  426. --
  427. -- Table structure for table `guild_storage`
  428. --
  429. CREATE TABLE IF NOT EXISTS `guild_storage` (
  430. `id` int(10) unsigned NOT NULL auto_increment,
  431. `guild_id` int(11) unsigned NOT NULL default '0',
  432. `nameid` smallint(5) unsigned NOT NULL default '0',
  433. `amount` int(11) unsigned NOT NULL default '0',
  434. `equip` int(11) unsigned NOT NULL default '0',
  435. `identify` smallint(6) unsigned NOT NULL default '0',
  436. `refine` tinyint(3) unsigned NOT NULL default '0',
  437. `attribute` tinyint(4) unsigned NOT NULL default '0',
  438. `card0` smallint(5) unsigned NOT NULL default '0',
  439. `card1` smallint(5) unsigned NOT NULL default '0',
  440. `card2` smallint(5) unsigned NOT NULL default '0',
  441. `card3` smallint(5) unsigned NOT NULL default '0',
  442. `option_id0` smallint(5) unsigned NOT NULL default '0',
  443. `option_val0` smallint(5) unsigned NOT NULL default '0',
  444. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  445. `option_id1` smallint(5) unsigned NOT NULL default '0',
  446. `option_val1` smallint(5) unsigned NOT NULL default '0',
  447. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  448. `option_id2` smallint(5) unsigned NOT NULL default '0',
  449. `option_val2` smallint(5) unsigned NOT NULL default '0',
  450. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  451. `option_id3` smallint(5) unsigned NOT NULL default '0',
  452. `option_val3` smallint(5) unsigned NOT NULL default '0',
  453. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  454. `option_id4` smallint(5) unsigned NOT NULL default '0',
  455. `option_val4` smallint(5) unsigned NOT NULL default '0',
  456. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  457. `expire_time` int(11) unsigned NOT NULL default '0',
  458. `bound` tinyint(3) unsigned NOT NULL default '0',
  459. `unique_id` bigint(20) unsigned NOT NULL default '0',
  460. PRIMARY KEY (`id`),
  461. KEY `guild_id` (`guild_id`)
  462. ) ENGINE=MyISAM;
  463. --
  464. -- Table structure for table `homunculus`
  465. --
  466. CREATE TABLE IF NOT EXISTS `homunculus` (
  467. `homun_id` int(11) NOT NULL auto_increment,
  468. `char_id` int(11) NOT NULL,
  469. `class` mediumint(9) unsigned NOT NULL default '0',
  470. `prev_class` mediumint(9) NOT NULL default '0',
  471. `name` varchar(24) NOT NULL default '',
  472. `level` smallint(4) NOT NULL default '0',
  473. `exp` int(12) NOT NULL default '0',
  474. `intimacy` int(12) NOT NULL default '0',
  475. `hunger` smallint(4) NOT NULL default '0',
  476. `str` smallint(4) unsigned NOT NULL default '0',
  477. `agi` smallint(4) unsigned NOT NULL default '0',
  478. `vit` smallint(4) unsigned NOT NULL default '0',
  479. `int` smallint(4) unsigned NOT NULL default '0',
  480. `dex` smallint(4) unsigned NOT NULL default '0',
  481. `luk` smallint(4) unsigned NOT NULL default '0',
  482. `hp` int(12) NOT NULL default '1',
  483. `max_hp` int(12) NOT NULL default '1',
  484. `sp` int(12) NOT NULL default '1',
  485. `max_sp` int(12) NOT NULL default '1',
  486. `skill_point` smallint(4) unsigned NOT NULL default '0',
  487. `alive` tinyint(2) NOT NULL default '1',
  488. `rename_flag` tinyint(2) NOT NULL default '0',
  489. `vaporize` tinyint(2) NOT NULL default '0',
  490. PRIMARY KEY (`homun_id`)
  491. ) ENGINE=MyISAM;
  492. --
  493. -- Table structure for table `hotkey`
  494. --
  495. CREATE TABLE IF NOT EXISTS `hotkey` (
  496. `char_id` INT(11) NOT NULL,
  497. `hotkey` TINYINT(2) unsigned NOT NULL,
  498. `type` TINYINT(1) unsigned NOT NULL default '0',
  499. `itemskill_id` INT(11) unsigned NOT NULL default '0',
  500. `skill_lvl` TINYINT(4) unsigned NOT NULL default '0',
  501. PRIMARY KEY (`char_id`,`hotkey`)
  502. ) ENGINE=MyISAM;
  503. --
  504. -- Table structure for table `interlog`
  505. --
  506. CREATE TABLE IF NOT EXISTS `interlog` (
  507. `time` datetime NOT NULL default '0000-00-00 00:00:00',
  508. `log` varchar(255) NOT NULL default ''
  509. ) ENGINE=MyISAM;
  510. --
  511. -- Table structure for table `interreg`
  512. --
  513. CREATE TABLE IF NOT EXISTS `interreg` (
  514. `varname` varchar(11) NOT NULL,
  515. `value` varchar(20) NOT NULL,
  516. PRIMARY KEY (`varname`)
  517. ) ENGINE=InnoDB;
  518. --
  519. -- Table structure for table `inventory`
  520. --
  521. CREATE TABLE IF NOT EXISTS `inventory` (
  522. `id` int(11) unsigned NOT NULL auto_increment,
  523. `char_id` int(11) unsigned NOT NULL default '0',
  524. `nameid` smallint(5) unsigned NOT NULL default '0',
  525. `amount` int(11) unsigned NOT NULL default '0',
  526. `equip` int(11) unsigned NOT NULL default '0',
  527. `identify` smallint(6) NOT NULL default '0',
  528. `refine` tinyint(3) unsigned NOT NULL default '0',
  529. `attribute` tinyint(4) unsigned NOT NULL default '0',
  530. `card0` smallint(5) unsigned NOT NULL default '0',
  531. `card1` smallint(5) unsigned NOT NULL default '0',
  532. `card2` smallint(5) unsigned NOT NULL default '0',
  533. `card3` smallint(5) unsigned NOT NULL default '0',
  534. `option_id0` smallint(5) unsigned NOT NULL default '0',
  535. `option_val0` smallint(5) unsigned NOT NULL default '0',
  536. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  537. `option_id1` smallint(5) unsigned NOT NULL default '0',
  538. `option_val1` smallint(5) unsigned NOT NULL default '0',
  539. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  540. `option_id2` smallint(5) unsigned NOT NULL default '0',
  541. `option_val2` smallint(5) unsigned NOT NULL default '0',
  542. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  543. `option_id3` smallint(5) unsigned NOT NULL default '0',
  544. `option_val3` smallint(5) unsigned NOT NULL default '0',
  545. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  546. `option_id4` smallint(5) unsigned NOT NULL default '0',
  547. `option_val4` smallint(5) unsigned NOT NULL default '0',
  548. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  549. `expire_time` int(11) unsigned NOT NULL default '0',
  550. `favorite` tinyint(3) unsigned NOT NULL default '0',
  551. `bound` tinyint(3) unsigned NOT NULL default '0',
  552. `unique_id` bigint(20) unsigned NOT NULL default '0',
  553. PRIMARY KEY (`id`),
  554. KEY `char_id` (`char_id`)
  555. ) ENGINE=MyISAM;
  556. --
  557. -- Table structure for table `ipbanlist`
  558. --
  559. CREATE TABLE IF NOT EXISTS `ipbanlist` (
  560. `list` varchar(255) NOT NULL default '',
  561. `btime` datetime NOT NULL default '0000-00-00 00:00:00',
  562. `rtime` datetime NOT NULL default '0000-00-00 00:00:00',
  563. `reason` varchar(255) NOT NULL default '',
  564. KEY (`list`)
  565. ) ENGINE=MyISAM;
  566. --
  567. -- Table structure for table `login`
  568. --
  569. CREATE TABLE IF NOT EXISTS `login` (
  570. `account_id` int(11) unsigned NOT NULL auto_increment,
  571. `userid` varchar(23) NOT NULL default '',
  572. `user_pass` varchar(32) NOT NULL default '',
  573. `sex` enum('M','F','S') NOT NULL default 'M',
  574. `email` varchar(39) NOT NULL default '',
  575. `group_id` tinyint(3) NOT NULL default '0',
  576. `state` int(11) unsigned NOT NULL default '0',
  577. `unban_time` int(11) unsigned NOT NULL default '0',
  578. `expiration_time` int(11) unsigned NOT NULL default '0',
  579. `logincount` mediumint(9) unsigned NOT NULL default '0',
  580. `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00',
  581. `last_ip` varchar(100) NOT NULL default '',
  582. `birthdate` DATE NOT NULL DEFAULT '0000-00-00',
  583. `character_slots` tinyint(3) unsigned NOT NULL default '0',
  584. `pincode` varchar(4) NOT NULL DEFAULT '',
  585. `pincode_change` int(11) unsigned NOT NULL DEFAULT '0',
  586. `vip_time` int(11) unsigned NOT NULL default '0',
  587. `old_group` tinyint(3) NOT NULL default '0',
  588. PRIMARY KEY (`account_id`),
  589. KEY `name` (`userid`)
  590. ) ENGINE=MyISAM AUTO_INCREMENT=2000000;
  591. -- added standard accounts for servers, VERY INSECURE!!!
  592. -- inserted into the table called login which is above
  593. INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
  594. --
  595. -- Table structure for table `mail`
  596. --
  597. CREATE TABLE IF NOT EXISTS `mail` (
  598. `id` bigint(20) unsigned NOT NULL auto_increment,
  599. `send_name` varchar(30) NOT NULL default '',
  600. `send_id` int(11) unsigned NOT NULL default '0',
  601. `dest_name` varchar(30) NOT NULL default '',
  602. `dest_id` int(11) unsigned NOT NULL default '0',
  603. `title` varchar(45) NOT NULL default '',
  604. `message` varchar(255) NOT NULL default '',
  605. `time` int(11) unsigned NOT NULL default '0',
  606. `status` tinyint(2) NOT NULL default '0',
  607. `zeny` int(11) unsigned NOT NULL default '0',
  608. `nameid` smallint(5) unsigned NOT NULL default '0',
  609. `amount` int(11) unsigned NOT NULL default '0',
  610. `refine` tinyint(3) unsigned NOT NULL default '0',
  611. `attribute` tinyint(4) unsigned NOT NULL default '0',
  612. `identify` smallint(6) NOT NULL default '0',
  613. `card0` smallint(5) unsigned NOT NULL default '0',
  614. `card1` smallint(5) unsigned NOT NULL default '0',
  615. `card2` smallint(5) unsigned NOT NULL default '0',
  616. `card3` smallint(5) unsigned NOT NULL default '0',
  617. `option_id0` smallint(5) unsigned NOT NULL default '0',
  618. `option_val0` smallint(5) unsigned NOT NULL default '0',
  619. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  620. `option_id1` smallint(5) unsigned NOT NULL default '0',
  621. `option_val1` smallint(5) unsigned NOT NULL default '0',
  622. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  623. `option_id2` smallint(5) unsigned NOT NULL default '0',
  624. `option_val2` smallint(5) unsigned NOT NULL default '0',
  625. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  626. `option_id3` smallint(5) unsigned NOT NULL default '0',
  627. `option_val3` smallint(5) unsigned NOT NULL default '0',
  628. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  629. `option_id4` smallint(5) unsigned NOT NULL default '0',
  630. `option_val4` smallint(5) unsigned NOT NULL default '0',
  631. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  632. `unique_id` bigint(20) unsigned NOT NULL default '0',
  633. `bound` tinyint(1) unsigned NOT NULL default '0',
  634. PRIMARY KEY (`id`)
  635. ) ENGINE=MyISAM;
  636. --
  637. -- Table structure for table `mapreg`
  638. --
  639. CREATE TABLE IF NOT EXISTS `mapreg` (
  640. `varname` varchar(32) binary NOT NULL,
  641. `index` int(11) unsigned NOT NULL default '0',
  642. `value` varchar(255) NOT NULL,
  643. PRIMARY KEY (`varname`,`index`)
  644. ) ENGINE=MyISAM;
  645. --
  646. -- Table `market` for market shop persistency
  647. --
  648. CREATE TABLE IF NOT EXISTS `market` (
  649. `name` varchar(50) NOT NULL DEFAULT '',
  650. `nameid` SMALLINT(5) UNSIGNED NOT NULL,
  651. `price` INT(11) UNSIGNED NOT NULL,
  652. `amount` SMALLINT(5) UNSIGNED NOT NULL,
  653. `flag` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
  654. PRIMARY KEY (`name`,`nameid`)
  655. ) ENGINE = MyISAM;
  656. --
  657. -- Table structure for table `memo`
  658. --
  659. CREATE TABLE IF NOT EXISTS `memo` (
  660. `memo_id` int(11) unsigned NOT NULL auto_increment,
  661. `char_id` int(11) unsigned NOT NULL default '0',
  662. `map` varchar(11) NOT NULL default '',
  663. `x` smallint(4) unsigned NOT NULL default '0',
  664. `y` smallint(4) unsigned NOT NULL default '0',
  665. PRIMARY KEY (`memo_id`),
  666. KEY `char_id` (`char_id`)
  667. ) ENGINE=MyISAM;
  668. --
  669. -- Table structure for table `mercenary`
  670. --
  671. CREATE TABLE IF NOT EXISTS `mercenary` (
  672. `mer_id` int(11) unsigned NOT NULL auto_increment,
  673. `char_id` int(11) NOT NULL,
  674. `class` mediumint(9) unsigned NOT NULL default '0',
  675. `hp` int(12) NOT NULL default '1',
  676. `sp` int(12) NOT NULL default '1',
  677. `kill_counter` int(11) NOT NULL,
  678. `life_time` int(11) NOT NULL default '0',
  679. PRIMARY KEY (`mer_id`)
  680. ) ENGINE=MyISAM;
  681. --
  682. -- Table structure for table `mercenary_owner`
  683. --
  684. CREATE TABLE IF NOT EXISTS `mercenary_owner` (
  685. `char_id` int(11) NOT NULL,
  686. `merc_id` int(11) NOT NULL default '0',
  687. `arch_calls` int(11) NOT NULL default '0',
  688. `arch_faith` int(11) NOT NULL default '0',
  689. `spear_calls` int(11) NOT NULL default '0',
  690. `spear_faith` int(11) NOT NULL default '0',
  691. `sword_calls` int(11) NOT NULL default '0',
  692. `sword_faith` int(11) NOT NULL default '0',
  693. PRIMARY KEY (`char_id`)
  694. ) ENGINE=MyISAM;
  695. --
  696. -- Table structure for table `sc_data`
  697. --
  698. CREATE TABLE IF NOT EXISTS `sc_data` (
  699. `account_id` int(11) unsigned NOT NULL,
  700. `char_id` int(11) unsigned NOT NULL,
  701. `type` smallint(11) unsigned NOT NULL,
  702. `tick` int(11) NOT NULL,
  703. `val1` int(11) NOT NULL default '0',
  704. `val2` int(11) NOT NULL default '0',
  705. `val3` int(11) NOT NULL default '0',
  706. `val4` int(11) NOT NULL default '0',
  707. KEY (`account_id`),
  708. KEY (`char_id`)
  709. ) ENGINE=MyISAM;
  710. --
  711. -- Table structure for table `skillcooldown`
  712. --
  713. CREATE TABLE IF NOT EXISTS `skillcooldown` (
  714. `account_id` int(11) unsigned NOT NULL,
  715. `char_id` int(11) unsigned NOT NULL,
  716. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  717. `tick` int(11) NOT NULL,
  718. KEY `account_id` (`account_id`),
  719. KEY `char_id` (`char_id`)
  720. ) ENGINE=MyISAM;
  721. --
  722. -- Table structure for table `party`
  723. --
  724. CREATE TABLE IF NOT EXISTS `party` (
  725. `party_id` int(11) unsigned NOT NULL auto_increment,
  726. `name` varchar(24) NOT NULL default '',
  727. `exp` tinyint(11) unsigned NOT NULL default '0',
  728. `item` tinyint(11) unsigned NOT NULL default '0',
  729. `leader_id` int(11) unsigned NOT NULL default '0',
  730. `leader_char` int(11) unsigned NOT NULL default '0',
  731. PRIMARY KEY (`party_id`)
  732. ) ENGINE=MyISAM;
  733. --
  734. -- Table structure for table `pet`
  735. --
  736. CREATE TABLE IF NOT EXISTS `pet` (
  737. `pet_id` int(11) unsigned NOT NULL auto_increment,
  738. `class` mediumint(9) unsigned NOT NULL default '0',
  739. `name` varchar(24) NOT NULL default '',
  740. `account_id` int(11) unsigned NOT NULL default '0',
  741. `char_id` int(11) unsigned NOT NULL default '0',
  742. `level` smallint(4) unsigned NOT NULL default '0',
  743. `egg_id` smallint(5) unsigned NOT NULL default '0',
  744. `equip` mediumint(8) unsigned NOT NULL default '0',
  745. `intimate` smallint(9) unsigned NOT NULL default '0',
  746. `hungry` smallint(9) unsigned NOT NULL default '0',
  747. `rename_flag` tinyint(4) unsigned NOT NULL default '0',
  748. `incubate` int(11) unsigned NOT NULL default '0',
  749. PRIMARY KEY (`pet_id`)
  750. ) ENGINE=MyISAM;
  751. --
  752. -- Table structure for table `quest`
  753. --
  754. CREATE TABLE IF NOT EXISTS `quest` (
  755. `char_id` int(11) unsigned NOT NULL default '0',
  756. `quest_id` int(10) unsigned NOT NULL,
  757. `state` enum('0','1','2') NOT NULL default '0',
  758. `time` int(11) unsigned NOT NULL default '0',
  759. `count1` mediumint(8) unsigned NOT NULL default '0',
  760. `count2` mediumint(8) unsigned NOT NULL default '0',
  761. `count3` mediumint(8) unsigned NOT NULL default '0',
  762. PRIMARY KEY (`char_id`,`quest_id`)
  763. ) ENGINE=MyISAM;
  764. --
  765. -- Table structure for table `ragsrvinfo`
  766. --
  767. CREATE TABLE IF NOT EXISTS `ragsrvinfo` (
  768. `index` int(11) NOT NULL default '0',
  769. `name` varchar(255) NOT NULL default '',
  770. `exp` int(11) unsigned NOT NULL default '0',
  771. `jexp` int(11) unsigned NOT NULL default '0',
  772. `drop` int(11) unsigned NOT NULL default '0'
  773. ) ENGINE=MyISAM;
  774. --
  775. -- Table structure for table `skill`
  776. --
  777. CREATE TABLE IF NOT EXISTS `skill` (
  778. `char_id` int(11) unsigned NOT NULL default '0',
  779. `id` smallint(11) unsigned NOT NULL default '0',
  780. `lv` tinyint(4) unsigned NOT NULL default '0',
  781. `flag` TINYINT(1) UNSIGNED NOT NULL default 0,
  782. PRIMARY KEY (`char_id`,`id`)
  783. ) ENGINE=MyISAM;
  784. --
  785. -- Table structure for table `skill_homunculus`
  786. --
  787. CREATE TABLE IF NOT EXISTS `skill_homunculus` (
  788. `homun_id` int(11) NOT NULL,
  789. `id` int(11) NOT NULL,
  790. `lv` smallint(6) NOT NULL,
  791. PRIMARY KEY (`homun_id`,`id`)
  792. ) ENGINE=MyISAM;
  793. --
  794. -- Table structure for table `sstatus`
  795. --
  796. CREATE TABLE IF NOT EXISTS `sstatus` (
  797. `index` tinyint(4) unsigned NOT NULL default '0',
  798. `name` varchar(255) NOT NULL default '',
  799. `user` int(11) unsigned NOT NULL default '0'
  800. ) ENGINE=MyISAM;
  801. --
  802. -- Table structure for table `storage`
  803. --
  804. CREATE TABLE IF NOT EXISTS `storage` (
  805. `id` int(11) unsigned NOT NULL auto_increment,
  806. `account_id` int(11) unsigned NOT NULL default '0',
  807. `nameid` smallint(5) unsigned NOT NULL default '0',
  808. `amount` smallint(11) unsigned NOT NULL default '0',
  809. `equip` int(11) unsigned NOT NULL default '0',
  810. `identify` smallint(6) unsigned NOT NULL default '0',
  811. `refine` tinyint(3) unsigned NOT NULL default '0',
  812. `attribute` tinyint(4) unsigned NOT NULL default '0',
  813. `card0` smallint(5) unsigned NOT NULL default '0',
  814. `card1` smallint(5) unsigned NOT NULL default '0',
  815. `card2` smallint(5) unsigned NOT NULL default '0',
  816. `card3` smallint(5) unsigned NOT NULL default '0',
  817. `option_id0` smallint(5) unsigned NOT NULL default '0',
  818. `option_val0` smallint(5) unsigned NOT NULL default '0',
  819. `option_parm0` tinyint(3) unsigned NOT NULL default '0',
  820. `option_id1` smallint(5) unsigned NOT NULL default '0',
  821. `option_val1` smallint(5) unsigned NOT NULL default '0',
  822. `option_parm1` tinyint(3) unsigned NOT NULL default '0',
  823. `option_id2` smallint(5) unsigned NOT NULL default '0',
  824. `option_val2` smallint(5) unsigned NOT NULL default '0',
  825. `option_parm2` tinyint(3) unsigned NOT NULL default '0',
  826. `option_id3` smallint(5) unsigned NOT NULL default '0',
  827. `option_val3` smallint(5) unsigned NOT NULL default '0',
  828. `option_parm3` tinyint(3) unsigned NOT NULL default '0',
  829. `option_id4` smallint(5) unsigned NOT NULL default '0',
  830. `option_val4` smallint(5) unsigned NOT NULL default '0',
  831. `option_parm4` tinyint(3) unsigned NOT NULL default '0',
  832. `expire_time` int(11) unsigned NOT NULL default '0',
  833. `bound` tinyint(3) unsigned NOT NULL default '0',
  834. `unique_id` bigint(20) unsigned NOT NULL default '0',
  835. PRIMARY KEY (`id`),
  836. KEY `account_id` (`account_id`)
  837. ) ENGINE=MyISAM;
  838. --
  839. -- Table structure for table `vending_items`
  840. --
  841. CREATE TABLE IF NOT EXISTS `vending_items` (
  842. `vending_id` int(10) unsigned NOT NULL,
  843. `index` smallint(5) unsigned NOT NULL,
  844. `cartinventory_id` int(10) unsigned NOT NULL,
  845. `amount` smallint(5) unsigned NOT NULL,
  846. `price` int(10) unsigned NOT NULL
  847. ) ENGINE=MyISAM;
  848. --
  849. -- Table structure for table `vendings`
  850. --
  851. CREATE TABLE IF NOT EXISTS `vendings` (
  852. `id` int(10) unsigned NOT NULL,
  853. `account_id` int(11) unsigned NOT NULL,
  854. `char_id` int(10) unsigned NOT NULL,
  855. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  856. `map` varchar(20) NOT NULL,
  857. `x` smallint(5) unsigned NOT NULL,
  858. `y` smallint(5) unsigned NOT NULL,
  859. `title` varchar(80) NOT NULL,
  860. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  861. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  862. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  863. `autotrade` tinyint(4) NOT NULL,
  864. PRIMARY KEY (`id`)
  865. ) ENGINE=MyISAM;