Cookies


Vsroplus only uses the cookies it needs to keep you signed in and remember your language. No ads, no tracking.

Got it

Need to learn more? Privacy policy

Our guides are in English for now.

Fortress War Kill

By completing this guide, you should be able to trigger fortress war kills to function and build your own custom systems.

Stored Procedure: _FortressWar_OnKill
Parameters:

@FortressID INT - Fortress ID
@GuildID INT - Guild ID
@GuildName VARCHAR(64) - Guild name
@CharID INT - Character ID
@CharName16 VARCHAR(64) - Character name
@DeadGuildID INT - Dead guild ID
@DeadGuildName VARCHAR(64) - Dead guild name
@DeadCharID INT - Dead character ID
@DeadCharName16 VARCHAR(64) - Dead character name

Let's send a text notification using _Char_SendTextNotification to ensure that the trigger works fine for us.

USE [vPlus]
GO

/****** Object: StoredProcedure [dbo].[_FortressWar_OnKill] Script Date: 1/18/2024 8:15:44 AM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      <Author,,Name>
-- ALTER date:  <ALTER Date,,>
-- Description: <Description,,>
-- =============================================

ALTER PROCEDURE [dbo].[_FortressWar_OnKill]
    @FortressID INT,
    @GuildID INT,
    @GuildName VARCHAR(64),
    @CharID INT,
    @CharName16 VARCHAR(64),
    @DeadGuildID INT,
    @DeadGuildName VARCHAR(64),
    @DeadCharID INT,
    @DeadCharName16 VARCHAR(64)
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed whenever a player kills another
        inside the fortress war area.
    */

    --------- Your code starts here --------

    DECLARE @Message VARCHAR(255) = 'You killed ' + @DeadCharName16 + ' from ' + @DeadGuildName;

    EXEC _Char_SendTextNotification @CharID, @Message, 1, 0, 0;
END

Last updated: 18 January, 2024

An error has occurred. This application may no longer respond until reloaded. Reload 🗙