By completing this guide, you should be able to trigger kills of a specific region and build your own custom systems.
Stored Procedure: _OnEFiveRankKill
Parameters:
@GroupID INT - Group ID
@CharID INT - Killer character ID
@CharName16 VARCHAR(64) - Killer character name
@DeadCharID INT - Dead character ID
@DeadCharName16 VARCHAR(64) - Dead character name
Let's add a kill score to the counter using _Counter_AddKill and send a global text notification using
_Command_Global_SendTextNotification
to ensure that the trigger works fine for us.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_OnEFiveRankKill] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnEFiveRankKill]
@GroupID INT,
@CharID INT,
@CharName16 VARCHAR(64),
@DeadCharID INT,
@DeadCharName16 VARCHAR(64)
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a character kills another
character in a specific counter region.
This procedure is only executed when the TriggerKills option
is enabled in the _RefEFiveRankGroup table.
*/
--------- Your code starts here --------
EXEC _Counter_AddKill @GroupID, @CharID, @CharName16, 1;
DECLARE @Message VARCHAR(255) = @CharName16 + ' has killed ' + @DeadCharName16;
EXEC _Command_Global_SendTextNotification @Message, 1, 0, 1;
END
The character kill will be added to the selected counter group, and a global notification will be sent when the trigger is executed.