By completing this guide, you should be able to trigger Capture The Flag event register request and build your own custom systems.
Stored Procedure: _OnCaptureTheFlagRegisterRequest
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].[_OnCaptureTheFlagRegisterRequest] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnCaptureTheFlagRegisterRequest]
@CharID INT,
@CharName16 VARCHAR(64)
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a character tries
to register for the Capture The Flag event.
Return Value:
0 = Ignore the register request.
You have to send your own error notification.
1 = Proceed with the register request.
*/
--------- Your code starts here --------
EXEC _Char_SendTextNotification @CharID, 'Your Capture The Flag register request has been received.', 1, 0, 0;
-- RETURN 0; -- Invalid
RETURN 1; -- Valid
END