Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG 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
Location
Russia
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:toponlin - MuCore top online module / not working - RaGEZONE Forums
 
The module dose work..You just have to make sure you have OnlineHours in your memb_stat and trigger set
 
Upvote 0
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