Change the bonus value (CashPoint per minute), after it is already working...

Results 1 to 3 of 3
  1. #1
    Member drakealx is offline
    MemberRank
    Apr 2018 Join Date
    32Posts

    Change the bonus value (CashPoint per minute), after it is already working...

    USE [RF_World]

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO

    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Trigger AutoCash Version 1.2>
    -- ================================================

    CREATE TRIGGER [dbo].[AutocashRoslaw]
    ON [dbo].[tbl_general]
    FOR UPDATE
    AS
    BEGIN

    SET NOCOUNT ON

    DECLARE @GSerial INT
    DECLARE @GDCK BIT
    DECLARE @GPlay INT

    DECLARE @BSerial INT
    DECLARE @BDCK BIT
    DECLARE @BAccount VARCHAR(17)
    DECLARE @BPlay INT

    DECLARE @regencash INT

    IF UPDATE(TotalPlayMin)
    BEGIN
    SELECT @GSerial = Serial, @GDCK = DCK, @GPlay = TotalPlayMin FROM INSERTED
    IF (@GSerial > 0 AND @GDCK = 0)
    BEGIN
    SELECT @BSerial = Serial, @BDCK = DCK, @BAccount = Account, @BPlay = LogPlay FROM [dbo].[tbl_base] WHERE Serial = @GSerial
    IF (@BSerial > 0 AND @BDCK = 0)
    BEGIN
    SELECT @regencash = ((@GPlay-@BPlay)*60)
    IF @regencash > 0)
    BEGIN
    EXEC [Billing].[dbo].[RF_AutocashRoslaw] @id = @BAccount, @cash = @regencash
    EXEC [RF_World].[dbo].[pUpdate_RoslawBase] @serial = @GSerial, @logPlay = @GPlay
    END
    END
    END
    END

    END
    GO


  2. #2
    Member Alyx is offline
    MemberRank
    Aug 2022 Join Date
    25Posts
    Either, learn SQL and read through the above script https://www.codecademy.com/learn/learn-sql

    or

    Look at the current cash regen rate, note down the number it changes by and look for the same value.

  3. #3
    Member drakealx is offline
    MemberRank
    Apr 2018 Join Date
    32Posts
    Thanks.



Advertisement