Stored Procedure: _OnPartyFormCreateSuccess
Parameters:
@CharID INT- Character ID@CharName16 VARCHAR(64)- Character name@FormNo INT- Party number@Setting TINYINT- Party settings
0 = Item free for all, EXP free for all, only master can invite
1 = Item free for all, EXP auto share, only master can invite
2 = Item auto share, EXP free for all, only master can invite
3 = Item auto share, EXP auto share, only master can invite
4 = Item free for all, EXP free for all, other players can invite
5 = Item free for all, EXP auto share, other players can invite
6 = Item auto share, EXP free for all, other players can invite
7 = Item auto share, EXP auto share, other players can invite
@Purpose TINYINT- Party purpose
0 = Normal hunting
1 = Quest
2 = Trader/Hunter party
3 = Thief party
@MinLevel TINYINT- Party minimum level@MaxLevel TINYINT- Party maximum level@Title VARCHAR(64)- Party title
Let us send a text notification using _Char_SendTextNotification to make sure that the trigger works correctly.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_OnPartyFormCreateSuccess] Script Date: 1/18/2024 7:23:09 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_OnPartyFormCreateSuccess]
@CharID INT,
@CharName16 VARCHAR(64),
@FormNo INT,
@Setting TINYINT,
@Purpose TINYINT,
@MinLevel TINYINT,
@MaxLevel TINYINT,
@Title VARCHAR(64)
AS
BEGIN
SET NOCOUNT ON;
/*
This procedure is executed when a player successfully creates a party form.
*/
--------- Your code starts here --------
-- Sending message
DECLARE @Message VARCHAR(255) = 'You have created party #' + CAST(@FormNo AS NVARCHAR) + ' successfully!'
EXEC _Char_SendTextNotification @CharID, @Message, 1, 0, 0
END