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!

MuCore top online module / not working

Status
Not open for further replies.
Junior Spellweaver
Joined
May 18, 2008
Messages
146
Reaction score
11
Dear Ragezoner's,

so, i ve installed module TOP ONLINE, themselfe module is working but importent thing is that id does not show online hours played by gamer.

your kind help will be appraciated.



screenshots here: toponline - MuCore top online module / not working - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Oct 14, 2008
Messages
54
Reaction score
0
The module dose work..You just have to make sure you have OnlineHours in your memb_stat and trigger set
 
Upvote 0
ImperiaMuCMS CEO
Loyal Member
Joined
Jul 4, 2011
Messages
1,390
Reaction score
370
Try this. Just put all in SQL Query and run (not all at once).

Code:
ALTER TABLE dbo.MEMB_STAT ADD MinutesOnline int NOT NULL CONSTRAINT DF_MEMB_STAT_MinutesOnline DEFAULT 0

Code:
Use MuOnline

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[WZ_CONNECT_MEMB]
@uid varchar(10),
@server varchar(20),
@uip varchar(20)

AS
BEGIN

BEGIN TRANSACTION

SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED) WHERE memb___id = @uid )
BEGIN
UPDATE MEMB_STAT SET IP = @uip , ConnectStat = 1 , ServerName = @server , ConnectTM = (getdate()) WHERE memb___id = @uid
End

ELSE

BEGIN
INSERT INTO MEMB_STAT ( memb___id,IP,ConnectStat,ServerName,ConnectTM) valueS (@uid,@uip,1,@server,(getdate()))
End

IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION

SET NOCOUNT OFF
End

Code:
Use MuOnline

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON

GO
ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
@uid varchar(20)
AS
Begin
BEGIN TRANSACTION

SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
UPDATE MEMB_STAT SET DisConnectTM = (getdate()), ConnectStat = 0 , MinutesOnline = MinutesOnline+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid
UPDATE Character SET cLevel = 400 , MapNumber = 40, MapPosX = 225, MapPosY = 25, MapDir = 1, PkTime= 0 Where CtlCode = 32 And AccountID = @uid
End

ELSE

Begin
INSERT INTO MEMB_STAT ( memb___id,DisConnectTM,ConnectStat) valueS (@uid,(getdate()),0)
End

IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION

SET NOCOUNT OFF
End
 
Upvote 0
Status
Not open for further replies.
Back
Top