و لو عزت تحط اي item في الShop
هتجيم اسم الnpc هنا SET @TAB = 'STORE_LEVELING_TAB2'
كود PHP:
USE [SRO_VT_SHARD]
----------By Nefetis--------------
DECLARE @PRICETYPE VARCHAR (70)
DECLARE @PRICE VARCHAR (70)
DECLARE @TAB VARCHAR (70)
DECLARE @CODENAME128 VARCHAR (70)
DECLARE @OPTLEVEL VARCHAR (70)
SET @PRICETYPE = 'GOLD'
SET @OPTLEVEL = '5'
SET @CODENAME128 = 'ITEM_EU_STAFF_10_A_RARE'
SET @PRICE = '1'
SET @TAB = 'STORE_LEVELING_TAB2'
DECLARE @DATA VARCHAR (30) = (Select DUR_L FROM _RefObjItem WHERE ID IN(SELECT Link from _RefObjCommon where CodeName128 = @CODENAME128))
DECLARE @MAXLINK VARCHAR (30) = (SELECT MAX ([Index]) FROM _RefScrapOfPackageItem)+1
SET IDENTITY_INSERT _RefScrapOfPackageItem ON
INSERT INTO _RefScrapOfPackageItem (Service,Country,RefPackageItemCodeName,RefItemCodeName,OptLevel,Variance,Data,MagParamNum,MagParam1,MagParam2,MagParam3,MagParam4,MagParam5,MagParam6,MagParam7
,MagParam8,MagParam9,MagParam10,MagParam11,MagParam12,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128,[Index]) VALUES
(1,15,'PACKAGE_'+@CODENAME128,@CODENAME128,@OPTLEVEL,0,@DATA,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx',@MAXLINK)
SET IDENTITY_INSERT _RefScrapOfPackageItem OFF
SET IDENTITY_INSERT _RefPackageItem ON
DECLARE @ICON VARCHAR (70) = (SELECT AssocFileIcon128 FROM _RefObjCommon Where CodeName128 = @CODENAME128)
DECLARE @MAXID VARCHAR (30) = (SELECT MAX (ID) FROM _RefPackageItem)+1
INSERT INTO _RefPackageItem (Service,Country,ID,Codename128,SaleTag,ExpandTerm,NameStrID,DescStrID,AssocFileIcon,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,@MAXID,'PACKAGE_'+@CODENAME128,0,'EXPAND_TERM_ALL','SN_'+@CODENAME128,'SN_'+@CODENAME128+'_TT_DESC',@ICON,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
SET IDENTITY_INSERT _RefPackageItem OFF
IF @PRICETYPE = 'GOLD' BEGIN
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,1,0,@PRICE,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
END
IF @PRICETYPE = 'SILK' BEGIN
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,2,0,@PRICE,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,4,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
INSERT INTO _RefPricepolicyofitem (Service,Country,RefPackageItemCodeName,PaymentDevice,PreviousCost,Cost,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,'PACKAGE_'+@CODENAME128,16,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
END
DECLARE @MAXSLOT VARCHAR (30) = (SELECT MAX (SlotIndex) from _RefShopGoods Where Reftabcodename = @TAB and Service = 1)+1
INSERT INTO _RefShopGoods (Service,Country,RefTabCodeName,RefPackageItemCodeName,SlotIndex,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128) VALUES
(1,15,@TAB,'PACKAGE_'+@CODENAME128,@MAXSLOT,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
SET @PRICETYPE = 'GOLD'(GOLD OR SILK)
SET @OPTLEVEL = '5'(how much Plus)
SET @CODENAME128 = 'ITEM_EU_STAFF_10_A_RARE'(CodeName of item)
SET @PRICE = '1' (Price Of item)