create_tbl.sql
上传用户:szopptop
上传日期:2013-04-23
资源大小:1047k
文件大小:7k
源码类别:

模拟服务器

开发平台:

Visual C++

  1. /* **************************************************************************
  2. Create Database for Legend of Mir 2
  3. All written by Euy-heon, Jeong
  4. Copyright (C) 2001 Wemade Entertainment. All rights reserved.
  5.    *************************************************************************** */
  6. USE LEGENDOFMIR
  7. GO
  8. DROP TABLE TBL_ACCOUNT
  9. GO
  10. DROP TABLE TBL_MONSTER
  11. GO
  12. DROP TABLE TBL_STDITEM
  13. GO
  14. DROP TABLE TBL_MAGIC
  15. GO
  16. DROP TABLE TBL_MONGEN
  17. GO
  18. DROP TABLE TBL_MAPINFO
  19. GO
  20. DROP TABLE TBL_MERCHANT
  21. GO
  22. DROP TABLE TBL_MOVEMAPEVENT
  23. GO
  24. DROP TABLE TBL_GUARD
  25. GO
  26. DROP TABLE TBL_STARTPOINT
  27. GO
  28. DROP TABLE TBL_NPC
  29. GO
  30. /* 
  31. User Account Table 
  32. */
  33. CREATE TABLE TBL_ACCOUNT
  34. (
  35. FLD_LOGINID CHAR(10) NOT NULL,
  36. FLD_PASSWORD CHAR(10) NOT NULL,
  37. FLD_USERNAME CHAR(20) NOT NULL,
  38. FLD_SSNO CHAR(14) NOT NULL,
  39. FLD_BIRTHDAY CHAR(10) NOT NULL,
  40. FLD_PHONE CHAR(14) NOT NULL,
  41. FLD_MOBILEPHONE CHAR(13) NOT NULL,
  42. FLD_ADDRESS1 VARCHAR(20) NULL,
  43. FLD_ADDRESS2 VARCHAR(20) NULL,
  44. FLD_EMAIL VARCHAR(40) NULL,
  45. FLD_QUIZ1 VARCHAR(20) NULL,
  46. FLD_ANSWER1 VARCHAR(20) NULL,
  47. FLD_QUIZ2 VARCHAR(20) NULL,
  48. FLD_ANSWER2 VARCHAR(20) NULL
  49. )
  50. GO
  51. ALTER TABLE TBL_ACCOUNT ADD CONSTRAINT PK_ACCOUNT PRIMARY KEY (FLD_LOGINID)
  52. GO
  53. CREATE INDEX IDX_ACCOUNT_SSNO ON TBL_ACCOUNT (FLD_SSNO ASC)
  54. GO
  55. CREATE INDEX IDX_ACCOUNT_NAME ON TBL_ACCOUNT (FLD_USERNAME ASC)
  56. GO
  57. /* 
  58. Monster 
  59. */
  60. CREATE TABLE TBL_MONSTER
  61. (
  62. FLD_NAME CHAR(14) NOT NULL,
  63. FLD_RACE SMALLINT NULL,
  64. FLD_RACEIMG SMALLINT NULL,
  65. FLD_APPR SMALLINT NULL,
  66. FLD_LEVEL SMALLINT NULL,
  67. FLD_UNDEAD SMALLINT NULL,
  68. FLD_EXP SMALLINT NULL,
  69. FLD_HP SMALLINT NULL,
  70. FLD_MP SMALLINT NULL,
  71. FLD_AC SMALLINT NULL,
  72. FLD_MAXAC SMALLINT NULL,
  73. FLD_MAC SMALLINT NULL,
  74. FLD_MAXMAC SMALLINT NULL,
  75. FLD_DC SMALLINT NULL,
  76. FLD_MAXDC SMALLINT NULL,
  77. FLD_SPEED SMALLINT NULL,
  78. FLD_HIT SMALLINT NULL,
  79. FLD_WALKSPEED SMALLINT NULL,
  80. FLD_ATTACKSPEED SMALLINT NULL,
  81. )
  82. GO
  83. /* 
  84. Standard Item
  85. */
  86. CREATE TABLE TBL_STDITEM
  87. (
  88. FLD_INDEX INT NOT NULL,
  89. FLD_NAME CHAR(14) NOT NULL, /* 酒捞袍 疙 */
  90. FLD_STDMODE SMALLINT NULL,
  91. FLD_SHAPE SMALLINT NULL, /* 屈怕喊 捞抚 */
  92. FLD_WEIGHT SMALLINT NULL, /* 公霸 */
  93. FLD_ANICOUNT SMALLINT NULL, /* 1焊促 农搁 俊聪皋捞记 登绰 酒捞袍 */
  94. FLD_SOURCE SMALLINT NULL, /* 犁龙 (0:扁夯, 1捞惑:歹 窜窜窃) */
  95. FLD_RESERVED SMALLINT NULL,
  96. FLD_LOOKS INT NULL, /* 弊覆 锅龋 */
  97. FLD_DURAMAX INT NULL,
  98. FLD_AC SMALLINT NULL, /* 规绢仿 */
  99. FLD_AC2 SMALLINT NULL,
  100. FLD_MAC SMALLINT NULL, /* 付亲仿 */
  101. FLD_MAC2 SMALLINT NULL,
  102. FLD_DC SMALLINT NULL, /* 单固瘤 */
  103. FLD_DC2 SMALLINT NULL,
  104. FLD_MC SMALLINT NULL, /* 贱荤狼 付过 颇况 */
  105. FLD_MC2 SMALLINT NULL,
  106. FLD_SC SMALLINT NULL, /* 档荤狼 沥脚仿 */
  107. FLD_SC2 SMALLINT NULL,
  108. FLD_NEED SMALLINT NULL, /* 0:Level, 1:DC, 2:MC, 3:SC */
  109. FLD_NEEDLEVEL SMALLINT NULL, /* 1...60 饭骇 蔼 */
  110. FLD_PRICE INT NULL,
  111. FLD_STOCK INT NULL,
  112. FLD_DESCRIPTION VARCHAR(100) NULL,
  113. )
  114. GO
  115. ALTER TABLE TBL_STDITEM ADD CONSTRAINT PK_MONSTER PRIMARY KEY (FLD_INDEX)
  116. GO
  117. /* 
  118. Magic Item
  119. */
  120. CREATE TABLE TBL_MAGIC
  121. (
  122. FLD_INDEX INT NOT NULL,
  123. FLD_NAME CHAR(12) NOT NULL,
  124. FLD_EFFECTTYPE SMALLINT NULL,
  125. FLD_EFFECT SMALLINT NULL,
  126. FLD_SPELL SMALLINT NULL,
  127. FLD_POWER SMALLINT NULL,
  128. FLD_MAXPOWER SMALLINT NULL,
  129. FLD_DEFSPELL SMALLINT NULL,
  130. FLD_DEFPOWER SMALLINT NULL,
  131. FLD_DEFMAXPOWER SMALLINT NULL,
  132. FLD_JOB SMALLINT NULL,
  133. FLD_NEEDL1 SMALLINT NULL,
  134. FLD_L1TRAIN INT NULL,
  135. FLD_NEEDL2 SMALLINT NULL,
  136. FLD_L2TRAIN INT NULL,
  137. FLD_NEEDL3 SMALLINT NULL,
  138. FLD_L3TRAIN INT NULL,
  139. FLD_DELAY SMALLINT NULL,
  140. FLD_DESC CHAR(8) NULL,
  141. FLD_DESCRIPTION VARCHAR(100) NULL,
  142. )
  143. GO
  144. ALTER TABLE TBL_MAGIC ADD CONSTRAINT PK_MAGIC PRIMARY KEY (FLD_INDEX)
  145. GO
  146. /* 
  147. Monster Generation Info
  148. */
  149. CREATE TABLE TBL_MONGEN
  150. (
  151. FLD_INDEX INT NOT NULL,
  152. FLD_MAPNAME CHAR(14) NOT NULL,
  153. FLD_X INT NOT NULL,
  154. FLD_Y INT NULL,
  155. FLD_MONNAME CHAR(14) NULL,
  156. FLD_AREA SMALLINT NULL,
  157. FLD_COUNT SMALLINT NULL,
  158. FLD_GENTIME INT NULL,
  159. FLD_SMALLGENRATE INT NULL,
  160. FLD_DESCRIPTION VARCHAR(100) NULL,
  161. )
  162. GO
  163. ALTER TABLE TBL_MONGEN ADD CONSTRAINT PK_MONGEN PRIMARY KEY (FLD_INDEX)
  164. GO
  165. /* 
  166. Map Information
  167. */
  168. CREATE TABLE TBL_MAPINFO
  169. (
  170. FLD_MAPFILENAME CHAR(14) NOT NULL,
  171. FLD_MAPNAME VARCHAR(40) NOT NULL,
  172. FLD_SERVERINDEX SMALLINT NOT NULL,
  173. FLD_ATTRIBUTE INT NULL,
  174. FLD_RECALLMAPFNAME CHAR(14) NULL,
  175. FLD_DESCRIPTION VARCHAR(100) NULL,
  176. )
  177. GO
  178. ALTER TABLE TBL_MAPINFO ADD CONSTRAINT PK_MAPINFO PRIMARY KEY (FLD_MAPFILENAME)
  179. GO
  180. /* 
  181. Move Map Event Information
  182. */
  183. CREATE TABLE TBL_MOVEMAPEVENT
  184. (
  185. FLD_INDEX INT NOT NULL,
  186. FLD_SMAPFILENAME CHAR(14) NOT NULL,
  187. FLD_SX INT NOT NULL,
  188. FLD_SY INT NOT NULL,
  189. FLD_DMAPFILENAME CHAR(14) NOT NULL,
  190. FLD_DX INT NOT NULL,
  191. FLD_DY INT NOT NULL,
  192. FLD_DESCRIPTION VARCHAR(100) NULL,
  193. )
  194. GO
  195. ALTER TABLE TBL_MOVEMAPEVENT ADD CONSTRAINT PK_MOVEMAPEVENT PRIMARY KEY (FLD_INDEX)
  196. GO
  197. /* 
  198. Merchant
  199. */
  200. CREATE TABLE TBL_MERCHANT
  201. (
  202. FLD_ID CHAR(14) NOT NULL,
  203. FLD_MAPNAME CHAR(14) NOT NULL,
  204. FLD_POSX INT NOT NULL,
  205. FLD_POSY INT NOT NULL,
  206. FLD_NPCNAME VARCHAR(40) NOT NULL,
  207. FLD_FACE INT NOT NULL,
  208. FLD_BODY INT NOT NULL,
  209. FLD_GENDER SMALLINT NOT NULL,
  210. FLD_DESCRIPTION VARCHAR(100) NULL,
  211. )
  212. GO
  213. /*ALTER TABLE TBL_MERCHANT ADD CONSTRAINT PK_MOVEMAPEVENT PRIMARY KEY (FLD_INDEX)
  214. GO */
  215. /* 
  216. Guard
  217. */
  218. CREATE TABLE TBL_GUARD
  219. (
  220. FLD_INDEX INT NOT NULL,
  221. FLD_ID CHAR(14) NOT NULL,
  222. FLD_MAPNAME CHAR(14) NOT NULL,
  223. FLD_POSX INT NOT NULL,
  224. FLD_POSY INT NOT NULL,
  225. FLD_DIRECTION SMALLINT NOT NULL,
  226. FLD_DESCRIPTION VARCHAR(100) NULL,
  227. )
  228. GO
  229. /*ALTER TABLE TBL_MERCHANT ADD CONSTRAINT PK_MOVEMAPEVENT PRIMARY KEY (FLD_INDEX)
  230. GO */
  231. /* 
  232. NPC
  233. */
  234. CREATE TABLE TBL_NPC
  235. (
  236. FLD_INDEX INT NOT NULL,
  237. FLD_NAME CHAR(14) NOT NULL,
  238. FLD_RACE SMALLINT NOT NULL,
  239. FLD_MAPNAME CHAR(14) NOT NULL,
  240. FLD_POSX INT NOT NULL,
  241. FLD_POSY INT NOT NULL,
  242. FLD_FACE SMALLINT NOT NULL,
  243. FLD_BODY SMALLINT NOT NULL,
  244. FLD_DESCRIPTION VARCHAR(100) NULL,
  245. )
  246. GO
  247. /*ALTER TABLE TBL_MERCHANT ADD CONSTRAINT PK_MOVEMAPEVENT PRIMARY KEY (FLD_INDEX)
  248. GO */
  249. /* 
  250. NPC
  251. */
  252. CREATE TABLE TBL_STARTPOINT
  253. (
  254. FLD_INDEX INT NOT NULL,
  255. FLD_MAPNAME CHAR(14) NOT NULL,
  256. FLD_POSX INT NOT NULL,
  257. FLD_POSY INT NOT NULL,
  258. FLD_DESCRIPTION VARCHAR(100) NULL,
  259. )
  260. GO