By completing this guide, you should be able to trigger Capture The Flag event draw and build your own custom systems.
Stored Procedure: _OnCaptureTheFlagDraw
Parameters:
@CharID INT - Character ID
@CharName16 VARCHAR(64) - Character name
Let's send a text notification to the character using _Char_SendTextNotification to ensure that the trigger works fine for us.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_OnCaptureTheFlagDraw] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnCaptureTheFlagDraw]
@CharID INT,
@CharName16 VARCHAR(64)
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a character has a draw
in the Capture The Flag event.
*/
--------- Your code starts here --------
EXEC _Char_SendTextNotification @CharID, 'Your Capture The Flag match ended as a draw!', 1, 0, 0;
END