Add Item to NPC

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 51
  1. #26
    Member RevelatioN is offline
    MemberRank
    Jan 2012 Join Date
    43Posts

    Re: [Release] Add Item to NPC

    Quote Originally Posted by Caipi View Post
    PHP Code:
    USE SRO_VT_SHARD /* ITEMS TO NPC FOR GOLD by Caipi */
    Declare @ItemID int
    Declare @yourPrice int
    Declare @WhichTAB varchar(74)



    SET @ItemID 23                            /* The Item ID of the Item you want to add to the NPC*/ --## <--
    SET @yourPrice 5000                        /* The price per Unit */ --## <--
    SET @WhichTAB 'STORE_CH_POTION_TAB1'        /* To which Tab at which NPC you want to add the Item*/



    /* Codename instead of the ID */ 
    Declare @CodeName varchar (74SET @CodeName = (SELECT CodeName128 FROM _RefObjCommon WHERE ID = @ItemID)

    /* Which Itemdata.txt is affected in the Media.pk2*/
    Declare @newItemID varchar(5)
    Declare @
    lastPrice varchar(25SET @lastPrice = (SELECT Price FROM _RefObjCommon WHERE ID = @ItemID)
    Declare @
    yourPriceCHAR varchar(25SET @yourPriceCHAR = @yourPrice
    IF (@ItemID 5000SET @newItemID 5000
    else if (@ItemID 10000SET @newItemID 10000
    else if (@ItemID 15000SET @newItemID 15000
    else if (@ItemID 20000SET @newItemID 20000
    else if (@ItemID 25000SET @newItemID 25000
    else if (@ItemID 30000SET @newItemID 30000
    else if (@ItemID 35000SET @newItemID 35000
    else if (@ItemID 40000SET @newItemID 40000
    else SET @newItemID 45000
    print ''
    print @CodeName ' from Media\server_dep\silkroad\textdata\itemdata_'+@newItemID+'.txt'
    print 'Change the current Price of '+@lastPrice+' to '+@yourPriceCHAR+' at the itemdata_'+@newItemID+'. (For the visual Price ingame)'
    /*END which Itemdata.txr*/

    /*for _RefObjCommon Price*/
    UPDATE _RefObjCommon SET Price = @yourPrice WHERE ID = @ItemID

    /* for _RefPackageItem */
    IF EXISTS (SELECT CodeName128 FROM _RefPackageItem WHERE CodeName128 'Package_'+@CodeName)
        
    BEGIN
            
    print 'Already added @ RefPackageItem/.txt!'
        
    END
    ELSE BEGIN
    Declare @SN varchar(74SET @SN = (SELECT NameStrID128 FROM _RefObjCommon WHERE ID = @ItemID)
    Declare @
    DESC varchar(74SET @Desc = (SELECT DescStrID128 FROM _RefObjCommon WHERE ID = @ItemID)
    Declare @
    DDJ varchar(74SET @DDJ = (SELECT AssocFileIcon128 FROM _RefObjCommon WHERE ID = @ItemID)
    INSERT INTO _RefPackageItem (Service,Country,CodeName128,SaleTag,ExpandTerm,NameStrID,DescStrID,AssocFileIcon,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128
    VALUES (1,15,'PACKAGE_'+@CodeName,0,'EXPAND_TERM_ALL',@SN,@Desc,@DDJ,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
    Declare @
    TOPID varchar (10SET @TOPID = (SELECT MAX(IDFROM _RefPackageItem)
    print 
    ''
    print 'Add the following line @ refpackageitem.txt'
    print '1    15    '+@TOPID+'    PACKAGE_'+@CodeName+'    0    EXPAND_TERM_ALL    '+@SN+'    '+@DESC+'    '+@DDJ+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'
    print ''
    END

    /* for _RefPricePolicyOfItem */
    IF EXISTS (SELECT RefPackageItemCodeName FROM _RefPricePolicyOfItem WHERE RefPackageItemCodeName 'Package_'+@CodeName AND PaymentDevice AND Cost = @yourPrice)
        
    BEGIN
            
    print 'Already added @ RefPricePolicyOfItem/.txt!'
        
    END
    ELSE 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_'+@CodeName,1,0,@yourPrice,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
    Declare @
    NEWPRICE varchar(15SET @NEWPRICE = @yourPrice
    print ''
    print 'Add the following line @ refpricepolicyofitem.txt'
    print '1    15    PACKAGE_'+@CodeName+'    1    0    '+@NEWPRICE+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'
    print ''
    END

    /* for _RefShopGoods */
    IF EXISTS (SELECT RefPackageItemCodeName FROM _RefShopGoods WHERE RefPackageItemCodeName 'Package_'+@CodeName AND RefTabCodeName = @WhichTAB)
        
    BEGIN
            
    print 'Already added @ RefShopGoods/.txt!'
        
    END
    ELSE BEGIN
    Declare @newSLOTINDEX varchar(15SET @newSLOTINDEX = (SELECT MAX(SlotIndexFROM _RefShopGoods WHERE RefTabCodeName = @WhichTAB)+1
    INSERT INTO _RefShopGoods 
    (Service,Country,RefTabCodeName,RefPackageItemCodeName,SlotIndex,Param1,Param1_Desc128,Param2,Param2_Desc128,Param3,Param3_Desc128,Param4,Param4_Desc128)
    VALUES (1,15,@WhichTAB,'PACKAGE_'+@CodeName,@newSLOTINDEX,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
    print 
    ''
    print 'Add the following line @ refshopgoods.txt'
    print '1    15    '+@WhichTAB+'    '+'PACKAGE_'+@CodeName+'    '+@newSLOTINDEX+'    -1    xxx    -1    xxx    -1    xxx    -1    xxx'
    print ''
    END

    /* for _RefScrapOfPackageItem */
    IF EXISTS (SELECT RefPackageItemCodeName FROM _RefScrapOfPackageItem WHERE RefPackageItemCodeName 'Package_'+@CodeName AND RefItemCodeName = @CodeName)
        
    BEGIN
            
    print 'Already added @ RefScrapOfPackageItem/.txt!'
        
    END
    ELSE BEGIN
    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)
    VALUES (1,15,'PACKAGE_'+@CodeName,@CodeName,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,'xxx',-1,'xxx',-1,'xxx',-1,'xxx')
    Declare @
    ScrapIndex varchar(15)
    SET @ScrapIndex = (SELECT MAX([Index]) FROM _RefScrapOfPackageItem WHERE RefItemCodeName = @CodeName)
    print 
    ''
    print 'Add the following line @ refscrapofpackageitem.txt'
    print '1    15    '+'PACKAGE_'+@CodeName+'    '+@CodeName+'    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    xxx    -1    xxx    -1    xxx    -1    xxx    '+@ScrapIndex
    print ''
    END
    print ''
    print ''
    print 'Done!' 
    can you explain with video or something please

  2. #27
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: [Release] Add Item to NPC

    Just Like :P

    Here u Go

  3. #28
    Member BD001 is offline
    MemberRank
    Oct 2011 Join Date
    Каир, EgyptLocation
    36Posts

    Re: [Release] Add Item to NPC

    multiupload is down :( could you reupload it.. mediafire?

  4. #29
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: [Release] Add Item to NPC

    Quote Originally Posted by BD001 View Post
    multiupload is down :( could you reupload it.. mediafire?
    Here u Go
    Just Like :P

  5. #30
    Member RevelatioN is offline
    MemberRank
    Jan 2012 Join Date
    43Posts

    Re: [Release] Add Item to NPC

    is this program adding items automatically or what??
    can anyone please tell me how to add items to NPC from the DB

  6. #31
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: [Release] Add Item to NPC

    automatically sure u are wrong

    if u need to know how go there and use ur brain and u will know

    Here u Go

  7. #32
    Member RevelatioN is offline
    MemberRank
    Jan 2012 Join Date
    43Posts

    Re: [Release] Add Item to NPC

    hmmmm ok but when i add the lines to the DB i get this error while opining the server

  8. #33
    Member frigga is offline
    MemberRank
    Dec 2011 Join Date
    31Posts

    Re: [Release] Add Item to NPC

    reupload pls

  9. #34
    Sorcerer Supreme SupremeSRO is offline
    Member +Rank
    Apr 2012 Join Date
    326Posts

    Re: [Release] Add Item to NPC

    . didnt work for me
    Last edited by SupremeSRO; 25-07-12 at 12:00 AM. Reason: bad wrote

  10. #35
    Elite Member chinowyc is offline
    Member +Rank
    Mar 2012 Join Date
    192Posts

    Re: [Release] Add Item to NPC

    Who can reupload?
    pls thanks!

  11. #36
    Member anikan1985 is offline
    MemberRank
    Feb 2012 Join Date
    97Posts

    Re: [Release] Add Item to NPC

    working fine thanks :)

  12. #37
    Member 3oOomar is offline
    MemberRank
    Sep 2012 Join Date
    EgyptLocation
    96Posts

    Re: [Release] Add Item to NPC

    ReUpload it :)

  13. #38
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: [Release] Add Item to NPC


  14. #39
    Elite Member lewy1000 is offline
    Member +Rank
    Apr 2008 Join Date
    P(r)olandLocation
    150Posts

    Re: Add Item to NPC

    Code:
    Msg 8106, Level 16, State 1, Line 19
    Table '_RefPackageItem' does not have the identity property. Cannot perform SET operation.
    how to fix it?

  15. #40
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Add Item to NPC

    Quote Originally Posted by lewy1000 View Post
    Code:
    Msg 8106, Level 16, State 1, Line 19
    Table '_RefPackageItem' does not have the identity property. Cannot perform SET operation.
    how to fix it?
    Try it

    Code:
    use SRO_VT_SHARD
    Go
    SET IDENTITY_INSERT [dbo].[_RefPackageItem] ON

  16. #41
    Developer sladlejrhfpq is offline
    Grand MasterRank
    Oct 2011 Join Date
    671Posts

    Re: Add Item to NPC

    it doesnt required, since he already removed it: '_RefPackageItem' does not have the identity property.

  17. #42
    Elite Member lewy1000 is offline
    Member +Rank
    Apr 2008 Join Date
    P(r)olandLocation
    150Posts

    Re: Add Item to NPC

    Now when i start server i have got this error
    I want add 12D lucky powder to shop in JG

  18. #43
    Elite Member Hex1337 is offline
    Member +Rank
    Sep 2012 Join Date
    100Posts

    Re: Add Item to NPC

    Thanx hean usefull.

    some one reupload.

  19. #44
    Grand Master RevoLand is offline
    Member +Rank
    Jan 2009 Join Date
    117Posts

    Re: [Release] Add Item to NPC

    Quote Originally Posted by Kira View Post
    This link is still working.

  20. #45
    Newbie sonylive is offline
    MemberRank
    Sep 2013 Join Date
    1Posts

    Re: Add Item to NPC

    NO LinK This Link Destroyed

  21. #46
    Elite Member Muhab Ashraf is offline
    Member +Rank
    Feb 2014 Join Date
    Cairo,EgyptLocation
    105Posts

    Re: Add Item to NPC

    great job , thanks^^

  22. #47
    Newbie JusTry is offline
    MemberRank
    Sep 2013 Join Date
    Qena, EgyptLocation
    11Posts

    Re: Add Item to NPC

    reupload please...

  23. #48
    Elite Member bares1993 is offline
    Member +Rank
    May 2013 Join Date
    135Posts

    Re: Add Item to NPC

    anyone can reupload ?

  24. #49
    Newbie Megacius is offline
    MemberRank
    May 2014 Join Date
    6Posts

    Re: Add Item to NPC

    tutorial to use a query please

  25. #50
    Elite Member tvquan90 is offline
    Member +Rank
    Jul 2010 Join Date
    122Posts

    Re: Add Item to NPC

    reupload please



Page 2 of 3 FirstFirst 123 LastLast

Advertisement