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.

Add Kill

By completing this guide, you should be able to trigger Survival Arena - Solo event kills and build your own custom systems.

Stored Procedure: _EventSAFFA_AddKill
Parameters:

@CharID INT - Killer character ID
@DeadCharID INT - Dead character ID

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].[_EventSAFFA_AddKill] Script Date: 7/18/2024 12:45:24 AM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

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

ALTER PROCEDURE [dbo].[_EventSAFFA_AddKill]
    @CharID INT,
    @DeadCharID INT
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed whenever a player kills
        another player in Survival Arena - Solo.
    */

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

    DECLARE @KillerCharName16 VARCHAR(16) = (
        SELECT CharName16
        FROM SRO_VT_SHARD.dbo._Char
        WHERE CharID = @CharID
    );

    DECLARE @DeadCharName16 VARCHAR(16) = (
        SELECT CharName16
        FROM SRO_VT_SHARD.dbo._Char
        WHERE CharID = @DeadCharID
    );

    DECLARE @Message VARCHAR(255) = @KillerCharName16 + ' has killed ' + @DeadCharName16;

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

    -- RETURN 0; -- Invalid kill and will not be counted in the event
    RETURN 1; -- Valid kill
END

Last updated: 17 July, 2024

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