9Mar/108
Mu Online Total Online Mod
What this does?
- add a new column in your MEMB_STAT table for total online time for the user EVER!
Does can it count in HOUR, DATE, Minutes?
- yes
Do i need this?
- no idea... it's ur life
What sort of things i can do with this?
- well i don't really know but i use as referral system on my test server. referral Total Online TIme = Mu CASH ^^
STEPS FOR INSTALLATION
1. NEED TO ADD A NEW COLUMN in MEMB_STAT TABLE
-----
COLUMN NAME: TotalTime
TYPE: int
NOT NULL
DEFAULT 0
-----
2. Change your WZ_DISCONNECT_MEMB ( stored procedure )
CREATE PROCEDURE WZ_DISCONNECT_MEMB @memb___id varchar(10) AS Begin set nocount on Declare @find_id varchar(10) Declare @ConnectStat tinyint Set @ConnectStat = 0 Set @find_id = 'NOT' select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id COLLATE DATABASE DEFAULT where I.memb___id = @memb___id if( @find_id <> 'NOT' ) begin update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate(), TotalTime = TotalTime+(DATEDIFF(mi,ConnectTM,getdate())) where memb___id = @memb___id -- TIMEONLINE MOD by john_d end end GO
If you also want to add a Total Online count for Character?
STEPS FOR INSTALLATION
1. NEED TO ADD A NEW COLUMN in CHARACTER TABLE
-----
COLUMN NAME: TotalTime
TYPE: int
NOT NULL
DEFAULT 0
-----
2. Change your WZ_DISCONNECT_MEMB ( stored procedure )
STEPS FOR INSTALLATION
1. NEED TO ADD A NEW COLUMN in MEMB_STAT TABLE
-----
COLUMN NAME: TotalTime
TYPE: int
NOT NULL
DEFAULT 0
-----
2. Change your WZ_DISCONNECT_MEMB ( stored procedure )
CREATE PROCEDURE WZ_DISCONNECT_MEMB
@memb___id varchar(10)
AS
Begin
set nocount on
Declare @find_id varchar(10)
Declare @con_tm DATETIME
Declare @ConnectStat tinyint
Set @ConnectStat = 0
Set @find_id = 'NOT'
select @find_id = S.memb___id, @con_tm = S.ConnectTM from MEMB_STAT S INNER JOIN MEMB_INFO I ON S.memb___id = I.memb___id COLLATE DATABASE DEFAULT where I.memb___id = @memb___id
if( @find_id <> 'NOT' )
begin
update MEMB_STAT set ConnectStat = @ConnectStat, DisConnectTM = getdate(), TotalTime = TotalTime+(DATEDIFF(mi,ConnectTM,getdate()))
where memb___id = @memb___id
-- TIMEONLINE MOD by john_d
update character set TotalTime = TotalTime+(DATEDIFF(mi,@con_tm,getdate()))
from character as c INNER join AccountCharacter as ac ON
c.Name = ac.GameIDC COLLATE DATABASE DEFAULT where c.accountid = @memb___id
end
end
GO
March 11th, 2010 - 12:56
i get a syntax error “error 156:incorrect syntax near the keyword database”
any ideea why ?
March 11th, 2010 - 17:11
tell me exactly steps you have done in detail.
March 13th, 2010 - 00:01
hey john, could you share an sample php script that will show the most online? Thanks!
March 14th, 2010 - 19:34
in what way?
June 9th, 2010 - 18:00
What this does?
- add a new column in your MEMB_STAT table for total online time for the user EVER!
where i find MEMB_Stat?
June 12th, 2010 - 09:19
Should be a table in your MUONLINE Database
August 21st, 2010 - 08:18
john_d can you give me the script how you use this script to referal system please
August 22nd, 2010 - 22:54
Give me this error:
‘MEMB_STAT’ table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column ‘TotalTime’, table ‘MuOnline.dbo.Tmp_MEMB_STAT’; column does not allow nulls. INSERT fails.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
What i do ?