[Guide] Fix Online Count MEMB_STAT

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
Ok, this is the thing, that some of ya were w8ing from years :)
It will fix the Online Count in MuWeb! The things we are going to 'touch' are the 2 procedures (WZ_CONNECT_MEMB & WZ_DISCONNECT_MEMB) and the Table (MEMB_STAT)

Some dudes say that it also fixes the Disconection Bug when warping from GS maps to GS_CS maps (im not sure about that, cuz i know it's not only from the procedures, but in the GSs as well)! But u can always test it ;)

Here we go:

1. Delete WZ_CONNECT_MEMB & WZ_DISCONNECT_MEMB from Stored Procedures.
2. Delete MEMB_STAT Table

3. Creating WZ_CONNECT_MEMB with SQL Query Analyzer (Run this in MuOnline DB)

Code:
CREATE PROCEDURE WZ_CONNECT_MEMB

@uid varchar(20),
@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) valueS (
@uid,
@uip,
1,
@server
)
End


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

SET NOCOUNT OFF
End
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
4. Delete Previous Lines, Creating WZ_DISCONNECT_MEMB with SQL Query Analyzer (Run this in MuOnline DB)

Code:
CREATE PROCEDURE 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 WHERE memb___id = @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
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
5. Finaly Creating MEMB_STAT, Delete Previous Lines and Run this in MuOnline DB.

Code:
CREATE TABLE [dbo].[MEMB_STAT] (
[memb___id] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[ConnectStat] [tinyint] NULL ,
[ServerName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
[IP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
[ConnectTM] [smalldatetime] NULL ,
[DisConnectTM] [smalldatetime] NULL
) ON [PRIMARY]
GO
I also recommend u BUing the DataBase before doing this, but it was tested several times and it works perfekt ;)

Credits:
-United
-ReaL
 

Gam3*BoY

Active Member
Joined
Dec 5, 2008
Messages
497
Reaction score
89
примен засега работи ... има ли някой дисконект модул за сайта ....
 

FeliXcat

Active Member
Joined
Aug 18, 2008
Messages
947
Reaction score
218
Тоя guide не го препоръчвам на някой, който ползва в сървърва си отчитане на online hours...
 

Gedeminas

New Member
Joined
Jul 25, 2010
Messages
74
Reaction score
37
THANKS MAN. Whit this guid i fix me server 1000000000/100000000
 

dorintosa1

New Member
Joined
Mar 27, 2020
Messages
20
Reaction score
4
DROP TABLE MEMB_STAT
DROP PROCEDURE WZ_CONNECT_MEMB
DROP PROCEDURE WZ_DISCONNECT_MEMB

i try but no work :(
i was lucky i do the backup before.
 
Thread starter Similar threads Forum Replies Date
m4w94pke [Guide] Fix Widescreen: Main 97D+99i Guides 12
dDosgwapo [Guide] How to fix C000001d Error Guides 3
Wikko0 [Guide] Fix Quest System 97d Guides 9
L [Guide] Sql Server Connect Error Fix Guides 3
Dungeon [Guide] Remove MD5 Fixed Guides 5
f0und [Guide] Fix Devil Square Points Guides 7
darkkingh [Guide] How to fix MD5 in your server files Guides 6
MeMoS [Guide] How to fix MD5 in your website Guides 8
redfighterxp [Guide] Good Script for AutoFix stats Guides 0
eXecuteR [Guide] Visual C++ Debug error Fix Guides 7
DarkMaster [Guide] Age Bug Fix [1.00.18] Guides 8
y0caa [Guide] Fix Sygate Firewall Guides 29
killar4eto [Guide] How to setup MuServer SCFMT 7.09.00 Cracked + Fixes & New Items Guides 45
MorgaN [Guide] How fix Guild exit Bug Guides 6
O [Guide] Fix SQL Inject in MuServer Guides 8
diablo21 [Guide] Stats Fix Sql Job Guides 12
Shatter [Guide] Party Zen Bug Fix (1.00.18) Guides 0
FroggerPL [Guide] MuServer Error Fixing Guides 1
Gasolincho [Guide] Reset limit fix Guides 15
MorgaN [Guide] How to fix Guild Score Guides 0
DarkMaster [Guide] Security fix for FragFrog package Guides 5
ReaL [Guide] Season3 Ep1 GS Freeze & Crash FIX Guides 9
DarkMaster [Guide] 97d99i Party Zen Bug Fix Guides 2
P [Guide] How to fix Error-L10 Guides 3
P [Guide] How To Fix "Account is Allready Connected" Guides 25
DarkMaster [Guide] Chaos Castle Fix 1.01e Guides 4
D [Guide] Create Server Online DarksTeam 97D Guides 5
D [Guide] Tutorial Install MuOnline MvCore 1.17.1 Guides 1
C [Guide] How to setup MuOnline Ex700 Server (Video Tutorial) Guides 0
valvers [Guide] Как се прави сървър с рутер 100% работи - MuOnline Guides 6
C [Guide] How to Edit/Change [.OZT / .OZJ] MuOnline Images Guides 0
0bsessed [Guide] MuOnline Jewels Guides 3
O [Guide] Making, Secure, Populate your MU Online Server Guides 59
h3tr1k [Guide] Configuring your MuOnline server (English) Guides 9
ReaL [Guide] Playing MuOnline On Any Linux Distribution Guides 8
MorgaN [Guide] Top 25 Online User PHP Code Guides 24
Mortred [Guide] Account Already Connect Guides 3
ReaL [Guide] Delete never used accounts Guides 9
P [Guide] SQL Query To Delete Empty Accounts Guides 6

Similar threads