Database

db/conf.txt

Search:

	SQL_COMMON = [...]

Add and adjust with username & pass:

	SQL_ITEMSHOP = "localhost itemshop root admin 0"

Mysql

Note: Add socket3, socket4, socket5 if needed

Create ‘itemshop’ database and execute:

	SET NAMES utf8mb4;
	SET FOREIGN_KEY_CHECKS = 0;

	-- ----------------------------
	-- Table structure for itemshop_categories
	-- ----------------------------
	DROP TABLE IF EXISTS `itemshop_categories`;
	CREATE TABLE `itemshop_categories`  (
	  `category_index` int(11) UNSIGNED NOT NULL DEFAULT 0,
	  `category_name` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT 'NONAME',
	  `category_icon` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT '71171',
	  `category_state` enum('DISABLED','ENABLED') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT 'DISABLED',
	  PRIMARY KEY (`category_index`) USING BTREE,
	  INDEX `category`(`category_index`) USING BTREE,
	  INDEX `name`(`category_name`) USING BTREE
	) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_general_ci ROW_FORMAT = Dynamic;

	-- ----------------------------
	-- Records of itemshop_categories
	-- ----------------------------
	INSERT INTO `itemshop_categories` VALUES (1, 'First', 'bag.png', 'ENABLED');
	INSERT INTO `itemshop_categories` VALUES (2, 'Second', 'beast.png', 'ENABLED');
	INSERT INTO `itemshop_categories` VALUES (3, 'Third', 'class.png', 'ENABLED');
	INSERT INTO `itemshop_categories` VALUES (4, 'Fourth', 'ice.png', 'ENABLED');
	INSERT INTO `itemshop_categories` VALUES (5, 'Fifth', 'rune.png', 'ENABLED');
	INSERT INTO `itemshop_categories` VALUES (6, 'Sixth', '71171', 'ENABLED');

	-- ----------------------------
	-- Table structure for itemshop_items
	-- ----------------------------
	DROP TABLE IF EXISTS `itemshop_items`;
	CREATE TABLE `itemshop_items`  (
	  `category` smallint(4) NOT NULL DEFAULT 0,
	  `itemIndex` bigint(18) UNSIGNED NOT NULL,
	  `vnum` int(11) UNSIGNED NOT NULL DEFAULT 0,
	  `count` smallint(4) UNSIGNED NOT NULL DEFAULT 1,
	  `price` bigint(18) UNSIGNED NOT NULL DEFAULT 1,
	  `discountPercent` smallint(4) UNSIGNED NOT NULL DEFAULT 0,
	  `limitCount` int(11) NULL DEFAULT -1,
	  `startTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	  `endTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	  `weight` int(11) NOT NULL DEFAULT 0,
	  `socket0` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `socket1` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `socket2` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `attrtype0` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue0` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype1` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue1` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype2` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue2` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype3` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue3` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype4` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue4` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype5` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue5` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype6` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue6` smallint(6) NOT NULL DEFAULT 0,
	  PRIMARY KEY (`itemIndex`) USING BTREE,
	  INDEX `category_index`(`category`) USING BTREE
	) ENGINE = MyISAM AUTO_INCREMENT = 30 CHARACTER SET = latin1 COLLATE = latin1_general_ci ROW_FORMAT = Fixed;

	-- ----------------------------
	-- Records of itemshop_items
	-- ----------------------------
	INSERT INTO `itemshop_items` VALUES (1, 34534, 19, 1, 222, 10, 0, '2022-09-11 15:37:11', '2022-09-11 15:37:17', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `itemshop_items` VALUES (2, 232, 59, 1, 100, 0, -1, '2022-09-10 23:54:34', '2022-09-10 23:55:45', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `itemshop_items` VALUES (3, 342, 49, 1, 100, 0, -1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `itemshop_items` VALUES (4, 555, 39, 1, 100, 0, -1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `itemshop_items` VALUES (5, 645, 29, 1, 100, 0, -1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `itemshop_items` VALUES (6, 54333, 19, 1, 100, 0, -1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

	-- ----------------------------
	-- Table structure for promotion_codes
	-- ----------------------------
	DROP TABLE IF EXISTS `promotion_codes`;
	CREATE TABLE `promotion_codes`  (
	  `index` int(11) NOT NULL,
	  `promotion_code` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT '',
	  `state` enum('DISABLED','ENABLED') CHARACTER SET latin1 COLLATE latin1_general_ci NULL DEFAULT 'DISABLED',
	  `useCount` bigint(13) NULL DEFAULT 0,
	  PRIMARY KEY (`index`) USING BTREE
	) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_general_ci ROW_FORMAT = Dynamic;

	-- ----------------------------
	-- Records of promotion_codes
	-- ----------------------------
	INSERT INTO `promotion_codes` VALUES (1, 'Metin2Downloads', 'ENABLED', 100);

	-- ----------------------------
	-- Table structure for promotion_redeemed
	-- ----------------------------
	DROP TABLE IF EXISTS `promotion_redeemed`;
	CREATE TABLE `promotion_redeemed`  (
	  `acc_id` int(11) NOT NULL,
	  `redeemed_code` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	  `time_redeemed` datetime NOT NULL
	) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_general_ci ROW_FORMAT = Dynamic;

	-- ----------------------------
	-- Records of promotion_redeemed
	-- ----------------------------

	-- ----------------------------
	-- Table structure for promotion_rewards
	-- ----------------------------
	DROP TABLE IF EXISTS `promotion_rewards`;
	CREATE TABLE `promotion_rewards`  (
	  `code_index` int(11) NOT NULL,
	  `vnum` int(11) NOT NULL DEFAULT 0,
	  `count` smallint(4) UNSIGNED NOT NULL DEFAULT 1,
	  `socket0` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `socket1` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `socket2` int(10) UNSIGNED NOT NULL DEFAULT 0,
	  `attrtype0` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue0` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype1` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue1` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype2` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue2` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype3` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue3` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype4` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue4` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype5` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue5` smallint(6) NOT NULL DEFAULT 0,
	  `attrtype6` tinyint(4) NOT NULL DEFAULT 0,
	  `attrvalue6` smallint(6) NOT NULL DEFAULT 0
	) ENGINE = MyISAM CHARACTER SET = latin1 COLLATE = latin1_general_ci ROW_FORMAT = Fixed;

	-- ----------------------------
	-- Records of promotion_rewards
	-- ----------------------------
	INSERT INTO `promotion_rewards` VALUES (1, 19, 1, 0, 0, 0, 1, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `promotion_rewards` VALUES (1, 27994, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `promotion_rewards` VALUES (1, 39, 1, 0, 0, 0, 2, 22222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `promotion_rewards` VALUES (1, 49, 1, 0, 0, 0, 2, 22222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	INSERT INTO `promotion_rewards` VALUES (1, 59, 1, 0, 0, 0, 2, 22222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

	SET FOREIGN_KEY_CHECKS = 1;