GO 
DECLARE @ID int 
DECLARE @INDEX int 
DECLARE @CodeName varchar(128) 
DECLARE @PackageName varchar(128) 
DECLARE @DescSTRID varchar(128) 
DECLARE @File varchar(128) 
DECLARE @Price int 
DECLARE @SilkPrice int 
DECLARE @Slot tinyint 
DECLARE @TAB varchar(128) 
DECLARE @Data int 
DECLARE @SkipScrapOfPackageItem int = 0 
DECLARE @SkipPackageItem int = 0 
DECLARE @SkipPricePolicyOfItem int = 0 
--- Set Variables 
SET @CodeName = 'ITEM_EU_SHIELD_08_C_RARE' -- Item CodeName in RefObjCommon 
SET @Price = 5000000 -- Set 0 if you don't want to set Gold Price 
SET @SilkPrice = 256 -- Set 0 if you don't want to set Silk Price 
SET @TAB = 'STORE_Honor_TAB1' -- Tab name in NPC, For _RefShopGoods 
SET @PackageName = 'PACKAGE_'+@CodeName -- Do not edit if you don't know what are you doing. 
--- you don't need to touch here... 
IF (@CodeName = '') 
BEGIN 
    PRINT 'You have to edit CodeName..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT(ID) FROM _RefObjCommon WHERE CodeName128 = @CodeName) < 1) 
BEGIN 
    PRINT 'There is no item with this CodeName..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF (@Price < 0) 
BEGIN 
    PRINT 'Price is not VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF (@SilkPrice < 0) 
BEGIN 
    PRINT 'Silk Price is not VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT(ID) FROM _RefShopTab WHERE CodeName128 = @TAB) < 1) 
BEGIN 
    PRINT 'TAB VALUE IS NOT VALID..!' 
    PRINT 'FAILED.' 
    RETURN 
END 
IF ((SELECT COUNT (RefPackageItemCodeName) FROM _RefShopGoods WHERE RefPackageItemCodeName = @PackageName AND RefTabCodeName = @TAB) > 0) 
BEGIN 
    PRINT 'There is already same item in same tab..!' 
    PRINT 'FAILED.' 
    RETURN 