Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 16:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[REQUEST] Query to add items to npc with pricetype arena coins

Discussion on [REQUEST] Query to add items to npc with pricetype arena coins within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2010
Posts: 194
Received Thanks: 16
[REQUEST] Query to add items to npc with pricetype arena coins

so im searching query for adding items to npc with payment type arenacoins.
thoubi96 is offline  
Old 03/21/2013, 15:59   #2
 
elite*gold: 0
Join Date: Mar 2013
Posts: 13
Received Thanks: 1
Next Time Use Google

PHP Code:
 Guide To Add Item To NPC \\ Credit To Other ********


USE 
SRO_VT_SHARD
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_CH_M_CLOTHES_12_FA_A' -- Item CodeName in RefObjCommon
SET 
@Price 5000000 -- Set 0 if you don't want to set Gold Price
SET @SilkPrice = 0 -- Set 0 if you don'
t want to set Silk Price
SET 
@TAB 'STORE_KT_ARMOR_TAB3' -- 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(IDFROM _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(IDFROM _RefShopTab WHERE CodeName128 = @TAB) < 1)
BEGIN
    
PRINT 'TAB VALUE IS NOT VALID..!'
    
PRINT 'FAILED.'
    
RETURN
END
IF ((SELECT COUNT (RefPackageItemCodeNameFROM _RefShopGoods WHERE RefPackageItemCodeName = @PackageName AND RefTabCodeName = @TAB) > 0)
BEGIN
    
PRINT 'There is already same item in same tab..!'
    
PRINT 'FAILED.'
    
RETURN
END
IF ((SELECT COUNT (RefPackageItemCodeNameFROM _RefScrapOfPackageItem WHERE RefPackageItemCodeName = @PackageName) > 0)
BEGIN
    
PRINT 'There is already an entry for this item, skipping @_RefScrapOfPackageItem table..!'
    
SET @SkipScrapOfPackageItem 1
END
IF ((SELECT COUNT (CodeName128FROM _RefPackageItem WHERE CodeName128 = @PackageName) > 0)
BEGIN
    
PRINT 'There is already an entry for this item, skipping @_RefPackageItem table..!'
    
SET @SkipPackageItem 1
END
IF ((SELECT COUNT (PaymentDeviceFROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice '1') > 0)
BEGIN
    
PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Gold)'
    
SET @SkipPricePolicyOfItem 1
END
IF ((SELECT COUNT (PaymentDeviceFROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice '2') > 0)
BEGIN
    
PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Silk)'
    
IF (@SkipPricePolicyOfItem 1)
    
BEGIN
        SET 
@SkipPricePolicyOfItem 3
    END
    
ELSE
    
BEGIN
        SET 
@SkipPricePolicyOfItem 2
    END
END
IF (@SilkPrice 0) AND (@Price 0)
BEGIN
    
PRINT 'You need to set a price, at least one !'
    
PRINT 'FAILED.'
    
RETURN
END
SELECT TOP 1 
@ID ID FROM _RefPackageItem ORDER BY ID DESC
SET 
@ID = @ID 1
SELECT TOP 1 
@INDEX = [IndexFROM _RefScrapOfPackageItem ORDER BY [IndexDESC
SET 
@INDEX = @INDEX 1
SELECT TOP 1 
@Slot SlotIndex FROM _RefShopGoods WHERE RefTabCodeName = @TAB ORDER BY SlotIndex DESC
IF (@Slot 0)
BEGIN
    SET 
@Slot = @Slot 1
END
ELSE IF (@Slot 0)
BEGIN
    SET 
@Slot = @Slot 1
END
ELSE
BEGIN
    SET 
@Slot 0
END
SET 
@DescSTRID 'SN_' + @CodeName '_TT_DESC'
SELECT @File AssocFileIcon128 FROM _RefObjCommon WHERE CodeName128 = @CodeName
IF (@CodeName LIKE '%RING%' OR @CodeName LIKE '%NECKLACE%' OR @CodeName LIKE '%ARCHEMY%')
BEGIN
    SET 
@Data 1
END
ELSE
BEGIN
    SELECT 
@Data Dur_U FROM _RefObjItem WHERE ID = (SELECT Link FROM _RefObjCommon WHERE CodeName128 = @CodeName)
END
BEGIN TRANSACTION
IF (@SkipPackageItem 0)
BEGIN
    
--SET IDENTITY_INSERT _RefPackageItem ON
    INSERT _RefPackageItem 
([Service], CountryIDCodeName128SaleTagExpandTermNameStrIDDescStrIDAssocFileIconParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @ID, @PackageName0'EXPAND_TERM_ALL''SN_'+@CodeName, @DescSTRID, @File, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPackageItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPackageItem !'
    
--SET IDENTITY_INSERT _RefPackageItem OFF
END
IF (@SkipScrapOfPackageItem 0)
BEGIN
    INSERT _RefScrapOfPackageItem 
(ServiceCountryRefPackageItemCodeNameRefItemCodeNameOptLevelVarianceDataMagParamNumMagParam1MagParam2MagParam3MagParam4MagParam5MagParam6MagParam7MagParam8MagParam9MagParam10MagParam11MagParam12Param1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128, [Index]) VALUES (115, @PackageName, @CodeName00, @Data0000000000000, -1'xxx', -1'xxx', -1'xxx', -1'xxx', @INDEX)
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefScrapOfPackageItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefScrapOfPackageItem !'
END
IF (@SkipPricePolicyOfItem OR @SkipPricePolicyOfItem AND @Price 0)
BEGIN
    INSERT _RefPricePolicyOfItem 
(ServiceCountryRefPackageItemCodeNamePaymentDevicePreviousCostCostParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @PackageName10, @Price, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 1 (Gold)'
END
IF (@SkipPricePolicyOfItem OR @SkipPricePolicyOfItem AND @SilkPrice 0)
BEGIN
    INSERT _RefPricePolicyOfItem 
(ServiceCountryRefPackageItemCodeNamePaymentDevicePreviousCostCostParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @PackageName20, @SilkPrice, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 2 (Silk)'
END
ELSE
BEGIN
    
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
INSERT _RefShopGoods 
(ServiceCountryRefTabCodeNameRefPackageItemCodeNameSlotIndexParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @TAB, @PackageName, @Slot, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
    IF (@@
ERROR <> 0)  
    
BEGIN
        
PRINT 'An error happened while adding to _RefShopGoods table'
        
PRINT 'FAILED.'
        
ROLLBACK TRANSACTION
        
RETURN
    
END
    
PRINT 'Added to _RefShopGoods, DONE!'
COMMIT TRANSACTION 
[GM]zLordOFear is offline  
Thanks
1 User
Old 08/23/2013, 19:52   #3
 
elite*gold: 0
Join Date: Jul 2011
Posts: 137
Received Thanks: 34
Thumbs down

Quote:
Originally Posted by [GM]zLordOFear View Post
Next Time Use Google

PHP Code:
 Guide To Add Item To NPC \\ Credit To Other ********


USE 
SRO_VT_SHARD
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_CH_M_CLOTHES_12_FA_A' -- Item CodeName in RefObjCommon
SET 
@Price 5000000 -- Set 0 if you don't want to set Gold Price
SET @SilkPrice = 0 -- Set 0 if you don'
t want to set Silk Price
SET 
@TAB 'STORE_KT_ARMOR_TAB3' -- 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(IDFROM _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(IDFROM _RefShopTab WHERE CodeName128 = @TAB) < 1)
BEGIN
    
PRINT 'TAB VALUE IS NOT VALID..!'
    
PRINT 'FAILED.'
    
RETURN
END
IF ((SELECT COUNT (RefPackageItemCodeNameFROM _RefShopGoods WHERE RefPackageItemCodeName = @PackageName AND RefTabCodeName = @TAB) > 0)
BEGIN
    
PRINT 'There is already same item in same tab..!'
    
PRINT 'FAILED.'
    
RETURN
END
IF ((SELECT COUNT (RefPackageItemCodeNameFROM _RefScrapOfPackageItem WHERE RefPackageItemCodeName = @PackageName) > 0)
BEGIN
    
PRINT 'There is already an entry for this item, skipping @_RefScrapOfPackageItem table..!'
    
SET @SkipScrapOfPackageItem 1
END
IF ((SELECT COUNT (CodeName128FROM _RefPackageItem WHERE CodeName128 = @PackageName) > 0)
BEGIN
    
PRINT 'There is already an entry for this item, skipping @_RefPackageItem table..!'
    
SET @SkipPackageItem 1
END
IF ((SELECT COUNT (PaymentDeviceFROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice '1') > 0)
BEGIN
    
PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Gold)'
    
SET @SkipPricePolicyOfItem 1
END
IF ((SELECT COUNT (PaymentDeviceFROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName = @PackageName AND PaymentDevice '2') > 0)
BEGIN
    
PRINT 'There is already an entry for this item with same PaymentDevice, skipping @_RefPricePolicyOfItem table..! (Silk)'
    
IF (@SkipPricePolicyOfItem 1)
    
BEGIN
        SET 
@SkipPricePolicyOfItem 3
    END
    
ELSE
    
BEGIN
        SET 
@SkipPricePolicyOfItem 2
    END
END
IF (@SilkPrice 0) AND (@Price 0)
BEGIN
    
PRINT 'You need to set a price, at least one !'
    
PRINT 'FAILED.'
    
RETURN
END
SELECT TOP 1 
@ID ID FROM _RefPackageItem ORDER BY ID DESC
SET 
@ID = @ID 1
SELECT TOP 1 
@INDEX = [IndexFROM _RefScrapOfPackageItem ORDER BY [IndexDESC
SET 
@INDEX = @INDEX 1
SELECT TOP 1 
@Slot SlotIndex FROM _RefShopGoods WHERE RefTabCodeName = @TAB ORDER BY SlotIndex DESC
IF (@Slot 0)
BEGIN
    SET 
@Slot = @Slot 1
END
ELSE IF (@Slot 0)
BEGIN
    SET 
@Slot = @Slot 1
END
ELSE
BEGIN
    SET 
@Slot 0
END
SET 
@DescSTRID 'SN_' + @CodeName '_TT_DESC'
SELECT @File AssocFileIcon128 FROM _RefObjCommon WHERE CodeName128 = @CodeName
IF (@CodeName LIKE '%RING%' OR @CodeName LIKE '%NECKLACE%' OR @CodeName LIKE '%ARCHEMY%')
BEGIN
    SET 
@Data 1
END
ELSE
BEGIN
    SELECT 
@Data Dur_U FROM _RefObjItem WHERE ID = (SELECT Link FROM _RefObjCommon WHERE CodeName128 = @CodeName)
END
BEGIN TRANSACTION
IF (@SkipPackageItem 0)
BEGIN
    
--SET IDENTITY_INSERT _RefPackageItem ON
    INSERT _RefPackageItem 
([Service], CountryIDCodeName128SaleTagExpandTermNameStrIDDescStrIDAssocFileIconParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @ID, @PackageName0'EXPAND_TERM_ALL''SN_'+@CodeName, @DescSTRID, @File, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPackageItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPackageItem !'
    
--SET IDENTITY_INSERT _RefPackageItem OFF
END
IF (@SkipScrapOfPackageItem 0)
BEGIN
    INSERT _RefScrapOfPackageItem 
(ServiceCountryRefPackageItemCodeNameRefItemCodeNameOptLevelVarianceDataMagParamNumMagParam1MagParam2MagParam3MagParam4MagParam5MagParam6MagParam7MagParam8MagParam9MagParam10MagParam11MagParam12Param1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128, [Index]) VALUES (115, @PackageName, @CodeName00, @Data0000000000000, -1'xxx', -1'xxx', -1'xxx', -1'xxx', @INDEX)
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefScrapOfPackageItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefScrapOfPackageItem !'
END
IF (@SkipPricePolicyOfItem OR @SkipPricePolicyOfItem AND @Price 0)
BEGIN
    INSERT _RefPricePolicyOfItem 
(ServiceCountryRefPackageItemCodeNamePaymentDevicePreviousCostCostParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @PackageName10, @Price, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 1 (Gold)'
END
IF (@SkipPricePolicyOfItem OR @SkipPricePolicyOfItem AND @SilkPrice 0)
BEGIN
    INSERT _RefPricePolicyOfItem 
(ServiceCountryRefPackageItemCodeNamePaymentDevicePreviousCostCostParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @PackageName20, @SilkPrice, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
        IF (@@
ERROR <> 0)  
        
BEGIN
            
PRINT 'AN ERROR HAPPENED WHILE ADDING TO _RefPricePolicyOfItem, Rolling back...'
            
ROLLBACK TRANSACTION
            
RETURN
        
END
    
PRINT 'Added to _RefPricePolicyOfItem, PaymentDevice = 2 (Silk)'
END
ELSE
BEGIN
    
PRINT 'There is already silk / gold price, skipping _RefPricePolicyOfItem table...'
END
INSERT _RefShopGoods 
(ServiceCountryRefTabCodeNameRefPackageItemCodeNameSlotIndexParam1Param1_Desc128Param2Param2_Desc128Param3Param3_Desc128Param4Param4_Desc128VALUES (115, @TAB, @PackageName, @Slot, -1'xxx', -1'xxx', -1'xxx', -1'xxx')
    IF (@@
ERROR <> 0)  
    
BEGIN
        
PRINT 'An error happened while adding to _RefShopGoods table'
        
PRINT 'FAILED.'
        
ROLLBACK TRANSACTION
        
RETURN
    
END
    
PRINT 'Added to _RefShopGoods, DONE!'
COMMIT TRANSACTION 
lol, NEXT TIME USE GOOGLE? noob, if he post it here is because this is a fking forum for help? OR I'M WRONG?,

+ He say " ArenaCoin " and your SUPER guide don't add ARENA COIN IN THE FKING NPC. SEARCH A FRIEND !
retontoxD is offline  
Old 08/23/2013, 21:48   #4
 
Cynoxx's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 8
Received Thanks: 1
PaymentDevice=1024 is Arena Coin

now u can write your own query
Cynoxx is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Query für DC Items
11/17/2012 - Metin2 Private Server - 0 Replies
Joa suche die Query für Schrumpfkopf usw :/
PvP Server D13 & FB Items +5 &All new updates & u can buy silk items with arena
09/20/2012 - SRO PServer Advertising - 12 Replies
Features : - Start level 120 & sp 999999999 - can get gold from doing job activites ( Trade 5* = 700m) - Consignemnt working (D13 Stall network) - new attack pets with higher defence and attack and rideable - all uniques spawn when die (include the jupiter uniques) - all events working ( CTF every 1h) ( Arena every 2h ) - u can get any silk item with arena coins by Arena Manager - Fortress war every Friday (6PM) (UTC + 02:00) - all new avatars and every friday update
WTS: Coins + Items in Atlantis for SGD$0.80/ 1 million in game coins (SINGAPORE)
02/03/2012 - Battle of the Immortals - 4 Replies
Looking to sell Coins + Rare Items in Atlantis Server. Rate is SGD$0.80/ 1 million in game coins or item value. Singapore Trades Only! pm me for more info now!
VSRO arena coins
12/17/2011 - SRO Private Server - 2 Replies
hi , somebod knows how to add arena coins to characters? thx!
[cSro] Arena coins
04/22/2011 - Silkroad Online - 7 Replies
So, i see a lot of people selling accesories nova from npc Im not sure, can you buy them with arena coins? or are they useless? I just want to know if you can or cant. Thanks



All times are GMT +1. The time now is 16:09.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.