You will need to obtain the character ID for the character whose item you want to change. You can use the following query to get the character ID from the database.
SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name'
Stored Procedure: _Char_MutateItemAt
Parameters:
@CharID INT- Target character ID@Slot TINYINT- Target slot ID@CodeName128 VARCHAR(128)- Item code name@ID64 BIGINT- Item ID64
Let us first test whether the command works by using the following code, which will change the item in a specific inventory slot to a Two-Handed Staff Nova D11 for a specific character.
USE [vPlus] GO DECLARE @CharID INT = (SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name') DECLARE @ID64 BIGINT = (SELECT ItemID FROM SRO_VT_SHARD.._Inventory WHERE CharID = @CharID AND Slot = 13) EXEC _Char_MutateItemAt @CharID, 13, 'ITEM_EU_TSTAFF_11_A_RARE', @ID64;
For real usage, use @CharID directly from your calling procedure.
EXEC _Char_MutateItemAt @CharID, 13, 'ITEM_EU_TSTAFF_11_A_RARE', @ID64;