You will need to obtain the character ID for the character you want to add gold to. 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_AddGoldLive
Parameters:
@CharID INT- Target character ID@GoldAmount BIGINT- Gold amount@ShowDeliveryMsg BIT- Show delivery message
If the value is set to 1, the player will receive a notification when the gold is added.
Let us first test whether the command works by using the following code, which will add 1000000 gold to a specific character.
USE [vPlus] GO DECLARE @CharID INT = (SELECT CharID FROM _OnlinePlayers WHERE CharName16 = 'character_name') EXEC _Char_AddGoldLive @CharID, 1000000;
For real usage, use @CharID directly from your calling procedure.
EXEC _Char_AddGoldLive @CharID, 1000000;