You will need to obtain the character ID for the character whose inventory item you want to remove. 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_DeleteItemInventory
Parameters:
@CharID INT- Target character ID@Slot TINYINT- Target slot ID@CountToRemove INT- Amount to remove@Executor VARCHAR(129)- User who removed the item
Let us first test whether the command works by using the following code, which will remove 5 items from the character's first inventory slot.
USE [vPlus] GO DECLARE @CharID INT = (SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name') EXEC _Char_DeleteItemInventory @CharID, 13, 5;
For real usage, use @CharID directly from your calling procedure.
EXEC _Char_DeleteItemInventory @CharID, 13, 5;