[Release] AutoCashPoint new version with All Character fix get Regen Cash

Page 3 of 3 FirstFirst 123
Results 31 to 37 of 37
  1. #31
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    Quote Originally Posted by kazueta View Post
    sir ROSLAW
    my query not show error but not working in game its still 0 cash point
    all ini file NATION = RU and i use BILLING RU
    how to fix this???

    thank's
    sory for my bad english sir
    try to connect BILLING db in register.php script too

  2. #32
    Apprentice ginno44 is offline
    MemberRank
    Apr 2011 Join Date
    IndonesianLocation
    18Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    the script is working out, i check on database the cash has increased but why cash in game still 0 ?
    I already have set all my .ini to RU

    ---

    solved after use RShield zoneserver
    thanks @ROSLAW
    Last edited by ginno44; 22-04-16 at 05:50 PM.

  3. #33
    Apprentice spayderbr is offline
    MemberRank
    May 2018 Join Date
    7Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    After installing in the database, all players take disconect after 5 or 7 minutes logged in

  4. #34
    Novice sukesuka is offline
    MemberRank
    Oct 2018 Join Date
    2Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    Hi,
    I tried this in my little server that using RU nation database
    These sqls will regen your cash coin for premium and non-premium user. it will multiply your cash coin if user's status is a premium user. It also checks current map to regen. You can remove it if you want to regen your cash coin in every map. You also can add level or other check.
    Remove previous table, procedure and trigger before use these sql codes.

    1. Create A Table for LogPlay
    Code:
    USE [RF_World]
    
    -- ================================================
    -- Pembuat             : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal    : <13 April 2014>
    -- Keterangan        : <Trigger AutoCash Version 1.2>
    -- ================================================
    
    ALTER TABLE [dbo].[tbl_base]
    ADD LogPlay INT NOT NULL DEFAULT ((0))
    2. Create A Procedure to Save TotalPlayMin as LogPlay
    Code:
    USE [RF_World]
    
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Prosedur AutoCash Version 1.2>
    -- ================================================
    
    CREATE PROCEDURE [dbo].[pUpdate_LogPlay]
    @serial INT,
    @logPlay INT
    AS
    BEGIN
    SET NOCOUNT ON
    UPDATE [dbo].[tbl_base]
    SET LogPlay = @logPlay
    WHERE Serial = @serial
    END
    GO
    3. Create A Procedure to Add Cash Coin and Check Current Map.
    Code:
    USE [Billing]
    
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Prosedur AutoCash Version 1.2>
    -- ================================================
    
    CREATE PROCEDURE [dbo].[RF_RegenCash]
    @id VARCHAR(17),
    @cash INT,
    @serial INT
    AS
    BEGIN
    declare @Rate int
    declare @status int
    declare @map int
    declare @currentmap int
    
    set @Rate='2' -- multiply your cash coin for Premium user
    set @map='11' -- map code for Sette
    
    SET NOCOUNT ON
    set @currentmap=(select map from RF_World.dbo.tbl_general where Serial @serial)
    if @currentmap=@map
    begin
    if exists (select id from billing.dbo.tbl_UserStatus where id @id)
    begin
    set @status=(select status from BILLING.dbo.tbl_UserStatus where id @id)
    if @status = 2
    begin
    update billing.dbo.tbl_UserStatus set cash=cash+ @cash @Rate) where id @id
    end else
    begin
    update billing.dbo.tbl_UserStatus set cash=cash @cash where id @id
    end
    end else
    begin
    insert into billing.dbo.tbl_UserStatus(id,status,Cash)
    values @id,1 @cash)
    end
    end
    END
    GO
    4. Create A Trigger to Update Cash Coin Per 5 Minutes
    Code:
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Trigger AutoCash Version 1.2>
    -- ================================================
    USE [RF_World]
    GO
    /****** Object: Trigger [dbo].[RF_TimeUpdate] Script Date: 06/02/2016 19:37:26 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TRIGGER [dbo].[RegenCash]
    ON [dbo].[tbl_general]
    AFTER UPDATE
    
    as
    begin
    SET NOCOUNT ON;
    DECLARE @GSerial INT
    DECLARE @GPlay INT
    DECLARE @BSerial INT
    DECLARE @BAccount VARCHAR(17)
    DECLARE @BPlay INT
    DECLARE @regencash INT
    declare @cash int
    set @cash='100' -- amount for your cash coin per minute
    
    
    IF UPDATE(TotalPlayMin)
    BEGIN
    SELECT @GSerial = Serial,@GPlay = TotalPlayMin FROM INSERTED
    SELECT @BSerial = Serial,@BAccount=account, @BPlay = LogPlay FROM [dbo].[tbl_base] WHERE Serial = @GSerial
    SELECT @regencash = ((@GPlay-@BPlay) @cash)
    IF @regencash > 0
    BEGIN
    EXEC [Billing].[dbo].[RF_RegenCash] @id=@BAccount @cash @regencash @serial=@Gserial
    EXEC [RF_World].[dbo].[pUpdate_LogPlay] @serial=@GSerial @logPlay=@GPlay
    END 
    END
    END
    I don't know if it will works on your server. I've tried this for 1 hour and got not disconnected from server. But my server is very little.
    You may edit this to improve.

  5. #35
    Newbe likertuban is online now
    ModeratorRank
    Apr 2012 Join Date
    2,329Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    Quote Originally Posted by sukesuka View Post
    Hi,
    I tried this in my little server that using RU nation database
    These sqls will regen your cash coin for premium and non-premium user. it will multiply your cash coin if user's status is a premium user. It also checks current map to regen. You can remove it if you want to regen your cash coin in every map. You also can add level or other check.
    Remove previous table, procedure and trigger before use these sql codes.

    1. Create A Table for LogPlay
    Code:
    USE [RF_World]
    
    -- ================================================
    -- Pembuat             : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal    : <13 April 2014>
    -- Keterangan        : <Trigger AutoCash Version 1.2>
    -- ================================================
    
    ALTER TABLE [dbo].[tbl_base]
    ADD LogPlay INT NOT NULL DEFAULT ((0))
    2. Create A Procedure to Save TotalPlayMin as LogPlay
    Code:
    USE [RF_World]
    
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Prosedur AutoCash Version 1.2>
    -- ================================================
    
    CREATE PROCEDURE [dbo].[pUpdate_LogPlay]
    @serial INT,
    @logPlay INT
    AS
    BEGIN
    SET NOCOUNT ON
    UPDATE [dbo].[tbl_base]
    SET LogPlay = @logPlay
    WHERE Serial = @serial
    END
    GO
    3. Create A Procedure to Add Cash Coin and Check Current Map.
    Code:
    USE [Billing]
    
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Prosedur AutoCash Version 1.2>
    -- ================================================
    
    CREATE PROCEDURE [dbo].[RF_RegenCash]
    @id VARCHAR(17),
    @cash INT,
    @serial INT
    AS
    BEGIN
    declare @Rate int
    declare @status int
    declare @map int
    declare @currentmap int
    
    set @Rate='2' -- multiply your cash coin for Premium user
    set @map='11' -- map code for Sette
    
    SET NOCOUNT ON
    set @currentmap=(select map from RF_World.dbo.tbl_general where Serial @serial)
    if @currentmap=@map
    begin
    if exists (select id from billing.dbo.tbl_UserStatus where id @id)
    begin
    set @status=(select status from BILLING.dbo.tbl_UserStatus where id @id)
    if @status = 2
    begin
    update billing.dbo.tbl_UserStatus set cash=cash+ @cash @Rate) where id @id
    end else
    begin
    update billing.dbo.tbl_UserStatus set cash=cash @cash where id @id
    end
    end else
    begin
    insert into billing.dbo.tbl_UserStatus(id,status,Cash)
    values @id,1 @cash)
    end
    end
    END
    GO
    4. Create A Trigger to Update Cash Coin Per 5 Minutes
    Code:
    -- ================================================
    -- Pembuat : <Hanry Roslaw Saputra>
    -- Dibuat Tanggal : <13 April 2014>
    -- Keterangan : <Trigger AutoCash Version 1.2>
    -- ================================================
    USE [RF_World]
    GO
    /****** Object: Trigger [dbo].[RF_TimeUpdate] Script Date: 06/02/2016 19:37:26 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    CREATE TRIGGER [dbo].[RegenCash]
    ON [dbo].[tbl_general]
    AFTER UPDATE
    
    as
    begin
    SET NOCOUNT ON;
    DECLARE @GSerial INT
    DECLARE @GPlay INT
    DECLARE @BSerial INT
    DECLARE @BAccount VARCHAR(17)
    DECLARE @BPlay INT
    DECLARE @regencash INT
    declare @cash int
    set @cash='100' -- amount for your cash coin per minute
    
    
    IF UPDATE(TotalPlayMin)
    BEGIN
    SELECT @GSerial = Serial,@GPlay = TotalPlayMin FROM INSERTED
    SELECT @BSerial = Serial,@BAccount=account, @BPlay = LogPlay FROM [dbo].[tbl_base] WHERE Serial = @GSerial
    SELECT @regencash = ((@GPlay-@BPlay) @cash)
    IF @regencash > 0
    BEGIN
    EXEC [Billing].[dbo].[RF_RegenCash] @id=@BAccount @cash @regencash @serial=@Gserial
    EXEC [RF_World].[dbo].[pUpdate_LogPlay] @serial=@GSerial @logPlay=@GPlay
    END 
    END
    END
    I don't know if it will works on your server. I've tried this for 1 hour and got not disconnected from server. But my server is very little.
    You may edit this to improve.
    I suggest not to use map in sql query, because it's not updated in real time, and sometimes you even got wrong map in sql (if I remember correctly)

    thanks for sharing anyway

  6. #36
    Novice sukesuka is offline
    MemberRank
    Oct 2018 Join Date
    2Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    yes you are right. I tried using map checking and the zone updated the sql every 5 minutes if you always stay in the game. but if you logout, zone will update it as fast as it can. I can say that this is a bug. if you stay in the game in required map for 4 minutes then do teleport to non-required map, you wont get the cash coin at all. I dont find the solution yet

  7. #37
    Lucky Duck paoxbr is offline
    MemberRank
    Apr 2005 Join Date
    lolLocation
    234Posts

    Re: [Release] AutoCashPoint new version with All Character fix get Regen Cash

    I made this crap code to fix my problem that was not having data on tbl userstatus,can someone help me make it better?


    USE [RF_World]
    GO
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TRIGGER dbo.UserStatusUpdater
    ON dbo.tbl_base
    AFTER INSERT AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Just INSERT everything from the [inserted] pseudotable into
    --the target table
    INSERT INTO [BILLING].dbo.tbl_UserStatus
    (id, Status, DTStartPrem, DTEndPrem, Cash, Bonus)
    SELECT Account, '1', '2019-08-01 13:04:12.400','2019-08-01 13:04:12.400', '1','0'
    FROM inserted
    WHERE Account NOT IN (SELECT id FROM [BILLING].dbo.tbl_UserStatus);

    END
    GO
    Last edited by paoxbr; 10-08-19 at 03:45 PM.



Page 3 of 3 FirstFirst 123

Advertisement