Removing items from inventory

Results 1 to 14 of 14
  1. #1

    Removing items from inventory

    Hello all i have a questing,

    We have an issue with pets being bugged after setting it as a starting item when players create a character, so i would like to know how i can delete a pet from all players inventory, the pet is a Peng, when you hover mouse near it, it pops up telling the player "invalid pet" so i need to forcibly remove them.

    How might this be done? thanks in advance


  2. #2

    Re: Removing items from inventory

    A little assistance would be great! i dont ask for a hand feed, but just a bump forward.

  3. #3
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Removing items from inventory

    You could use the ChangeItem file to change all those pets to an UCH or a disc or something similar.

  4. #4
    Leech feeder. lifestream is offline
    MemberRank
    Oct 2008 Join Date
    855Posts

    Re: Removing items from inventory

    Hmm i havent done anything item related yet so not sure - but generally i would approach it by running a DB query to search and update specific value.

    Code:
    USE db_name
    DECLARE @x number=0
    DECLARE @colname varchar(max) = 'invslot'
    DECLARE @sql varchar(max)
    While x <= 21
    BEGIN
    SET @colname = 'invslot'
    SET @x=@x+1
    SET @colname = @colname + @x
    
    SELECT @sql ='UPDATE  tablename SET'+@colname+' = NULL WHERE '+@colname+'="pet"
    
    exec (@sql)
    
    END
    the NULL to 0 or what ever the default should be. x <= 21 - the number of inv slots. @colname is the column name for inv (without the leading number? like invslot1 invslot2 invslot3).

    This is simple script - however no idea if it works - i dont know the db structure for cabal yet.
    A dynamic sql that loops through tge table, synamically changing column name and only updates when x value is found.

  5. #5
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Removing items from inventory

    Quote Originally Posted by lifestream View Post
    Hmm i havent done anything item related yet so not sure - but generally i would approach it by running a DB query to search and update specific value.

    Code:
    USE db_name
    DECLARE @x number=0
    DECLARE @colname varchar(max) = 'invslot'
    DECLARE @sql varchar(max)
    While x <= 21
    BEGIN
    SET @colname = 'invslot'
    SET @x=@x+1
    SET @colname = @colname + @x
    
    SELECT @sql ='UPDATE  tablename SET'+@colname+' = NULL WHERE '+@colname+'="pet"
    
    exec (@sql)
    
    END
    the NULL to 0 or what ever the default should be. x <= 21 - the number of inv slots. @colname is the column name for inv (without the leading number? like invslot1 invslot2 invslot3).

    This is simple script - however no idea if it works - i dont know the db structure for cabal yet.
    A dynamic sql that loops through tge table, synamically changing column name and only updates when x value is found.
    Inventory data is binary bulk, that won't work.

  6. #6
    Leech feeder. lifestream is offline
    MemberRank
    Oct 2008 Join Date
    855Posts

    Re: Removing items from inventory

    So it doesnt have separate column for each slot, ratehr all is stored as one string in database?

    nvm that... it cant have... items are diff size and ranomly placed in the inventory.

    Cant they just sell it?

  7. #7
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Removing items from inventory

    My suggestion would work fine.

  8. #8

    Re: Removing items from inventory

    Quote Originally Posted by PunkS7yle View Post
    You could use the ChangeItem file to change all those pets to an UCH or a disc or something similar.
    Thank you so much now i hate looking like an idiot, but where/what is the "changeItem" file?

  9. #9
    Leech feeder. lifestream is offline
    MemberRank
    Oct 2008 Join Date
    855Posts

    Re: Removing items from inventory

    \etc\cabal\Data

  10. #10

    Re: Removing items from inventory

    I think that ruined every character that had that pet, cause now they all DC when trying to log in

    here is the error:

    [Tue Oct 1 2013 00:03:47.844610 3075214192]: 1.open user 84 [A8AFCAA8] (xxx.xxx.xxx.xxx)
    [Tue Oct 1 2013 00:03:53.904493 2753530768]: [RANK LIMIT] characterIdx (299) set to Novice, type BattleStyleLev
    [Tue Oct 1 2013 00:03:53.904705 2753530768]: [##ERROR##] ApplyForInit(): CanEquipItemInSlot false. CharIdx(299), SlotIdx(11), ItemType(34)
    [Tue Oct 1 2013 00:03:53.904720 2753530768]: close(): closing(xxx.xxx.xxx.xxx)
    [Tue Oct 1 2013 00:03:53.904787 2753530768]: 1.close user -1 [A8AFCAA8] (xxx.xxx.xxx.xxx)
    [Tue Oct 1 2013 00:03:53.904814 2753530768]: [##ERROR##] 'OnITCResultInits' fail (Proc/Initialize.cpp:1591)

  11. #11
    Leech feeder. lifestream is offline
    MemberRank
    Oct 2008 Join Date
    855Posts

    Re: Removing items from inventory

    No idea, never used it - but could it have beel a wrong value you used, so the item in inv causes them to crit sicne it doesnt exist or is bugged?

  12. #12
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Removing items from inventory

    Under [ChangeWeapon] field put this in

    Code:
    0	PETID 0 PETID 1 0
    let me know and always test on a local/test server first.. or make backups.

  13. #13

    Re: Removing items from inventory

    ok i will
    and i did have a backup thank god haha

    [ChangeWeapon] ItemIndex ItemDuration TriggerKind ChangeKind ChangeDuration

    these are my rows, your line didn't take in right what is a TriggerKind?

    Quote Originally Posted by PunkS7yle View Post
    Under [ChangeWeapon] field put this in

    Code:
    0	PETID 0 PETID 1 0
    let me know and always test on a local/test server first.. or make backups.
    Problem solve much thanks!!

  14. #14
    Cya nerds PunkS7yle is offline
    MemberRank
    Feb 2010 Join Date
    1,448Posts

    Re: Removing items from inventory

    You iz welcome.



Advertisement