By completing this guide, you should be able to activate or deactivate an achievement for the specified character.
You will have to obtain the character ID you want to activate or deactivate the achievement for. You may use the following query to obtain the character ID from the database.
SELECT CharID
FROM _OnlinePlayers
WHERE CharName16 = 'Character_Name';
You will have to obtain the achievement ID you want to activate or deactivate. You may use the following query to obtain the achievement ID from the database.
SELECT ID
FROM _RefAchievements
WHERE CodeName = 'Achievement_CodeName';
Stored Procedure: _Char_AchievementSetActive
Parameters:
@CharID INT - Target character ID
@AchievementID INT - Achievement ID
@IsActive BIT - Enable or disable the achievement
1 - Activate the achievement
0 - Deactivate the achievement
Let's test if the command works by using the following code, which will deactivate the [GOLD_SPENDER_01] achievement for a specific character.
USE [vPlus]
GO
DECLARE @CharID INT = (
SELECT CharID
FROM _OnlinePlayers
WHERE CharName16 = 'character_name'
);
EXEC _Char_AchievementSetActive @CharID, 4, 0;
For real usage, use @CharID directly from your calling procedure.
EXEC _Char_AchievementSetActive @CharID, 4, 0;