main.sql 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. --
  2. -- Table structure for table `skillcooldown`
  3. --
  4. CREATE TABLE IF NOT EXISTS `skillcooldown` (
  5. `account_id` int(11) unsigned NOT NULL,
  6. `char_id` int(11) unsigned NOT NULL,
  7. `skill` smallint(11) unsigned NOT NULL DEFAULT '0',
  8. `tick` int(11) NOT NULL,
  9. KEY `account_id` (`account_id`),
  10. KEY `char_id` (`char_id`)
  11. ) ENGINE=MyISAM;
  12. --
  13. -- Table structure for table `auction`
  14. --
  15. CREATE TABLE IF NOT EXISTS `auction` (
  16. `auction_id` bigint(20) unsigned NOT NULL auto_increment,
  17. `seller_id` int(11) unsigned NOT NULL default '0',
  18. `seller_name` varchar(30) NOT NULL default '',
  19. `buyer_id` int(11) unsigned NOT NULL default '0',
  20. `buyer_name` varchar(30) NOT NULL default '',
  21. `price` int(11) unsigned NOT NULL default '0',
  22. `buynow` int(11) unsigned NOT NULL default '0',
  23. `hours` smallint(6) NOT NULL default '0',
  24. `timestamp` int(11) unsigned NOT NULL default '0',
  25. `nameid` smallint(5) unsigned NOT NULL default '0',
  26. `item_name` varchar(50) NOT NULL default '',
  27. `type` smallint(6) NOT NULL default '0',
  28. `refine` tinyint(3) unsigned NOT NULL default '0',
  29. `attribute` tinyint(4) unsigned NOT NULL default '0',
  30. `card0` smallint(5) unsigned NOT NULL default '0',
  31. `card1` smallint(5) unsigned NOT NULL default '0',
  32. `card2` smallint(5) unsigned NOT NULL default '0',
  33. `card3` smallint(5) unsigned NOT NULL default '0',
  34. `unique_id` bigint(20) unsigned NOT NULL default '0',
  35. PRIMARY KEY (`auction_id`)
  36. ) ENGINE=MyISAM;
  37. --
  38. -- Table structure for table `cart_inventory`
  39. --
  40. CREATE TABLE IF NOT EXISTS `cart_inventory` (
  41. `id` int(11) NOT NULL auto_increment,
  42. `char_id` int(11) NOT NULL default '0',
  43. `nameid` smallint(5) unsigned NOT NULL default '0',
  44. `amount` int(11) NOT NULL default '0',
  45. `equip` int(11) unsigned NOT NULL default '0',
  46. `identify` smallint(6) NOT NULL default '0',
  47. `refine` tinyint(3) unsigned NOT NULL default '0',
  48. `attribute` tinyint(4) NOT NULL default '0',
  49. `card0` smallint(5) unsigned NOT NULL default '0',
  50. `card1` smallint(5) unsigned NOT NULL default '0',
  51. `card2` smallint(5) unsigned NOT NULL default '0',
  52. `card3` smallint(5) unsigned NOT NULL default '0',
  53. `expire_time` int(11) unsigned NOT NULL default '0',
  54. `bound` tinyint(3) unsigned NOT NULL default '0',
  55. `unique_id` bigint(20) unsigned NOT NULL default '0',
  56. PRIMARY KEY (`id`),
  57. KEY `char_id` (`char_id`)
  58. ) ENGINE=MyISAM;
  59. --
  60. -- Table structure for table `char`
  61. --
  62. CREATE TABLE IF NOT EXISTS `char` (
  63. `char_id` int(11) unsigned NOT NULL auto_increment,
  64. `account_id` int(11) unsigned NOT NULL default '0',
  65. `char_num` tinyint(1) NOT NULL default '0',
  66. `name` varchar(30) NOT NULL DEFAULT '',
  67. `class` smallint(6) unsigned NOT NULL default '0',
  68. `base_level` smallint(6) unsigned NOT NULL default '1',
  69. `job_level` smallint(6) unsigned NOT NULL default '1',
  70. `base_exp` bigint(20) unsigned NOT NULL default '0',
  71. `job_exp` bigint(20) unsigned NOT NULL default '0',
  72. `zeny` int(11) unsigned NOT NULL default '0',
  73. `str` smallint(4) unsigned NOT NULL default '0',
  74. `agi` smallint(4) unsigned NOT NULL default '0',
  75. `vit` smallint(4) unsigned NOT NULL default '0',
  76. `int` smallint(4) unsigned NOT NULL default '0',
  77. `dex` smallint(4) unsigned NOT NULL default '0',
  78. `luk` smallint(4) unsigned NOT NULL default '0',
  79. `max_hp` mediumint(8) unsigned NOT NULL default '0',
  80. `hp` mediumint(8) unsigned NOT NULL default '0',
  81. `max_sp` mediumint(6) unsigned NOT NULL default '0',
  82. `sp` mediumint(6) unsigned NOT NULL default '0',
  83. `status_point` int(11) unsigned NOT NULL default '0',
  84. `skill_point` int(11) unsigned NOT NULL default '0',
  85. `option` int(11) NOT NULL default '0',
  86. `karma` tinyint(3) NOT NULL default '0',
  87. `manner` smallint(6) NOT NULL default '0',
  88. `party_id` int(11) unsigned NOT NULL default '0',
  89. `guild_id` int(11) unsigned NOT NULL default '0',
  90. `pet_id` int(11) unsigned NOT NULL default '0',
  91. `homun_id` int(11) unsigned NOT NULL default '0',
  92. `elemental_id` int(11) unsigned NOT NULL default '0',
  93. `hair` tinyint(4) unsigned NOT NULL default '0',
  94. `hair_color` smallint(5) unsigned NOT NULL default '0',
  95. `clothes_color` smallint(5) unsigned NOT NULL default '0',
  96. `weapon` smallint(6) unsigned NOT NULL default '0',
  97. `shield` smallint(6) unsigned NOT NULL default '0',
  98. `head_top` smallint(6) unsigned NOT NULL default '0',
  99. `head_mid` smallint(6) unsigned NOT NULL default '0',
  100. `head_bottom` smallint(6) unsigned NOT NULL default '0',
  101. `robe` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0',
  102. `last_map` varchar(11) NOT NULL default '',
  103. `last_x` smallint(4) unsigned NOT NULL default '53',
  104. `last_y` smallint(4) unsigned NOT NULL default '111',
  105. `save_map` varchar(11) NOT NULL default '',
  106. `save_x` smallint(4) unsigned NOT NULL default '53',
  107. `save_y` smallint(4) unsigned NOT NULL default '111',
  108. `partner_id` int(11) unsigned NOT NULL default '0',
  109. `online` tinyint(2) NOT NULL default '0',
  110. `father` int(11) unsigned NOT NULL default '0',
  111. `mother` int(11) unsigned NOT NULL default '0',
  112. `child` int(11) unsigned NOT NULL default '0',
  113. `fame` int(11) unsigned NOT NULL default '0',
  114. `rename` SMALLINT(3) unsigned NOT NULL default '0',
  115. `delete_date` INT(11) UNSIGNED NOT NULL DEFAULT '0',
  116. `moves` int(11) unsigned NOT NULL DEFAULT '0',
  117. `unban_time` int(11) unsigned NOT NULL default '0',
  118. `font` tinyint(3) unsigned NOT NULL default '0',
  119. `uniqueitem_counter` int(11) unsigned NOT NULL default '0',
  120. PRIMARY KEY (`char_id`),
  121. UNIQUE KEY `name_key` (`name`),
  122. KEY `account_id` (`account_id`),
  123. KEY `party_id` (`party_id`),
  124. KEY `guild_id` (`guild_id`),
  125. KEY `online` (`online`)
  126. ) ENGINE=MyISAM AUTO_INCREMENT=150000;
  127. --
  128. -- Table structure for table `charlog`
  129. --
  130. CREATE TABLE IF NOT EXISTS `charlog` (
  131. `time` datetime NOT NULL default '0000-00-00 00:00:00',
  132. `char_msg` varchar(255) NOT NULL default 'char select',
  133. `account_id` int(11) NOT NULL default '0',
  134. `char_num` tinyint(4) NOT NULL default '0',
  135. `name` varchar(23) NOT NULL default '',
  136. `str` int(11) unsigned NOT NULL default '0',
  137. `agi` int(11) unsigned NOT NULL default '0',
  138. `vit` int(11) unsigned NOT NULL default '0',
  139. `int` int(11) unsigned NOT NULL default '0',
  140. `dex` int(11) unsigned NOT NULL default '0',
  141. `luk` int(11) unsigned NOT NULL default '0',
  142. `hair` tinyint(4) NOT NULL default '0',
  143. `hair_color` int(11) NOT NULL default '0'
  144. ) ENGINE=MyISAM;
  145. --
  146. -- Table structure for table `elemental`
  147. --
  148. CREATE TABLE IF NOT EXISTS `elemental` (
  149. `ele_id` int(11) unsigned NOT NULL auto_increment,
  150. `char_id` int(11) NOT NULL,
  151. `class` mediumint(9) unsigned NOT NULL default '0',
  152. `mode` int(11) unsigned NOT NULL default '1',
  153. `hp` int(12) NOT NULL default '1',
  154. `sp` int(12) NOT NULL default '1',
  155. `max_hp` mediumint(8) unsigned NOT NULL default '0',
  156. `max_sp` mediumint(6) unsigned NOT NULL default '0',
  157. `atk1` MEDIUMINT(6) unsigned NOT NULL default '0',
  158. `atk2` MEDIUMINT(6) unsigned NOT NULL default '0',
  159. `matk` MEDIUMINT(6) unsigned NOT NULL default '0',
  160. `aspd` smallint(4) unsigned NOT NULL default '0',
  161. `def` smallint(4) unsigned NOT NULL default '0',
  162. `mdef` smallint(4) unsigned NOT NULL default '0',
  163. `flee` smallint(4) unsigned NOT NULL default '0',
  164. `hit` smallint(4) unsigned NOT NULL default '0',
  165. `life_time` int(11) NOT NULL default '0',
  166. PRIMARY KEY (`ele_id`)
  167. ) ENGINE=MyISAM;
  168. --
  169. -- Table structure for table `friends`
  170. --
  171. CREATE TABLE IF NOT EXISTS `friends` (
  172. `char_id` int(11) NOT NULL default '0',
  173. `friend_account` int(11) NOT NULL default '0',
  174. `friend_id` int(11) NOT NULL default '0',
  175. KEY `char_id` (`char_id`)
  176. ) ENGINE=MyISAM;
  177. --
  178. -- Table structure for table `hotkey`
  179. --
  180. CREATE TABLE IF NOT EXISTS `hotkey` (
  181. `char_id` INT(11) NOT NULL,
  182. `hotkey` TINYINT(2) unsigned NOT NULL,
  183. `type` TINYINT(1) unsigned NOT NULL default '0',
  184. `itemskill_id` INT(11) unsigned NOT NULL default '0',
  185. `skill_lvl` TINYINT(4) unsigned NOT NULL default '0',
  186. PRIMARY KEY (`char_id`,`hotkey`)
  187. ) ENGINE=MyISAM;
  188. --
  189. -- Table structure for table `global_reg_value`
  190. --
  191. CREATE TABLE IF NOT EXISTS `global_reg_value` (
  192. `char_id` int(11) unsigned NOT NULL default '0',
  193. `str` varchar(255) NOT NULL default '',
  194. `value` varchar(255) NOT NULL default '0',
  195. `type` tinyint(1) NOT NULL default '3',
  196. `account_id` int(11) unsigned NOT NULL default '0',
  197. PRIMARY KEY (`char_id`,`str`,`account_id`),
  198. KEY `account_id` (`account_id`)
  199. ) ENGINE=MyISAM;
  200. --
  201. -- Table structure for table `guild`
  202. --
  203. CREATE TABLE IF NOT EXISTS `guild` (
  204. `guild_id` int(11) unsigned NOT NULL auto_increment,
  205. `name` varchar(24) NOT NULL default '',
  206. `char_id` int(11) unsigned NOT NULL default '0',
  207. `master` varchar(24) NOT NULL default '',
  208. `guild_lv` tinyint(6) unsigned NOT NULL default '0',
  209. `connect_member` tinyint(6) unsigned NOT NULL default '0',
  210. `max_member` tinyint(6) unsigned NOT NULL default '0',
  211. `average_lv` smallint(6) unsigned NOT NULL default '1',
  212. `exp` bigint(20) unsigned NOT NULL default '0',
  213. `next_exp` int(11) unsigned NOT NULL default '0',
  214. `skill_point` tinyint(11) unsigned NOT NULL default '0',
  215. `mes1` varchar(60) NOT NULL default '',
  216. `mes2` varchar(120) NOT NULL default '',
  217. `emblem_len` int(11) unsigned NOT NULL default '0',
  218. `emblem_id` int(11) unsigned NOT NULL default '0',
  219. `emblem_data` blob,
  220. PRIMARY KEY (`guild_id`,`char_id`),
  221. UNIQUE KEY `guild_id` (`guild_id`),
  222. KEY `char_id` (`char_id`)
  223. ) ENGINE=MyISAM;
  224. --
  225. -- Table structure for table `guild_alliance`
  226. --
  227. CREATE TABLE IF NOT EXISTS `guild_alliance` (
  228. `guild_id` int(11) unsigned NOT NULL default '0',
  229. `opposition` int(11) unsigned NOT NULL default '0',
  230. `alliance_id` int(11) unsigned NOT NULL default '0',
  231. `name` varchar(24) NOT NULL default '',
  232. PRIMARY KEY (`guild_id`,`alliance_id`),
  233. KEY `alliance_id` (`alliance_id`)
  234. ) ENGINE=MyISAM;
  235. --
  236. -- Table structure for table `guild_castle`
  237. --
  238. CREATE TABLE IF NOT EXISTS `guild_castle` (
  239. `castle_id` int(11) unsigned NOT NULL default '0',
  240. `guild_id` int(11) unsigned NOT NULL default '0',
  241. `economy` int(11) unsigned NOT NULL default '0',
  242. `defense` int(11) unsigned NOT NULL default '0',
  243. `triggerE` int(11) unsigned NOT NULL default '0',
  244. `triggerD` int(11) unsigned NOT NULL default '0',
  245. `nextTime` int(11) unsigned NOT NULL default '0',
  246. `payTime` int(11) unsigned NOT NULL default '0',
  247. `createTime` int(11) unsigned NOT NULL default '0',
  248. `visibleC` int(11) unsigned NOT NULL default '0',
  249. `visibleG0` int(11) unsigned NOT NULL default '0',
  250. `visibleG1` int(11) unsigned NOT NULL default '0',
  251. `visibleG2` int(11) unsigned NOT NULL default '0',
  252. `visibleG3` int(11) unsigned NOT NULL default '0',
  253. `visibleG4` int(11) unsigned NOT NULL default '0',
  254. `visibleG5` int(11) unsigned NOT NULL default '0',
  255. `visibleG6` int(11) unsigned NOT NULL default '0',
  256. `visibleG7` int(11) unsigned NOT NULL default '0',
  257. PRIMARY KEY (`castle_id`),
  258. KEY `guild_id` (`guild_id`)
  259. ) ENGINE=MyISAM;
  260. --
  261. -- Table structure for table `guild_expulsion`
  262. --
  263. CREATE TABLE IF NOT EXISTS `guild_expulsion` (
  264. `guild_id` int(11) unsigned NOT NULL default '0',
  265. `account_id` int(11) unsigned NOT NULL default '0',
  266. `name` varchar(24) NOT NULL default '',
  267. `mes` varchar(40) NOT NULL default '',
  268. PRIMARY KEY (`guild_id`,`name`)
  269. ) ENGINE=MyISAM;
  270. --
  271. -- Table structure for table `guild_member`
  272. --
  273. CREATE TABLE IF NOT EXISTS `guild_member` (
  274. `guild_id` int(11) unsigned NOT NULL default '0',
  275. `account_id` int(11) unsigned NOT NULL default '0',
  276. `char_id` int(11) unsigned NOT NULL default '0',
  277. `hair` tinyint(6) unsigned NOT NULL default '0',
  278. `hair_color` smallint(6) unsigned NOT NULL default '0',
  279. `gender` tinyint(6) unsigned NOT NULL default '0',
  280. `class` smallint(6) unsigned NOT NULL default '0',
  281. `lv` smallint(6) unsigned NOT NULL default '0',
  282. `exp` bigint(20) unsigned NOT NULL default '0',
  283. `exp_payper` tinyint(11) unsigned NOT NULL default '0',
  284. `online` tinyint(4) unsigned NOT NULL default '0',
  285. `position` tinyint(6) unsigned NOT NULL default '0',
  286. `name` varchar(24) NOT NULL default '',
  287. PRIMARY KEY (`guild_id`,`char_id`),
  288. KEY `char_id` (`char_id`)
  289. ) ENGINE=MyISAM;
  290. --
  291. -- Table structure for table `guild_position`
  292. --
  293. CREATE TABLE IF NOT EXISTS `guild_position` (
  294. `guild_id` int(9) unsigned NOT NULL default '0',
  295. `position` tinyint(6) unsigned NOT NULL default '0',
  296. `name` varchar(24) NOT NULL default '',
  297. `mode` tinyint(11) unsigned NOT NULL default '0',
  298. `exp_mode` tinyint(11) unsigned NOT NULL default '0',
  299. PRIMARY KEY (`guild_id`,`position`)
  300. ) ENGINE=MyISAM;
  301. --
  302. -- Table structure for table `guild_skill`
  303. --
  304. CREATE TABLE IF NOT EXISTS `guild_skill` (
  305. `guild_id` int(11) unsigned NOT NULL default '0',
  306. `id` smallint(11) unsigned NOT NULL default '0',
  307. `lv` tinyint(11) unsigned NOT NULL default '0',
  308. PRIMARY KEY (`guild_id`,`id`)
  309. ) ENGINE=MyISAM;
  310. --
  311. -- Table structure for table `guild_storage`
  312. --
  313. CREATE TABLE IF NOT EXISTS `guild_storage` (
  314. `id` int(10) unsigned NOT NULL auto_increment,
  315. `guild_id` int(11) unsigned NOT NULL default '0',
  316. `nameid` smallint(5) unsigned NOT NULL default '0',
  317. `amount` int(11) unsigned NOT NULL default '0',
  318. `equip` int(11) unsigned NOT NULL default '0',
  319. `identify` smallint(6) unsigned NOT NULL default '0',
  320. `refine` tinyint(3) unsigned NOT NULL default '0',
  321. `attribute` tinyint(4) unsigned NOT NULL default '0',
  322. `card0` smallint(5) unsigned NOT NULL default '0',
  323. `card1` smallint(5) unsigned NOT NULL default '0',
  324. `card2` smallint(5) unsigned NOT NULL default '0',
  325. `card3` smallint(5) unsigned NOT NULL default '0',
  326. `expire_time` int(11) unsigned NOT NULL default '0',
  327. `bound` tinyint(3) unsigned NOT NULL default '0',
  328. `unique_id` bigint(20) unsigned NOT NULL default '0',
  329. PRIMARY KEY (`id`),
  330. KEY `guild_id` (`guild_id`)
  331. ) ENGINE=MyISAM;
  332. --
  333. -- Table structure for table `homunculus`
  334. --
  335. CREATE TABLE IF NOT EXISTS `homunculus` (
  336. `homun_id` int(11) NOT NULL auto_increment,
  337. `char_id` int(11) NOT NULL,
  338. `class` mediumint(9) unsigned NOT NULL default '0',
  339. `prev_class` mediumint(9) NOT NULL default '0',
  340. `name` varchar(24) NOT NULL default '',
  341. `level` smallint(4) NOT NULL default '0',
  342. `exp` int(12) NOT NULL default '0',
  343. `intimacy` int(12) NOT NULL default '0',
  344. `hunger` smallint(4) NOT NULL default '0',
  345. `str` smallint(4) unsigned NOT NULL default '0',
  346. `agi` smallint(4) unsigned NOT NULL default '0',
  347. `vit` smallint(4) unsigned NOT NULL default '0',
  348. `int` smallint(4) unsigned NOT NULL default '0',
  349. `dex` smallint(4) unsigned NOT NULL default '0',
  350. `luk` smallint(4) unsigned NOT NULL default '0',
  351. `hp` int(12) NOT NULL default '1',
  352. `max_hp` int(12) NOT NULL default '1',
  353. `sp` int(12) NOT NULL default '1',
  354. `max_sp` int(12) NOT NULL default '1',
  355. `skill_point` smallint(4) unsigned NOT NULL default '0',
  356. `alive` tinyint(2) NOT NULL default '1',
  357. `rename_flag` tinyint(2) NOT NULL default '0',
  358. `vaporize` tinyint(2) NOT NULL default '0',
  359. PRIMARY KEY (`homun_id`)
  360. ) ENGINE=MyISAM;
  361. --
  362. -- Table structure for table `interlog`
  363. --
  364. CREATE TABLE IF NOT EXISTS `interlog` (
  365. `time` datetime NOT NULL default '0000-00-00 00:00:00',
  366. `log` varchar(255) NOT NULL default ''
  367. ) ENGINE=MyISAM;
  368. --
  369. -- Table structure for table `inventory`
  370. --
  371. CREATE TABLE IF NOT EXISTS `inventory` (
  372. `id` int(11) unsigned NOT NULL auto_increment,
  373. `char_id` int(11) unsigned NOT NULL default '0',
  374. `nameid` smallint(5) unsigned NOT NULL default '0',
  375. `amount` int(11) unsigned NOT NULL default '0',
  376. `equip` int(11) unsigned NOT NULL default '0',
  377. `identify` smallint(6) NOT NULL default '0',
  378. `refine` tinyint(3) unsigned NOT NULL default '0',
  379. `attribute` tinyint(4) unsigned NOT NULL default '0',
  380. `card0` smallint(5) unsigned NOT NULL default '0',
  381. `card1` smallint(5) unsigned NOT NULL default '0',
  382. `card2` smallint(5) unsigned NOT NULL default '0',
  383. `card3` smallint(5) unsigned NOT NULL default '0',
  384. `expire_time` int(11) unsigned NOT NULL default '0',
  385. `favorite` tinyint(3) unsigned NOT NULL default '0',
  386. `bound` tinyint(3) unsigned NOT NULL default '0',
  387. `unique_id` bigint(20) unsigned NOT NULL default '0',
  388. PRIMARY KEY (`id`),
  389. KEY `char_id` (`char_id`)
  390. ) ENGINE=MyISAM;
  391. --
  392. -- Table structure for table `ipbanlist`
  393. --
  394. CREATE TABLE IF NOT EXISTS `ipbanlist` (
  395. `list` varchar(255) NOT NULL default '',
  396. `btime` datetime NOT NULL default '0000-00-00 00:00:00',
  397. `rtime` datetime NOT NULL default '0000-00-00 00:00:00',
  398. `reason` varchar(255) NOT NULL default '',
  399. KEY (`list`)
  400. ) ENGINE=MyISAM;
  401. --
  402. -- Table structure for table `login`
  403. --
  404. CREATE TABLE IF NOT EXISTS `login` (
  405. `account_id` int(11) unsigned NOT NULL auto_increment,
  406. `userid` varchar(23) NOT NULL default '',
  407. `user_pass` varchar(32) NOT NULL default '',
  408. `sex` enum('M','F','S') NOT NULL default 'M',
  409. `email` varchar(39) NOT NULL default '',
  410. `group_id` tinyint(3) NOT NULL default '0',
  411. `state` int(11) unsigned NOT NULL default '0',
  412. `unban_time` int(11) unsigned NOT NULL default '0',
  413. `expiration_time` int(11) unsigned NOT NULL default '0',
  414. `logincount` mediumint(9) unsigned NOT NULL default '0',
  415. `lastlogin` datetime NOT NULL default '0000-00-00 00:00:00',
  416. `last_ip` varchar(100) NOT NULL default '',
  417. `birthdate` DATE NOT NULL DEFAULT '0000-00-00',
  418. `character_slots` tinyint(3) unsigned NOT NULL default '0',
  419. `pincode` varchar(4) NOT NULL DEFAULT '',
  420. `pincode_change` int(11) unsigned NOT NULL DEFAULT '0',
  421. `bank_vault` int(11) NOT NULL DEFAULT '0',
  422. `vip_time` int(11) unsigned NOT NULL default '0',
  423. `old_group` tinyint(3) NOT NULL default '0',
  424. PRIMARY KEY (`account_id`),
  425. KEY `name` (`userid`)
  426. ) ENGINE=MyISAM AUTO_INCREMENT=2000000;
  427. -- added standard accounts for servers, VERY INSECURE!!!
  428. -- inserted into the table called login which is above
  429. INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
  430. --
  431. -- Table structure for table `mapreg`
  432. --
  433. CREATE TABLE IF NOT EXISTS `mapreg` (
  434. `varname` varchar(32) NOT NULL,
  435. `index` int(11) unsigned NOT NULL default '0',
  436. `value` varchar(255) NOT NULL,
  437. KEY `varname` (`varname`),
  438. KEY `index` (`index`)
  439. ) ENGINE=MyISAM;
  440. --
  441. -- Table structure for table `sc_data`
  442. --
  443. CREATE TABLE IF NOT EXISTS `sc_data` (
  444. `account_id` int(11) unsigned NOT NULL,
  445. `char_id` int(11) unsigned NOT NULL,
  446. `type` smallint(11) unsigned NOT NULL,
  447. `tick` int(11) NOT NULL,
  448. `val1` int(11) NOT NULL default '0',
  449. `val2` int(11) NOT NULL default '0',
  450. `val3` int(11) NOT NULL default '0',
  451. `val4` int(11) NOT NULL default '0',
  452. KEY (`account_id`),
  453. KEY (`char_id`)
  454. ) ENGINE=MyISAM;
  455. --
  456. -- Table structure for table `mail`
  457. --
  458. CREATE TABLE IF NOT EXISTS `mail` (
  459. `id` bigint(20) unsigned NOT NULL auto_increment,
  460. `send_name` varchar(30) NOT NULL default '',
  461. `send_id` int(11) unsigned NOT NULL default '0',
  462. `dest_name` varchar(30) NOT NULL default '',
  463. `dest_id` int(11) unsigned NOT NULL default '0',
  464. `title` varchar(45) NOT NULL default '',
  465. `message` varchar(255) NOT NULL default '',
  466. `time` int(11) unsigned NOT NULL default '0',
  467. `status` tinyint(2) NOT NULL default '0',
  468. `zeny` int(11) unsigned NOT NULL default '0',
  469. `nameid` smallint(5) unsigned NOT NULL default '0',
  470. `amount` int(11) unsigned NOT NULL default '0',
  471. `refine` tinyint(3) unsigned NOT NULL default '0',
  472. `attribute` tinyint(4) unsigned NOT NULL default '0',
  473. `identify` smallint(6) NOT NULL default '0',
  474. `card0` smallint(5) unsigned NOT NULL default '0',
  475. `card1` smallint(5) unsigned NOT NULL default '0',
  476. `card2` smallint(5) unsigned NOT NULL default '0',
  477. `card3` smallint(5) unsigned NOT NULL default '0',
  478. `unique_id` bigint(20) unsigned NOT NULL default '0',
  479. `bound` tinyint(1) unsigned NOT NULL default '0',
  480. PRIMARY KEY (`id`)
  481. ) ENGINE=MyISAM;
  482. --
  483. -- Table structure for table `memo`
  484. --
  485. CREATE TABLE IF NOT EXISTS `memo` (
  486. `memo_id` int(11) unsigned NOT NULL auto_increment,
  487. `char_id` int(11) unsigned NOT NULL default '0',
  488. `map` varchar(11) NOT NULL default '',
  489. `x` smallint(4) unsigned NOT NULL default '0',
  490. `y` smallint(4) unsigned NOT NULL default '0',
  491. PRIMARY KEY (`memo_id`),
  492. KEY `char_id` (`char_id`)
  493. ) ENGINE=MyISAM;
  494. --
  495. -- Table structure for table `mercenary`
  496. --
  497. CREATE TABLE IF NOT EXISTS `mercenary` (
  498. `mer_id` int(11) unsigned NOT NULL auto_increment,
  499. `char_id` int(11) NOT NULL,
  500. `class` mediumint(9) unsigned NOT NULL default '0',
  501. `hp` int(12) NOT NULL default '1',
  502. `sp` int(12) NOT NULL default '1',
  503. `kill_counter` int(11) NOT NULL,
  504. `life_time` int(11) NOT NULL default '0',
  505. PRIMARY KEY (`mer_id`)
  506. ) ENGINE=MyISAM;
  507. --
  508. -- Table structure for table `mercenary_owner`
  509. --
  510. CREATE TABLE IF NOT EXISTS `mercenary_owner` (
  511. `char_id` int(11) NOT NULL,
  512. `merc_id` int(11) NOT NULL default '0',
  513. `arch_calls` int(11) NOT NULL default '0',
  514. `arch_faith` int(11) NOT NULL default '0',
  515. `spear_calls` int(11) NOT NULL default '0',
  516. `spear_faith` int(11) NOT NULL default '0',
  517. `sword_calls` int(11) NOT NULL default '0',
  518. `sword_faith` int(11) NOT NULL default '0',
  519. PRIMARY KEY (`char_id`)
  520. ) ENGINE=MyISAM;
  521. --
  522. -- Table structure for table `party`
  523. --
  524. CREATE TABLE IF NOT EXISTS `party` (
  525. `party_id` int(11) unsigned NOT NULL auto_increment,
  526. `name` varchar(24) NOT NULL default '',
  527. `exp` tinyint(11) unsigned NOT NULL default '0',
  528. `item` tinyint(11) unsigned NOT NULL default '0',
  529. `leader_id` int(11) unsigned NOT NULL default '0',
  530. `leader_char` int(11) unsigned NOT NULL default '0',
  531. PRIMARY KEY (`party_id`)
  532. ) ENGINE=MyISAM;
  533. --
  534. -- Table structure for table `pet`
  535. --
  536. CREATE TABLE IF NOT EXISTS `pet` (
  537. `pet_id` int(11) unsigned NOT NULL auto_increment,
  538. `class` mediumint(9) unsigned NOT NULL default '0',
  539. `name` varchar(24) NOT NULL default '',
  540. `account_id` int(11) unsigned NOT NULL default '0',
  541. `char_id` int(11) unsigned NOT NULL default '0',
  542. `level` smallint(4) unsigned NOT NULL default '0',
  543. `egg_id` smallint(5) unsigned NOT NULL default '0',
  544. `equip` mediumint(8) unsigned NOT NULL default '0',
  545. `intimate` smallint(9) unsigned NOT NULL default '0',
  546. `hungry` smallint(9) unsigned NOT NULL default '0',
  547. `rename_flag` tinyint(4) unsigned NOT NULL default '0',
  548. `incubate` int(11) unsigned NOT NULL default '0',
  549. PRIMARY KEY (`pet_id`)
  550. ) ENGINE=MyISAM;
  551. --
  552. -- Table structure for table `quest`
  553. --
  554. CREATE TABLE IF NOT EXISTS `quest` (
  555. `char_id` int(11) unsigned NOT NULL default '0',
  556. `quest_id` int(10) unsigned NOT NULL,
  557. `state` enum('0','1','2') NOT NULL default '0',
  558. `time` int(11) unsigned NOT NULL default '0',
  559. `count1` mediumint(8) unsigned NOT NULL default '0',
  560. `count2` mediumint(8) unsigned NOT NULL default '0',
  561. `count3` mediumint(8) unsigned NOT NULL default '0',
  562. PRIMARY KEY (`char_id`,`quest_id`)
  563. ) ENGINE=MyISAM;
  564. --
  565. -- Table structure for table `ragsrvinfo`
  566. --
  567. CREATE TABLE IF NOT EXISTS `ragsrvinfo` (
  568. `index` int(11) NOT NULL default '0',
  569. `name` varchar(255) NOT NULL default '',
  570. `exp` int(11) unsigned NOT NULL default '0',
  571. `jexp` int(11) unsigned NOT NULL default '0',
  572. `drop` int(11) unsigned NOT NULL default '0'
  573. ) ENGINE=MyISAM;
  574. --
  575. -- Table structure for table `skill`
  576. --
  577. CREATE TABLE IF NOT EXISTS `skill` (
  578. `char_id` int(11) unsigned NOT NULL default '0',
  579. `id` smallint(11) unsigned NOT NULL default '0',
  580. `lv` tinyint(4) unsigned NOT NULL default '0',
  581. `flag` TINYINT(1) UNSIGNED NOT NULL default 0,
  582. PRIMARY KEY (`char_id`,`id`)
  583. ) ENGINE=MyISAM;
  584. --
  585. -- Table structure for table `skill_homunculus`
  586. --
  587. CREATE TABLE IF NOT EXISTS `skill_homunculus` (
  588. `homun_id` int(11) NOT NULL,
  589. `id` int(11) NOT NULL,
  590. `lv` smallint(6) NOT NULL,
  591. PRIMARY KEY (`homun_id`,`id`)
  592. ) ENGINE=MyISAM;
  593. --
  594. -- Table structure for table `sstatus`
  595. --
  596. CREATE TABLE IF NOT EXISTS `sstatus` (
  597. `index` tinyint(4) unsigned NOT NULL default '0',
  598. `name` varchar(255) NOT NULL default '',
  599. `user` int(11) unsigned NOT NULL default '0'
  600. ) ENGINE=MyISAM;
  601. --
  602. -- Table structure for table `storage`
  603. --
  604. CREATE TABLE IF NOT EXISTS `storage` (
  605. `id` int(11) unsigned NOT NULL auto_increment,
  606. `account_id` int(11) unsigned NOT NULL default '0',
  607. `nameid` smallint(5) unsigned NOT NULL default '0',
  608. `amount` smallint(11) unsigned NOT NULL default '0',
  609. `equip` int(11) unsigned NOT NULL default '0',
  610. `identify` smallint(6) unsigned NOT NULL default '0',
  611. `refine` tinyint(3) unsigned NOT NULL default '0',
  612. `attribute` tinyint(4) unsigned 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. `expire_time` int(11) unsigned NOT NULL default '0',
  618. `bound` tinyint(3) unsigned NOT NULL default '0',
  619. `unique_id` bigint(20) unsigned NOT NULL default '0',
  620. PRIMARY KEY (`id`),
  621. KEY `account_id` (`account_id`)
  622. ) ENGINE=MyISAM;
  623. CREATE TABLE IF NOT EXISTS `interreg` (
  624. `varname` varchar(11) NOT NULL,
  625. `value` varchar(20) NOT NULL,
  626. PRIMARY KEY (`varname`)
  627. ) ENGINE=InnoDB;
  628. --
  629. -- Table structure for table `bonus_script`
  630. --
  631. CREATE TABLE IF NOT EXISTS `bonus_script` (
  632. `char_id` varchar(11) NOT NULL,
  633. `script` varchar(1024) NOT NULL,
  634. `tick` varchar(11) NOT NULL DEFAULT '0',
  635. `flag` varchar(3) NOT NULL DEFAULT '0',
  636. `type` char(1) NOT NULL DEFAULT '0',
  637. `icon` varchar(3) NOT NULL DEFAULT '-1'
  638. ) ENGINE=InnoDB;
  639. CREATE TABLE IF NOT EXISTS `vending_items` (
  640. `vending_id` int(10) unsigned NOT NULL,
  641. `index` smallint(5) unsigned NOT NULL,
  642. `cartinventory_id` int(10) unsigned NOT NULL,
  643. `amount` smallint(5) unsigned NOT NULL,
  644. `price` int(10) unsigned NOT NULL
  645. ) ENGINE=MyISAM;
  646. CREATE TABLE IF NOT EXISTS `vendings` (
  647. `id` int(10) unsigned NOT NULL,
  648. `account_id` int(11) unsigned NOT NULL,
  649. `char_id` int(10) unsigned NOT NULL,
  650. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  651. `map` varchar(20) NOT NULL,
  652. `x` smallint(5) unsigned NOT NULL,
  653. `y` smallint(5) unsigned NOT NULL,
  654. `title` varchar(80) NOT NULL,
  655. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  656. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  657. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  658. `autotrade` tinyint(4) NOT NULL,
  659. PRIMARY KEY (`id`)
  660. ) ENGINE=MyISAM;
  661. CREATE TABLE IF NOT EXISTS `buyingstore_items` (
  662. `buyingstore_id` int(10) unsigned NOT NULL,
  663. `index` smallint(5) unsigned NOT NULL,
  664. `item_id` int(10) unsigned NOT NULL,
  665. `amount` smallint(5) unsigned NOT NULL,
  666. `price` int(10) unsigned NOT NULL
  667. ) ENGINE=MyISAM;
  668. CREATE TABLE IF NOT EXISTS `buyingstores` (
  669. `id` int(10) unsigned NOT NULL,
  670. `account_id` int(11) unsigned NOT NULL,
  671. `char_id` int(10) unsigned NOT NULL,
  672. `sex` enum('F','M') NOT NULL DEFAULT 'M',
  673. `map` varchar(20) NOT NULL,
  674. `x` smallint(5) unsigned NOT NULL,
  675. `y` smallint(5) unsigned NOT NULL,
  676. `title` varchar(80) NOT NULL,
  677. `limit` int(10) unsigned NOT NULL,
  678. `body_direction` CHAR( 1 ) NOT NULL DEFAULT '4',
  679. `head_direction` CHAR( 1 ) NOT NULL DEFAULT '0',
  680. `sit` CHAR( 1 ) NOT NULL DEFAULT '1',
  681. `autotrade` tinyint(4) NOT NULL,
  682. PRIMARY KEY (`id`)
  683. ) ENGINE=MyISAM;