Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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

Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
Thank a lot sir, but how to make autocash in cash/5minutes or more? Not in 1minute
 
Newbie Spellweaver
Joined
Apr 17, 2014
Messages
38
Reaction score
1
oh ya, why i found @ my rf private.

not all player get autocash regen.

can you help me sir roslaw :D
 
Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
May be in register.php must connected to Billing :D
Btw cant regent for new player or ?
 
Junior Spellweaver
Joined
Apr 5, 2011
Messages
130
Reaction score
2
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
 
Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
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
 
Newbie Spellweaver
Joined
Apr 4, 2011
Messages
18
Reaction score
0
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:
Newbie Spellweaver
Joined
May 27, 2018
Messages
7
Reaction score
0
After installing in the database, all players take disconect after 5 or 7 minutes logged in
 
Initiate Mage
Joined
Oct 12, 2018
Messages
2
Reaction score
0
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             : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal    : <13 April 2014>
-- Keterangan        : [COLOR=#000088]<Trigger[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

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 : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Prosedur[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

CREATE PROCEDURE [dbo].[pUpdate_LogPlay]
@[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I] INT,
@[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play INT
AS
BEGIN
SET NOCOUNT ON
UPDATE [dbo].[tbl_base]
SET LogPlay = @[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play
WHERE Serial = @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]
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 : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Prosedur[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

CREATE PROCEDURE [dbo].[RF_RegenCash]
@[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I] VARCHAR(17),
@[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h INT,
@[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I] INT
AS
BEGIN
declare @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e int
declare @status int
declare @map int
declare @currentmap int

set @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e='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 @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I])
if @currentmap=@map
begin
if exists (select id from billing.dbo.tbl_UserStatus where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I])
begin
set @status=(select status from BILLING.dbo.tbl_UserStatus where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I])
if @status = 2
begin
update billing.dbo.tbl_UserStatus set cash=cash+ @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e) where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]
end else
begin
update billing.dbo.tbl_UserStatus set cash=cash @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]
end
end else
begin
insert into billing.dbo.tbl_UserStatus(id,status,Cash)
values @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I],1 @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h)
end
end
END
GO

4. Create A Trigger to Update Cash Coin Per 5 Minutes
Code:
-- ================================================
-- Pembuat : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Trigger[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================
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 @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash INT
declare @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h int
set @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h='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 @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash = ((@GPlay-@BPlay) @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h)
IF @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash > 0
BEGIN
EXEC [Billing].[dbo].[RF_RegenCash] @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]=@BAccount @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]=@Gserial
EXEC [RF_World].[dbo].[pUpdate_LogPlay] @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]=@GSerial @[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play=@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.
 
Joined
Apr 9, 2012
Messages
2,359
Reaction score
442
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             : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal    : <13 April 2014>
-- Keterangan        : [COLOR=#000088]<Trigger[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

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 : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Prosedur[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

CREATE PROCEDURE [dbo].[pUpdate_LogPlay]
@[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I] INT,
@[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play INT
AS
BEGIN
SET NOCOUNT ON
UPDATE [dbo].[tbl_base]
SET LogPlay = @[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play
WHERE Serial = @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]
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 : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Prosedur[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================

CREATE PROCEDURE [dbo].[RF_RegenCash]
@[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I] VARCHAR(17),
@[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h INT,
@[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I] INT
AS
BEGIN
declare @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e int
declare @status int
declare @map int
declare @currentmap int

set @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e='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 @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I])
if @currentmap=@map
begin
if exists (select id from billing.dbo.tbl_UserStatus where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I])
begin
set @status=(select status from BILLING.dbo.tbl_UserStatus where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I])
if @status = 2
begin
update billing.dbo.tbl_UserStatus set cash=cash+ @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h @[I][B][URL="http://forum.ragezone.com/members/1333430432.html"]Rat[/URL][/B][/I]e) where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]
end else
begin
update billing.dbo.tbl_UserStatus set cash=cash @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h where id @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]
end
end else
begin
insert into billing.dbo.tbl_UserStatus(id,status,Cash)
values @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I],1 @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h)
end
end
END
GO

4. Create A Trigger to Update Cash Coin Per 5 Minutes
Code:
-- ================================================
-- Pembuat : [COLOR=#000088]<Hanry[/COLOR] [COLOR=#660066]Roslaw[/COLOR] [COLOR=#660066]Saputra[/COLOR][COLOR=#000088]>[/COLOR]
-- Dibuat Tanggal : <13 April 2014>
-- Keterangan : [COLOR=#000088]<Trigger[/COLOR] [COLOR=#660066]AutoCash[/COLOR] [COLOR=#660066]Version[/COLOR] 1.2[COLOR=#000088]>[/COLOR]
-- ================================================
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 @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash INT
declare @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h int
set @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h='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 @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash = ((@GPlay-@BPlay) @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h)
IF @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash > 0
BEGIN
EXEC [Billing].[dbo].[RF_RegenCash] @[I][B][URL="http://forum.ragezone.com/members/19862.html"]id[/URL][/B][/I]=@BAccount @[I][B][URL="http://forum.ragezone.com/members/315880.html"]cas[/URL][/B][/I]h @[I][B][URL="http://forum.ragezone.com/members/807898.html"]regenc[/URL][/B][/I]ash @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]=@Gserial
EXEC [RF_World].[dbo].[pUpdate_LogPlay] @[I][B][URL="http://forum.ragezone.com/members/445157.html"]serial[/URL][/B][/I]=@GSerial @[I][B][URL="http://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]Play=@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
 
Initiate Mage
Joined
Oct 12, 2018
Messages
2
Reaction score
0
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
 
Junior Spellweaver
Joined
Apr 20, 2005
Messages
152
Reaction score
39
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:
Back
Top