Advertisement
Guest User

Untitled

a guest
May 12th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. /*
  2. Navicat MySQL Data Transfer
  3.  
  4. Source Server : localhost
  5. Source Server Version : 50139
  6. Source Host : localhost:3306
  7. Source Database : wonderking
  8.  
  9. Target Server Type : MYSQL
  10. Target Server Version : 50139
  11. File Encoding : 65001
  12.  
  13. Date: 2010-03-01 22:30:05
  14. */
  15.  
  16. SET FOREIGN_KEY_CHECKS=0;
  17. -- ----------------------------
  18. -- Table structure for `accounts`
  19. -- ----------------------------
  20. DROP TABLE IF EXISTS `accounts`;
  21. CREATE TABLE `accounts` (
  22. `ID` int(11) NOT NULL DEFAULT '0',
  23. `Username` char(32) DEFAULT NULL,
  24. `Password` char(20) DEFAULT NULL,
  25. PRIMARY KEY (`ID`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  27.  
  28. -- ----------------------------
  29. -- Records of accounts
  30. -- ----------------------------
  31. INSERT INTO `accounts` VALUES ('1', 'admin', '123123');
  32.  
  33. -- ----------------------------
  34. -- Table structure for `items`
  35. -- ----------------------------
  36. DROP TABLE IF EXISTS `items`;
  37. CREATE TABLE `items` (
  38. `PlayerID` smallint(2) NOT NULL DEFAULT '0',
  39. `ItemID` smallint(2) DEFAULT NULL,
  40. `Count` smallint(2) DEFAULT NULL,
  41. `Position` tinyint(1) unsigned DEFAULT NULL,
  42. `HasAttributes` tinyint(1) unsigned DEFAULT NULL,
  43. `IsEquipment` tinyint(1) unsigned DEFAULT NULL,
  44. `Level` tinyint(1) unsigned DEFAULT NULL,
  45. `RareType` tinyint(1) unsigned DEFAULT NULL,
  46. `AddOption` tinyint(1) unsigned DEFAULT NULL,
  47. `AddOption2` tinyint(1) unsigned DEFAULT NULL,
  48. `AddOption3` tinyint(1) unsigned DEFAULT NULL,
  49. `Option` smallint(2) DEFAULT NULL,
  50. `Option2` smallint(2) DEFAULT NULL,
  51. `Option3` smallint(2) DEFAULT NULL
  52. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  53.  
  54. -- ----------------------------
  55. -- Records of items
  56. -- ----------------------------
  57. INSERT INTO `items` VALUES ('1', '393', '55', '0', '0', '0', null, null, null, null, null, null, null, null);
  58. INSERT INTO `items` VALUES ('1', '3222', '1', '0', '1', '0', '11', '3', '1', '6', '4', '152', '24', '36');
  59.  
  60. -- ----------------------------
  61. -- Table structure for `players`
  62. -- ----------------------------
  63. DROP TABLE IF EXISTS `players`;
  64. CREATE TABLE `players` (
  65. `ID` smallint(6) NOT NULL,
  66. `UserID` int(11) NOT NULL,
  67. `Name` char(20) NOT NULL,
  68. `Level` tinyint(4) unsigned NOT NULL DEFAULT '0',
  69. `Money` bigint(20) DEFAULT NULL,
  70. `HP` smallint(6) NOT NULL DEFAULT '0',
  71. `MP` smallint(6) NOT NULL DEFAULT '0',
  72. `MaxHP` smallint(6) NOT NULL DEFAULT '0',
  73. `MaxMP` smallint(6) NOT NULL DEFAULT '0',
  74. `Map` smallint(6) NOT NULL DEFAULT '0',
  75. `Str` smallint(6) NOT NULL DEFAULT '0',
  76. `Dex` smallint(6) NOT NULL DEFAULT '0',
  77. `Int` smallint(6) NOT NULL DEFAULT '0',
  78. `Luck` smallint(6) NOT NULL DEFAULT '0',
  79. `Vit` smallint(6) NOT NULL DEFAULT '0',
  80. `Wis` smallint(6) NOT NULL DEFAULT '0',
  81. `Job1` tinyint(4) unsigned NOT NULL DEFAULT '0',
  82. `Job2` tinyint(4) unsigned NOT NULL DEFAULT '0',
  83. `Job3` tinyint(4) unsigned NOT NULL DEFAULT '0',
  84. `Job4` tinyint(4) unsigned NOT NULL DEFAULT '0',
  85. `X` smallint(6) NOT NULL DEFAULT '0',
  86. `Y` smallint(6) NOT NULL DEFAULT '0',
  87. `Hair` smallint(6) NOT NULL,
  88. `Eyes` smallint(6) NOT NULL,
  89. `SP` smallint(6) NOT NULL DEFAULT '0',
  90. `AP` smallint(6) NOT NULL DEFAULT '0',
  91. PRIMARY KEY (`ID`)
  92. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  93.  
  94. -- ----------------------------
  95. -- Records of players
  96. -- ----------------------------
  97. INSERT INTO `players` VALUES ('1', '1', 'Admin', '200', '1000000', '900', '100', '900', '100', '300', '999', '999', '999', '999', '999', '999', '3', '9', '17', '0', '400', '536', '15', '37', '999', '999');
  98.  
  99. -- ----------------------------
  100. -- Procedure structure for `ChangePassword`
  101. -- ----------------------------
  102. DROP PROCEDURE IF EXISTS `ChangePassword`;
  103. DELIMITER ;;
  104. CREATE DEFINER=`root`@`localhost` PROCEDURE `ChangePassword`(IN `User` char(32),IN `Pass` varchar(20))
  105. BEGIN
  106. UPDATE Accounts SET Password = Pass WHERE Username = User;
  107. END
  108. ;;
  109. DELIMITER ;
  110.  
  111. -- ----------------------------
  112. -- Procedure structure for `FullLogin`
  113. -- ----------------------------
  114. DROP PROCEDURE IF EXISTS `FullLogin`;
  115. DELIMITER ;;
  116. CREATE DEFINER=`root`@`localhost` PROCEDURE `FullLogin`(IN `User` char(32),IN `Pass` char(20))
  117. BEGIN
  118. select ID from Accounts where Username = User and Password = Pass;
  119. END
  120. ;;
  121. DELIMITER ;
  122.  
  123. -- ----------------------------
  124. -- Procedure structure for `GetItems`
  125. -- ----------------------------
  126. DROP PROCEDURE IF EXISTS `GetItems`;
  127. DELIMITER ;;
  128. CREATE DEFINER=`root`@`localhost` PROCEDURE `GetItems`(IN `pID` smallint, IN `bool` tinyint)
  129. BEGIN
  130. select * from Items where PlayerID = pID and IsEquipment = bool;
  131. END
  132. ;;
  133. DELIMITER ;
  134.  
  135. -- ----------------------------
  136. -- Procedure structure for `GetPlayer`
  137. -- ----------------------------
  138. DROP PROCEDURE IF EXISTS `GetPlayer`;
  139. DELIMITER ;;
  140. CREATE DEFINER=`root`@`localhost` PROCEDURE `GetPlayer`(IN `uID` int, IN `pName` char(20))
  141. BEGIN
  142. select * from Players where UserID = uID and Name = pName;
  143. END
  144. ;;
  145. DELIMITER ;
  146.  
  147. -- ----------------------------
  148. -- Procedure structure for `GetPlayers`
  149. -- ----------------------------
  150. DROP PROCEDURE IF EXISTS `GetPlayers`;
  151. DELIMITER ;;
  152. CREATE DEFINER=`root`@`localhost` PROCEDURE `GetPlayers`(IN `uID` int)
  153. BEGIN
  154. select * from Players where UserID = uID;
  155. END
  156. ;;
  157. DELIMITER ;
  158.  
  159. -- ----------------------------
  160. -- Procedure structure for `Login`
  161. -- ----------------------------
  162. DROP PROCEDURE IF EXISTS `Login`;
  163. DELIMITER ;;
  164. CREATE DEFINER=`root`@`localhost` PROCEDURE `Login`(IN User char(32))
  165. BEGIN
  166. select ID,Password from Accounts where Username = User;
  167. END
  168. ;;
  169. DELIMITER ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement