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 ] Set, Update Cash Coin & Premium Services 2.2.3.2

Newbie Spellweaver
Joined
May 1, 2010
Messages
10
Reaction score
2
Hello everyone, i want to share a 3 Type of SQL Code to inject Premium Service & Cash Coin

use your own RF_User DB.
Tested on : 2.2.3.2

  • Set Cash Coin
  • Update Cash Coin
  • Set Premium Services
This code is created by Roslaw, i just modified it.
code credits : Hanry Roslaw Saputra

Set Cash Coin
This code is used when you want to set the value of the cash coin.

example:
Early Cash Value Coin: 10,000
Value inserted into SQL: 5,000
Cash Value Coin after the set: 5,000

I usually use this if there are mistakes Cash Coin purchases.
Code:
/****** SET CASH SHOP COIN ******/
/****** Script Owner : Hanry Roslaw Saputra ******/
USE BILLING

DECLARE [USER=1333344765]name[/USER] VARCHAR(13)
DECLARE [USER=315880]cas[/USER]h int

SET [USER=1333344765]name[/USER] = 'roslaw' /* ID game */

SET [USER=315880]cas[/USER]h = '0' /* Set Value of CashCoin */

/************************************************************************************************************************************************/
BEGIN

	update [BILLING].[dbo].[tbl_UserStatus]
	set [Cash] = [USER=315880]cas[/USER]h 
	where id = CONVERT(BINARY, [USER=1333344765]name[/USER])
	
end

/*************************************************************************************************************************************************/

Update Cash Coin
This code is used when you want to update the cash value of the coin.

example:
Early Cash Value Coin: 10,000
Value inserted into SQL: 5,000
Cash Value Coin after set: 15,000

This usually happens when there is a Cash Coin purchases.
Code:
/****** UPDATE CASH SHOP COIN ******/
/****** Script Owner : Hanry Roslaw Saputra ******/
USE BILLING

DECLARE [USER=1333344765]name[/USER] VARCHAR(13)
DECLARE [USER=315880]cas[/USER]h int
DECLARE @buy int

SET [USER=1333344765]name[/USER] = 'roslaw01' /* ID game */

SET @buy = '400000' /* Set Value of payment */
SELECT [USER=315880]cas[/USER]h = Cash from tbl_UserStatus where id = [USER=1333344765]name[/USER]

/************************************************************************************************************************************************/
BEGIN

	update [BILLING].[dbo].[tbl_UserStatus]
	set [Cash] = [USER=315880]cas[/USER]h + @buy
	where id = CONVERT(BINARY, [USER=1333344765]name[/USER])
	
end

/*************************************************************************************************************************************************/

Set Premium Services
Code ini digunakan apabila anda mendapatkan pembelian PREMIUM SERVICE.

Apabila anda menset Premium Service Sebelumnya adalah Lama = 30, lalu anda execute lagi dengan value Lama = 90 maka ID tersebut akan mendapatkan Premium Service Selama 120 hari.
Code:
/****** Script Owner : Hanry Roslaw Saputra ******/
/****** PURCHASEMENT OF PERMIUM SERVICES ******/
DECLARE [USER=1333344765]name[/USER] VARCHAR(13)
DECLARE [USER=1333337597]Status[/USER] int
DECLARE [USER=315880]cas[/USER]h int
DECLARE [USER=2000147291]Lam[/USER]a int

SET [USER=1333344765]name[/USER] = 'roslawit' /* ID game */

SET [USER=1333337597]Status[/USER] = '2' /* 1 for Standard | 2 for Premium */

SET [USER=2000147291]Lam[/USER]a ='30' /* Duration of Premium Services ( days ) */

/************************************************************************************************************************************************/
BEGIN

	update [BILLING].[dbo].[tbl_UserStatus]
	set [Status] =  [USER=1333337597]Status[/USER],
	[DTStartPrem] = CONVERT(datetime,GETDATE()),
	[DTEndPrem] = CONVERT(datetime,GETDATE() [USER=2000147291]Lam[/USER]a)
	where id = CONVERT(BINARY, [USER=1333344765]name[/USER])
	
end

/*************************************************************************************************************************************************/
 
Newbie Spellweaver
Joined
May 30, 2016
Messages
33
Reaction score
0
Msg 102, Level 15, State 1, Line 20Incorrect syntax near '@Lama'.
 
Back
Top