You will need to obtain the account ID for the account that should receive the item. You can use the following query to get the account ID from the database.
SELECT JID FROM _OnlinePlayers WHERE CharName16 = 'character_name'
You will also need to obtain the item ID that you want to add. You can use the following query to get the item ID from the database.
SELECT ID FROM SRO_VT_SHARD.._RefObjCommon WHERE CodeName128 = 'ITEM_ETC_ARENA_COIN'
Stored Procedure: _Account_AddItemToChest
Parameters:
@UserJID INT- Target account ID@RefItemID INT- Target item ID@Data INT- Amount to add. If0is used, a full stack will be added.@OptLevel TINYINT- The plus value of the item@TypeStr VARCHAR(64)- Reason for adding the item
Let us first test whether the command works by using the following code, which will add 10 Arena Coins.
USE [vPlus] GO DECLARE @UserJID INT = (SELECT JID FROM _OnlinePlayers WHERE CharName16 = 'character_name') EXEC _Account_AddItemToChest @UserJID, 25834, 10, 0, 'Reward';
For real usage, use @UserJID directly from your calling procedure.
EXEC _Account_AddItemToChest @UserJID, 25834, 10, 0, 'Reward';