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.

Alchemy Fuse Fail

Stored Procedure: _OnAlchemyFuseFail

Parameters:

  • @CharID INT - Character ID
  • @CharName16 VARCHAR(64) - Character name
  • @Slot TINYINT - Slot ID
  • @RefItemID INT - Item ID
  • @FailType TINYINT - Fail type

0 = Item still exists
1 = Item destroyed

  • @CurrentOptLevel TINYINT - Current item plus value

Let us send a text notification using _Char_SendTextNotification to make sure that the trigger works correctly.

USE [vPlus]
GO
/****** Object:  StoredProcedure [dbo].[_OnAlchemyFuseFail]    Script Date: 1/18/2024 6:28:27 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      <Author,,Name>
-- ALTER date:  <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_OnAlchemyFuseFail]
    @CharID INT,
    @CharName16 VARCHAR(64),
    @Slot TINYINT,
    @RefItemID INT,
    @FailType TINYINT,
    @CurrentOptLevel TINYINT
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed when the player fuses an item and the fuse fails.

        @FailType:
            0 = Normal failure, item still exists
            1 = Item destroyed
    */

    --------- Your code starts here --------
    IF (@FailType = 0)
        EXEC _Char_SendTextNotification @CharID, 'You have failed to fuse your item.', 1, 0, 0

    IF (@FailType = 1)
        EXEC _Char_SendTextNotification @CharID, 'Your item has been destroyed.', 1, 0, 0
END

Last updated: 18 January, 2024

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