[For Beginners] Collection of Guides/Fixes

Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    No avatar RenePunik is offline
    MemberRank
    Feb 2013 Join Date
    1,431Posts

    Re: Additional query: inventory + storage slots info

    Quote Originally Posted by Witchy Moo View Post
    In addition to @RenePunik's query about cleaning inventory, this one is to see inventory and storage items :)

    now the boring part:
    Code:
    USE [SRO_VT_SHARD]
    GO
    SET NOCOUNT ON;
    
    /*
     * Check items in inventory and storage
     * Witchy Moo 20150622
     */
    DECLARE @CharName VARCHAR(64)
    DECLARE @CharID INT
    DECLARE @userJID INT
    DECLARE @ItemID BIGINT
    DECLARE @CharSlot TINYINT
    DECLARE @codename128 VARCHAR(64)
    
    SET @CharName = 'Witchy'    -- set character name here
    
    /* Check items in inventory */
    PRINT CHAR(10)+'Inventory Items:'
    SELECT @CharID = CharID FROM [_Char] WHERE CharName16 = LTRIM(RTRIM(@CharName))
    DECLARE cur CURSOR FOR SELECT ItemID, Slot FROM [_Inventory] WITH (NOLOCK) WHERE CharID = @CharID AND ItemID > 0 ORDER BY Slot ASC
    OPEN cur
    FETCH NEXT FROM cur INTO @ItemID, @CharSlot
    WHILE @@FETCH_STATUS = 0
    BEGIN
        SELECT @codename128 = CodeName128 FROM [_RefObjCommon] WITH (NOLOCK) WHERE ID = (SELECT RefItemID FROM [_Items] WITH (NOLOCK) WHERE ID64 = @ItemID)
        PRINT '- Inventory slot ' + CAST(@CharSlot AS VARCHAR) + ': ' + @codename128
        FETCH NEXT FROM cur INTO @ItemID, @CharSlot
    END;
    CLOSE cur
    DEALLOCATE cur
    /* Check items in storage */
    PRINT CHAR(10)+'Storage Items:'
    SELECT @userJID = UserJID FROM _User WHERE CharID = @CharID
    DECLARE cur CURSOR FOR SELECT ItemID, Slot FROM [_Chest] WITH (NOLOCK) WHERE UserJID = @userJID AND (ItemID <> 0 AND ItemID IS NOT NULL) ORDER BY Slot ASC
    OPEN cur
    FETCH NEXT FROM cur INTO @ItemID, @CharSlot
    WHILE @@FETCH_STATUS = 0
    BEGIN
        SELECT @codename128 = CodeName128 FROM [_RefObjCommon] WITH (NOLOCK) WHERE ID = (SELECT RefItemID FROM [_Items] WITH (NOLOCK) WHERE ID64 = @ItemID)
        PRINT '- Storage Slot ' + CAST(@CharSlot AS VARCHAR) + ': ' + @codename128
        FETCH NEXT FROM cur INTO @ItemID, @CharSlot
    END;
    CLOSE cur
    DEALLOCATE cur
    Result:
    Attachment 152328
    cheers ;)
    Nice one.

  2. #17
    Novice RWB6977 is offline
    MemberRank
    Dec 2020 Join Date
    1Posts
    i have a problem with my FGW when i use a dimension portal it will not make a teleport hole to go to the FGW can anyone help with that ????



Page 2 of 2 FirstFirst 12

Advertisement