By completing this guide, you should be able to trigger PvP Matching event start and build your own custom systems.
Stored Procedure: _EventPvPMatching_Start
Parameters:
@CharID1 INT - First character ID
@CharID2 INT - Second character ID
Let's send a text notification to both characters using _Char_SendTextNotification to ensure that the trigger works fine for us.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_EventPvPMatching_Start] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_EventPvPMatching_Start]
@CharID1 INT,
@CharID2 INT
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when PvP Matching starts
between two matched players.
*/
--------- Your code starts here --------
EXEC _Char_SendTextNotification @CharID1, 'Your PvP Matching battle has started!', 1, 0, 0;
EXEC _Char_SendTextNotification @CharID2, 'Your PvP Matching battle has started!', 1, 0, 0;
END