MyRȝturn
30-06-2013, 12:14 AM
Add Silk To New Char
USE SRO_VT_ACCOUNT
GO
INSERT INTO SK_SILK
(JID,
silk_own,
silk_gift,
silk_point)
SELECT JID,
'0',
'0',
'0'
FROM TB_User
WHERE not exists (select * from SK_Silk
WHERE SK_SILK.JID = TB_User.JID);
UPDATE SK_Silk SET silk_own=silk_own+0
غير silk_own+0 رقم 0 ده بس
Add Item To NPC
USE SRO_VT_SHARD
GO
DECLARE @ID int
DECLARE @CodeName varchar(129)
DECLARE @DescSTRID varchar(129)
DECLARE @File varchar(129)
DECLARE @Price int
DECLARE @Slot tinyint
DECLARE @TAB varchar(129)
DECLARE @Data int
--- Set Variables
SET @ID = 84037
SET @CodeName = 'ITEM_ETC_ARCHEMY_MAGICSTONE_STR_08'
SET @DescSTRID = 'SN_ITEM_ETC_ARCHEMY_MAGICSTONE_STR_TT_DESC'
SET @File = 'item\etc\archemy_magicstone_str.ddj'
SET @Price = 9000000
SET @Slot = 11
SET @TAB = 'STORE_KT_ACCESSORY_TAB3'
SET @Data = 0
SET IDENTITY_INSERT _RefPackageItem ON
INSERT _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, @ID,'PACKAGE_' + @CodeName, 0, 'EXPAND_TERM_ALL', 'SN_' + @CodeName, @DescSTRID, @File, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx')
SET IDENTITY_INSERT _RefPackageItem OFF
INSERT _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
)
VALUES
(1, 15, 'PACKAGE_' + @CodeName, @CodeName, 0, 0, @Data, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx' )
INSERT _RefPricePolicyOfItem
(
Service,
Country,
RefPackageItemCodeName,
PaymentDevice,
PreviousCost,
Cost,
Param1,
Param1_Desc128,
Param2,
Param2_Desc128,
Param3,
Param3_Desc128,
Param4,
Param4_Desc128
)
VALUES
(1, 15, 'PACKAGE_' + @CodeName, 1, 0, @Price, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx')
INSERT _RefShopGoods
(
Service,
Country,
RefTabCodeName,
RefPackageItemCodeName,
SlotIndex,
Param1,
Param1_Desc128,
Param2,
Param2_Desc128,
Param3,
Param3_Desc128,
Param4,
Param4_Desc128
)
VALUES
(1, 15, @TAB,'PACKAGE_' + @CodeName, @Slot, -1, 'xxx', -1, 'xxx', -1, 'xxx', -1, 'xxx')
Secret0
30-06-2013, 12:33 AM
ايه ده
Msg 2627, Level 14, State 1, Line 21
Violation of PRIMARY KEY constraint 'PK__RefPackageItem'. Cannot insert duplicate key in object 'dbo._RefPackageItem'.
The statement has been terminated.
(1 row(s) affected)
Msg 2627, Level 14, State 1, Line 79
Violation of PRIMARY KEY constraint 'PK__RefPricePolicyOfItem'. Cannot insert duplicate key in object 'dbo._RefPricePolicyOfItem'.
The statement has been terminated.
Msg 2627, Level 14, State 1, Line 100
Violation of PRIMARY KEY constraint 'PK__RefShopGoods_renewal'. Cannot insert duplicate key in object 'dbo._RefShopGoods'.
The statement has been terminated.