Stored Procedure: _OnQuestFailed
Parameters:
@CharID INT- Character ID@CharName16 VARCHAR(64)- Character name@QuestID INT- Quest ID
Let us trigger the failure of the Jangan [Herb Delivery] quest and send a text notification using
_Char_SendTextNotification
to make sure that the trigger works correctly.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_OnQuestFailed] Script Date: 1/16/2024 3:16:17 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnQuestFailed]
@CharID INT,
@CharName16 VARCHAR(64),
@QuestID INT
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed if the player abandons the quest or if it is removed by the server.
*/
--------- Your code starts here --------
-- Checking the quest ID
IF (@QuestID = 50)
EXEC _Char_SendTextNotification @CharID, 'You have failed the quest.', 1, 0, 0
END