• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Transform online hours in cash shop points

Experienced Elementalist
Joined
Feb 20, 2006
Messages
214
Reaction score
3
sqrobert - Transform online hours in cash shop points - RaGEZONE Forums


how is possible to fix this error
I use 4.5 files
 
Last edited:
Junior Spellweaver
Joined
May 1, 2011
Messages
100
Reaction score
3
For Webshop Credits and PCPoints, it's actually quite similar.
Assuming you are using MUCore, the location of Webshop Credits should locate at MEMB_CREDITS, thus, you add these lines:

under the declaration:
Code:
[B]declare @credits int[/B]
Under Selection:
Code:
[B]SELECT @credits= credits FROM MEMB_CREDITS where memb___id = @uid[/B]
Under Calculation of Online Hours ->CSPoints
[B]	UPDATE [dbo].[MEMB_CREDITS]
	SET credits= credits + (@OnlineHours * 10)
	WHERE memb___id = @uid[/B]

PCPoints are similar, assuming you are using the TitanTech Packages, it should be located at SCFPCPoints under Characters table:
declare @SCFPCPoints int
SELECT @SCFPCPoints= SCFPCPoints FROM Character where AccountID = @uid
UPDATE [dbo].[Character]
SET SCFPCPoints= SCFPCPoints + (@OnlineHours * 1)
WHERE AccountID = @uid


These should work.

Notice that the commands must go to their sections! If you paste them together there WILL be an error. My Completed scripts are here:

Code:
BEGIN TRANSACTION

SET NOCOUNT ON
	Declare  @find_id varchar(10)
	declare @OnlineHours real
	declare @SCFVipMoney int
	declare @SCFPCPoints int
	declare @credits int

	SELECT @SCFVipMoney= SCFVipMoney FROM MEMB_INFO where memb___id = @uid
	SELECT @SCFPCPoints= SCFPCPoints FROM Character where AccountID = @uid
	SELECT @credits= credits FROM MEMB_CREDITS where memb___id = @uid

IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
UPDATE MEMB_STAT
SET DisConnectTM = (getdate()), connectstat = 0,OnlineHours = @SCFVipMoney/10+(DATEDIFF(hh,ConnectTM,getdate())) WHERE memb___id = @uid
	SELECT  @OnlineHours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid

	UPDATE [dbo].[MEMB_INFO]
	SET SCFVipMoney= SCFVipMoney + (@OnlineHours * 1)
	WHERE memb___id = @uid

	UPDATE [dbo].[Character]
	SET SCFPCPoints= SCFPCPoints + (@OnlineHours * 1)
	WHERE AccountID = @uid

	UPDATE [dbo].[MEMB_CREDITS]
	SET credits= credits + (@OnlineHours * 0)
	WHERE memb___id = @uid
End

Again, don't outright copy it! No two databases are the same!

hello mates can you help me with this: http://forum.ragezone.com/f193/php-script-new-custom-points-934064/

the server we used is TitanTech Package. no custom
custom item has been disabled!
yes i knew we used SCF.cfg. as the server configuration which is connected to the database!
pls i need your help, at the moment i knew some of it.
 
Initiate Mage
Joined
Sep 16, 2013
Messages
1
Reaction score
0
don`t work :( Did all the instructions. script adds 2,210 points for reconnet
 
Newbie Spellweaver
Joined
Jan 20, 2013
Messages
50
Reaction score
7
i change for enemy web, web credits:

Step 1
First enter Start -> All programs-> Sql server -> enterprise manager ->DATABASE->MuOnline-> Tables
Here look for MEMB_STAT , right click and chose Design Table and create a new column like the following:
Column_name: OnlineHours
Type: int
Allow Nulls: unchecked
Default value: 0

Step 2
Same location in MuOnline enter Stored Procedures and find WZ_DISCONNECT_MEMB. Douable click on it and replace the actual code with this one

CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB] memb___id varchar(10)
AS
Begin
set nocount on
Declare Find_id varchar(10)
Declare Connectstat tinyint
declare OnLineHours real
declare Credits int
Set Connectstat = 0
Set Find_id = 'NOT'
select Find_id = S.memb___id from MEMB_STAT S INNER JOIN EW_CREDITS I ON S.memb___id = I.memb___id
where I.memb___id = memb___id
if( Find_id <> 'NOT' )
begin
SELECT Credits= credits FROM EW_CREDITS where memb___id = memb___id
update MEMB_STAT set ConnectStat = Connectstat, DisConnectTM = getdate(), OnlineHours = Credits/10+(DATEDIFF(hh,ConnectTM,getdate()))
where memb___id = memb___id
SELECT OnLineHours =OnlineHours FROM MEMB_STAT WHERE memb___id = memb___id

UPDATE [dbo].[EW_CREDITS]
SET credits= OnLineHours * 10)
WHERE memb___id = memb___id

end
end
GO


work only on ENEMY WEB!
 
Junior Spellweaver
Joined
May 1, 2011
Messages
100
Reaction score
3
can we just go through to the some servers and get the console HTML, and make it as PHP or somewhat language to reconfigure?

i don't know if it is recommend or right to do but, it that possible to translate F12 CONSOLE into codes etc, demo testing like DREAM_WEAVER or JSQuery? etc? just asking mates. thank you
 
Newbie Spellweaver
Joined
May 2, 2014
Messages
67
Reaction score
5
Hey mate its a great job, but as I can change the points for zen?

please help me :D
 
Experienced Elementalist
Joined
Mar 15, 2009
Messages
210
Reaction score
5
Code:
CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
@memb___id varchar(10)
 AS
Begin    
set nocount on
    Declare  [USER=1333416677]Find[/USER]_id varchar(10)    
    Declare [USER=1333459481]Connects[/USER]tat tinyint
	declare [USER=27501]OnLine[/USER]Hours real
	declare @cspoints int
    Set [USER=1333459481]Connects[/USER]tat = 0     
    Set [USER=1333416677]Find[/USER]_id = 'NOT'
    select [USER=1333416677]Find[/USER]_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id 
           where I.memb___id = @memb___id
    if( [USER=1333416677]Find[/USER]_id <> 'NOT' )    
    begin        
	SELECT @cspoints= CSPoints FROM MEMB_INFO where memb___id = @memb___id
        update MEMB_STAT set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = @cspoints/10+(DATEDIFF(hh,ConnectTM,getdate()))
         where memb___id = @memb___id
	SELECT  [USER=27501]OnLine[/USER]Hours =OnlineHours FROM MEMB_STAT WHERE memb___id = @memb___id


UPDATE [dbo].[MEMB_INFO]
SET CSPoints= CSPoints +  [USER=27501]OnLine[/USER]Hours * 10)
WHERE memb___id = @memb___id

end
end
GO

is this code correct for 10 CSPoints/h, i have the CSPoints in MEMB_INFO
===========================


Code:
SELECT @cspoints= CSPoints FROM MEMB_INFO where memb___id = @memb___id
        update MEMB_STAT set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = @cspoints/10+(DATEDIFF(hh,ConnectTM,getdate()))

isnt this gives accounts credits/10+online hours? so i have 5k cspoints and i will get for 1h 5000/10+1? lel?

how to config for 5 CSPoints/h?
=================
and can someone give a sql script for "OnlineHours" cuz i create if but i cannot unbind the "allow nulls"
i use SQL 2000

Column_name: OnlineHours, MEMB_STAT
Type: int
Allow Nulls: unchecked <-i cant uncheck it, says MEMB_STAT doesnt allow nulls
Default value: 0 <- done have this ??
 
Back
Top