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!

Reset Connect Users

Newbie Spellweaver
Joined
Jan 31, 2007
Messages
42
Reaction score
0
PHP:
<?php
error_reporting(E_ALL);
$mscon=mssql_connect('Your Local Ip','Sql Account','Sql Password');
mssql_select_db("muonline",$mscon);
$msh=mssql_query("select count(*) from MEMB_STAT where ConnectStat=0");
mssql_query("update MEMB_STAT set ConnectStat=0");
$res=mssql_fetch_row($msh);
echo $res;
?>


how to use???
create new resetconnect.php
copy in C:\appserver\www

and go to Explorer


Sucessfully (Array)

and all users has logout!

:2gunsfiring_v1:
 
Joined
Jun 6, 2006
Messages
622
Reaction score
4
Re: [Releases]Reset Connect User`s

it helps in setting status to offline, (web and database) but its limited.

it wont be able to fix "this is account is already connected".

and thats pretty much it.
 
Newbie Spellweaver
Joined
May 29, 2007
Messages
21
Reaction score
0
Re: [Releases]Reset Connect User`s

it's good, thx for your job man, but how can i fix "this is account is already connected" this is my big problem in my server is a poop have to reconect o logout everytime....

thx for this :D
 
Newbie Spellweaver
Joined
Jan 31, 2007
Messages
42
Reaction score
0
Re: [Releases]Reset Connect User`s

for this
it wont be able to fix "this is account is already connected".
use this script
 
Junior Spellweaver
Loyal Member
Joined
Dec 27, 2004
Messages
108
Reaction score
16
Re: [Releases]Reset Connect User`s

-=Cracker=- Don't lie to the people, this won't fix the "account already connected issue" this is just a stat mod for the database, it has no effect whatsoever on the joinserver.

Here is an alternative btw
create a .bat file that runs this

"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isql.exe" -S YOUR_SERVER_ADDRESS -U YOUR_SQL_USER -Q "update [memb_stat] set [connectstat]=0;" -d MuOnline -P YOUR_PASSWORD

And then opens the gameserver, and use this as a startup method.

I'm too lazy to write it :) Lazy People FTW !!
 
Newbie Spellweaver
Joined
Jan 31, 2007
Messages
42
Reaction score
0
Re: [Releases]Reset Connect User`s

-=Cracker=- Don't lie to the people, this won't fix the "account already connected issue" this is just a stat mod for the database, it has no effect whatsoever on the joinserver.

Here is an alternative btw
create a .bat file that runs this

"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isql.exe" -S YOUR_SERVER_ADDRESS -U YOUR_SQL_USER -Q "update [memb_stat] set [connectstat]=0;" -d MuOnline -P YOUR_PASSWORD

And then opens the gameserver, and use this as a startup method.

I'm too lazy to write it :) Lazy People FTW !!
thx man ... sorry ...
 
Newbie Spellweaver
Joined
Apr 13, 2006
Messages
40
Reaction score
0
Re: [Releases]Reset Connect User`s

i thinck we need to solve the source of the problem, maybe this will help!
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WZ_CONNECT_MEMB]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WZ_CONNECT_MEMB]
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

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
 
Junior Spellweaver
Loyal Member
Joined
Dec 27, 2004
Messages
108
Reaction score
16
Re: [Releases]Reset Connect User`s

i thinck we need to solve the source of the problem, maybe this will help!
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WZ_CONNECT_MEMB]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[WZ_CONNECT_MEMB]
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

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


is it just me or there is really nothing changed in this proc.. ?
 
Junior Spellweaver
Joined
Aug 27, 2005
Messages
143
Reaction score
12
Re: [Releases]Reset Connect User`s

I think that it must be a function in the GS. When a user drop's connection the GS must normally send the close signal to the Login Server, just like it normally does when a user logs out. This dont happens when the connection drops abnormaly.
Maibe goe will help us with this too in the future.

About what -=Cracker=- gived us, is not entirelly useless. I experienced in the past some problems when the CS sets the user as closed but the procedure is not executed (it happens offen when you have a slow connection or when the server is running at the top or when you try to run the server on a weak computer).
Anyway Good Job -=Cracker=-, at least you tryed something.
 
Newbie Spellweaver
Joined
Apr 13, 2006
Messages
40
Reaction score
0
Re: [Releases]Reset Connect User`s

maybe i copied it somewhere from this forum , other topic, and now i don;t remember credits, sorry!
 
Junior Spellweaver
Loyal Member
Joined
Dec 27, 2004
Messages
108
Reaction score
16
Re: [Releases]Reset Connect User`s

maybe i copied it somewhere from this forum , other topic, and now i don;t remember credits, sorry!

ok here's a hint: credits goto webzen ? :) This is the default WZ_CONNECT_MEMB procedure
 
Newbie Spellweaver
Joined
Apr 13, 2006
Messages
40
Reaction score
0
Re: [Releases]Reset Connect User`s

i just stopped move to gs-cs and no one remained on line(no one), so problem is in map server info i think, if some one havesomething to sugest...
 
Back
Top