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.

Job Kill

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

Stored Procedure: _OnCharKillJob
Parameters:

@CharID INT - Killer character ID
@CharName16 VARCHAR(64) - Killer character name
@JobType TINYINT - Killer job type
@DeadCharID INT - Dead character ID
@DeadCharName16 VARCHAR(64) - Dead character name
@DeadJobType TINYINT - Dead job type
@WorldID SMALLINT - Game world ID
@RegionID SMALLINT - Region ID

Let's send a global game notification using the _Command_Global_SendTextNotification command to ensure that the trigger works fine for us.

USE [vPlus]
GO

/****** Object: StoredProcedure [dbo].[_OnCharKillJob] Script Date: 1/9/2024 5:15:44 AM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

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

ALTER PROCEDURE [dbo].[_OnCharKillJob]
    @CharID INT,
    @CharName16 VARCHAR(64),
    @JobType TINYINT,
    @DeadCharID INT,
    @DeadCharName16 VARCHAR(64),
    @DeadJobType TINYINT,
    @WorldID SMALLINT,
    @RegionID SMALLINT
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed whenever a character
        kills another character in Job mode.
    */

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

    -- Declaring our message variable
    DECLARE @Message VARCHAR(255) = @CharName16 + ' has killed ' + @DeadCharName16 + ' in Job Mode!';

    -- Executing the command
    EXEC _Command_Global_SendTextNotification @Message, 1, 0, 0;
END

Last updated: 9 January, 2024

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