By completing this guide, you should be able to trigger Battle Arena event draw and build your own custom systems.
Stored Procedure: _OnBattleArenaDraw
Parameters:
@CharID INT - Character ID
@ArenaType TINYINT - Battle Arena type
@MatchType TINYINT - Battle Arena match type
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].[_OnBattleArenaDraw] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnBattleArenaDraw]
@CharID INT,
@ArenaType TINYINT,
@MatchType TINYINT
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a character has a draw
in the Battle Arena event.
@ArenaType:
0 = Random
1 = Party
2 = Guild
3 = Job
@MatchType represents the Battle Arena match type.
*/
--------- Your code starts here --------
EXEC _Char_SendTextNotification @CharID, 'Your Battle Arena match ended as a draw!', 1, 0, 0;
END