By completing this guide, you should be able to trigger job kills of a specific region and build your own custom systems.
Stored Procedure: _OnEFiveRankJobKill
Parameters:
@GroupID INT - Group ID
@CharID INT - Killer character ID
@CharName16 VARCHAR(64) - Killer character name
@JobType TINYINT - Killer job type
@DeadCharID INT - Dead character ID
@DeadCharName16 VARCHAR(64) - Dead character name
@DeadJobType TINYINT - Dead character job type
Let's add a kill score to the job counter using _JobCounter_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].[_OnEFiveRankJobKill] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnEFiveRankJobKill]
@GroupID INT,
@CharID INT,
@CharName16 VARCHAR(64),
@JobType TINYINT,
@DeadCharID INT,
@DeadCharName16 VARCHAR(64),
@DeadJobType TINYINT
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a job character kills another
job character in a specific counter region.
This procedure is only executed when the TriggerKills option
is enabled in the _RefEFiveRankJobGroup table.
*/
--------- Your code starts here --------
EXEC _JobCounter_AddKill @GroupID, @JobType, @CharName16, 1;
DECLARE @Message VARCHAR(255) = @CharName16 + ' has killed ' + @DeadCharName16;
EXEC _Command_Global_SendTextNotification @Message, 1, 0, 1;
END
The job kill will be added to the selected job counter group, and a global notification will be sent when the trigger is executed.