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 Equipment Request

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

Stored Procedure: _OnJobEquipRequest
Parameters:

@CharID INT - Character ID
@JobType TINYINT - Job type
@Equipping TINYINT - Equipping status
@CharName16 VARCHAR(64) - Character name
@NickName16 VARCHAR(64) - Job nickname

1 - Character requests to equip the job suit
0 - Character requests to unequip the job suit

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].[_OnJobEquipRequest] Script Date: 1/16/2024 12:48:53 AM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

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

ALTER PROCEDURE [dbo].[_OnJobEquipRequest]
    @CharID INT,
    @JobType TINYINT,
    @Equipping TINYINT,
    @CharName16 VARCHAR(64),
    @NickName16 VARCHAR(64)
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed whenever a character
        requests to equip or unequip a job suit.

        @Equipping = 1 means the character is equipping the job suit.
        @Equipping = 0 means the character is unequipping the job suit.
    */

    -- RETURN 0; -- Cancel the equip request

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

    -- Checking if the character requested to equip the job suit
    IF (@Equipping = 1)
    BEGIN
        EXEC _Char_SendTextNotification @CharID, 'You are currently requesting to equip a job suit!', 1, 0, 0;
    END

    RETURN 1; -- Allow the request
END

Last updated: 16 January, 2024

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