main.sql 26 KB

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