Skip to content

Instantly share code, notes, and snippets.

@kguardedge
Created June 17, 2025 08:33
Show Gist options
  • Save kguardedge/51ec2c6f033e442916c9998613a1b4be to your computer and use it in GitHub Desktop.
Save kguardedge/51ec2c6f033e442916c9998613a1b4be to your computer and use it in GitHub Desktop.

Command System Usage Guide

This guide explains how to execute server management commands using the KGuardEDGE.dbo._DeveloperCommands table.

Table Structure

DoDate TargetType TargetData Cmd Data1 Data2 Data3 Data4 Data5 Data6 Data7
Execution Time Target Type Target Data Command Name Additional Data Fields…
-- Template
INSERT INTO KGuardEDGE.dbo._DeveloperCommands
  (DoDate, TargetType, TargetData, Cmd, Data1, Data2, Data3, Data4, Data5, Data6, Data7)
VALUES
  (@DoDate, @TargetType, @TargetData, @Cmd, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7);
-- Example
-- Send a bilingual notification to the character named KGuardEDGE (using defaults without altering the template)
INSERT INTO KGuardEDGE.dbo._DeveloperCommands
  (DoDate, TargetType, TargetData, Cmd, Data1, Data2, Data3, Data4, Data5, Data6, Data7)
VALUES
  (default, 'charname', 'KGuardEDGE', 'sendnotify_translated',
   'Güvendesin!', 'You are safe!', default, default, default, default, default);

Additional examples are provided at the very end of this document.

TargetType TargetData Description
'everyone' default All players
'charname' @CharName A specific character (by CharName)
'charid' @CharID A specific character (by CharID)
'guildid' @GuildID A specific guild
'guildname' @GuildName A specific guild (by name)
'continent' @ContinentName A specific continent
'intown' default Players in town
'outtown' default Players out of town
'worldid' @WorldID A specific world
'regionid' @RegionID A specific region
'regiongroupid' @RegionGroupID A specific region group (as shown in the Server Panel’s RegionGroup page)
'nojob' default Players without any job outfit
'injob' 'all', 'trader',
'hunter', 'thief'
Players with a job outfit, filtered by type if desired
'ip' @IPAddress A specific IP address
'hwid' @HWID A specific hardware ID
'cape' default, @CapeID All cape owners or those with a specific cape ID
'targetted' @UniqueID Targeted object’s unique ID (e.g. _Live_Unique in logs)

Tip: Multiple TargetData values can be listed separated by commas (e.g. 'trader,hunter' for 'injob').

All of the following commands can be used with any of the selectors above:
Cmd Data1 Data2 Data3 Data4 Data5 Data6 Data7
'sendpm' @From @Message
'sendpm_ask' @From @Message
'sendacademy' @From @Message
'sendglobal' @From @Message @Color
'sendinfo' @Message @Color
'sendsysmsg' @Message @Color
'sendnotice' @Message
'sendnotify_red' @Message
'sendnotify_blue' @Message
'sendnotify_green' @Message
'sendnotify_alchemy' @Message
'sendnotify_english' @Message
'sendnotify_turkish' @Message
'sendnotify_alchemy_completely' @Message
'sendnotify_translated' @Turkish @English
'give_item' @CodeName128 @Count @Plus
'give_gold' @Amount
'give_skillpoint' @Amount
'give_damage' @Percentage
'timedjob_add' @Category @JobID @Duration @Serial64
'timedjob_del' @Category @JobID
'buff_add' @SkillID @JobType @WorldID
'buff_del' @SkillID @JobType @WorldID
'invisible'
'invincible'
'loadmonster' @RefObjID @Quantity @Rarity
'mobkill' @GameserverObjID @Type
'makeitem' @RefItemID @Data
'resetq'
'warp' @WorldID @RegionID @PosX @PosY @PosZ
'gotown'
'consolecommand' @Command
'update_hwanlevel' @Level
'update_grantname' @Title
'update_cape' @Cape
'update_bodystate' @State
'update_mask' @RefObjID
'animation_equips' @Plus @Item1 @Item2 @Item3 @Item4 @Item5 @Item6
'unfreeze'
'loadmonster_pos' @RefObjID @Rarity @WorldID @RegionID @PosX @PosY @PosZ
'timer_show' @SecondsGreen @SecondsYellow @SecondsOrange @SecondsRed
'timer_hide'
'disconnect'

Note: Use default for empty parameters, as shown above.


Examples

-- Example 1
-- Send a bilingual notification to the character named KGuardEDGE (using defaults)
INSERT INTO KGuardEDGE.dbo._DeveloperCommands (DoDate, TargetType, TargetData, Cmd, Data1, Data2, Data3, Data4, Data5, Data6, Data7)
VALUES (default, 'charname', 'KGuardEDGE', 'sendnotify_translated', 'Güvendesin!', 'You are safe!', default, default, default, default, default);
-- Example 2
-- Send a bilingual notification to the character named KGuardEDGE (after 30 seconds)
INSERT INTO KGuardEDGE.dbo._DeveloperCommands (DoDate, TargetType, TargetData, Cmd, Data1, Data2, Data3, Data4, Data5, Data6, Data7)
VALUES (DATEADD(SECOND, 30, GETDATE()), 'charname', 'KGuardEDGE', 'sendnotify_translated', 'Güvendesin!', 'You are safe!', default, default, default, default, default);
-- Example 3
-- Send a bilingual notification to the character named KGuardEDGE (simplified)
INSERT INTO KGuardEDGE.dbo._DeveloperCommands (TargetType, TargetData, Cmd, Data1, Data2)
VALUES ('charname', 'KGuardEDGE', 'sendnotify_translated', 'Güvendesin!', 'You are safe!');
-- Example 4
-- Send a bilingual notification to the character named KGuardEDGE (simplified, after 30 seconds)
INSERT INTO KGuardEDGE.dbo._DeveloperCommands (DoDate, TargetType, TargetData, Cmd, Data1, Data2)
VALUES (DATEADD(SECOND, 30, GETDATE()), 'charname', 'KGuardEDGE', 'sendnotify_translated', 'Güvendesin!', 'You are safe!');

Scenario Example

-- Scenario Example
-- Grant additional gold to characters whose current gold is below 1,000,000,000
DECLARE @Gold BIGINT = 1000000000;
INSERT INTO KGuardEDGE.dbo._DeveloperCommands (TargetType, TargetData, Cmd, Data1)
SELECT 'charid', CharID, 'give_gold', @Gold - RemainGold
FROM SRO_VT_SHARD.dbo._Char
WHERE RemainGold < @Gold;

-- We recommend using INSERT for scenarios like this instead of stored procedures,
-- since stored procedures cannot generate multiple commands without loops.

Legacy Command System Usage

For information about the legacy command system, log in at kguardedge.com and navigate to:

Server Panel > Developer > Guard Commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment