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!

webshop error, online users MU CORE

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 9, 2016
Messages
10
Reaction score
1
I have this problem, when i try to buy a item this happen. (im offline in the server but this happend in the webshop)

Code:
[COLOR=#444444]Unable to buy this item, reason: your account is connected in game, please disconnect.[/COLOR]

im trying to do with this to solve the problem, and i did it
Code:
[COLOR=#474747]UPDATE MEMB_STAT[/COLOR]
[COLOR=#474747]SET Connect_Stat='0'[/COLOR]
[COLOR=#474747]WHERE Connect_Stat>0[/COLOR]

but i dont want to do this again again and again to buy a item, how can solve this to do automatic. Because when i reconnect, and try to buy a item the same error show to my users and me


Sorry for bad english
 
Newbie Spellweaver
Joined
Apr 9, 2016
Messages
10
Reaction score
1
what webshop you use? the default by mucore?
maybe u can try another one and see if the problem relies on website module or files/db. @jacubb might help
can you give me a pic of your sql MEMB_STAT CONNECTSTAT, because i dont know how to fix this maybe there is the problem
 
Upvote 0
Joined
May 26, 2009
Messages
17,304
Reaction score
3,216
memb_Stat
Code:
USE [MuOnline]
GO

/****** Object:  Table [dbo].[MEMB_STAT]    Script Date: 05/30/2016 08:24:28 ******/
SET ANSI_NULLS OFF
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING OFF
GO

CREATE TABLE [dbo].[MEMB_STAT](
	[memb___id] [varchar](10) NOT NULL,
	[ConnectStat] [tinyint] NOT NULL,
	[ServerName] [varchar](50) NULL,
	[IP] [varchar](20) NULL,
	[ConnectTM] [smalldatetime] NULL,
	[DisConnectTM] [smalldatetime] NULL,
	[OnlineHours] [int] NOT NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[MEMB_STAT] ADD  CONSTRAINT [DF_MEMB_STAT_ConnectStat]  DEFAULT ((0)) FOR [ConnectStat]
GO

ALTER TABLE [dbo].[MEMB_STAT] ADD  DEFAULT ((0)) FOR [OnlineHours]
GO

u must re-create the table if u want to try out by deleting and running this query to recreate it (sql 2008)

also in database>programmibility>stored procedures> right click and modify dbo.WZ_CONNECT_MEMB
try to edit the whole code with
Code:
USE [MuOnline]
GO
/****** Object:  StoredProcedure [dbo].[WZ_CONNECT_MEMB]    Script Date: 05/30/2016 08:27:43 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO


			ALTER PROCEDURE [dbo].[WZ_CONNECT_MEMB]
			@memb___id varchar(10) , 
		 [USER=1333468744]ServerName[/USER]  varchar(50),
			@IP varchar(20)	
			 AS
			Begin	
			set nocount on
				Declare  [USER=1333416677]Find[/USER]_id varchar(10) 	
				Declare  [USER=1333459481]Connects[/USER]tat tinyint
				Set [USER=1333416677]Find[/USER]_id = 'NOT'
				Set [USER=1333459481]Connects[/USER]tat = 1

				select [USER=1333416677]Find[/USER]_id = S.memb___id COLLATE Latin1_General_CS_AS from [MuOnline].[dbo].[MEMB_STAT] S INNER JOIN [MuOnline].[dbo].[MEMB_INFO] I ON S.memb___id = I.memb___id COLLATE Latin1_General_CS_AS
					   where I.memb___id = @memb___id COLLATE Latin1_General_CS_AS

				if( [USER=1333416677]Find[/USER]_id = 'NOT' )
				begin		
					insert into [MuOnline].[dbo].[MEMB_STAT] (memb___id,ConnectStat,ServerName,IP,ConnectTM)
					values(@memb___id,  [USER=1333459481]Connects[/USER]tat, [USER=1333468744]ServerName[/USER], @IP, getdate())
				end
				else		
					update [MuOnline].[dbo].[MEMB_STAT] set ConnectStat = [USER=1333459481]Connects[/USER]tat,
								 ServerName = [USER=1333468744]ServerName[/USER],IP = @IP,
								 ConnectTM = getdate()
					 where memb___id = @memb___id COLLATE Latin1_General_CS_AS
			end
or just delete and re-create.

also database>programmibility>stored procedures> right click and modify this table called dbo.WZ_DISCONNECT_MEMB
Code:
USE [MuOnline]
GO
/****** Object:  StoredProcedure [dbo].[WZ_DISCONNECT_MEMB]    Script Date: 05/30/2016 08:28:44 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

			ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]
			@memb___id varchar(10)
			AS
			Begin	
			set nocount on
				Declare  [USER=1333416677]Find[/USER]_id varchar(10)
				Declare [USER=1333459481]Connects[/USER]tat tinyint
				Set [USER=1333459481]Connects[/USER]tat = 0 
				Set [USER=1333416677]Find[/USER]_id = 'NOT'
				select [USER=1333416677]Find[/USER]_id = S.memb___id COLLATE Latin1_General_CS_AS from [MuOnline].[dbo].[MEMB_STAT] S INNER JOIN [MuOnline].[dbo].[MEMB_INFO] I ON S.memb___id = I.memb___id COLLATE Latin1_General_CS_AS
					   where I.memb___id = @memb___id

				if( [USER=1333416677]Find[/USER]_id <> 'NOT' )
				begin		
					update [MuOnline].[dbo].[MEMB_STAT] set ConnectStat = [USER=1333459481]Connects[/USER]tat, DisConnectTM = getdate(), OnlineHours = OnlineHours + DATEDIFF(hh,ConnectTM,getdate())
					 where memb___id = @memb___id
				end 
			end
after u do this changes close sql server and test.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 9, 2016
Messages
10
Reaction score
1
memb_stat
Code:
use [muonline]
go

/****** object:  Table [dbo].[memb_stat]    script date: 05/30/2016 08:24:28 ******/
set ansi_nulls off
go

set quoted_identifier on
go

set ansi_padding off
go

create table [dbo].[memb_stat](
    [memb___id] [varchar](10) not null,
    [connectstat] [tinyint] not null,
    [servername] [varchar](50) null,
    [ip] [varchar](20) null,
    [connecttm] [smalldatetime] null,
    [disconnecttm] [smalldatetime] null,
    [onlinehours] [int] not null
) on [primary]

go

set ansi_padding off
go

alter table [dbo].[memb_stat] add  constraint [df_memb_stat_connectstat]  default ((0)) for [connectstat]
go

alter table [dbo].[memb_stat] add  default ((0)) for [onlinehours]
go

u must re-create the table if u want to try out by deleting and running this query to recreate it (sql 2008)

also in database>programmibility>stored procedures> right click and modify dbo.wz_connect_memb
try to edit the whole code with
Code:
use [muonline]
go
/****** object:  Storedprocedure [dbo].[wz_connect_memb]    script date: 05/30/2016 08:27:43 ******/
set ansi_nulls off
go
set quoted_identifier off
go


            alter procedure [dbo].[wz_connect_memb]
            @memb___id varchar(10) , 
         @[i][b][url="http://forum.ragezone.com/members/1333468744.html"]servername[/url][/b][/i]  varchar(50),
            @ip varchar(20)    
             as
            begin    
            set nocount on
                declare  @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id varchar(10)     
                declare  @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat tinyint
                set @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id = 'not'
                set @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat = 1

                select @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id = s.memb___id collate latin1_general_cs_as from [muonline].[dbo].[memb_stat] s inner join [muonline].[dbo].[memb_info] i on s.memb___id = i.memb___id collate latin1_general_cs_as
                       where i.memb___id = @memb___id collate latin1_general_cs_as

                if( @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id = 'not' )
                begin        
                    insert into [muonline].[dbo].[memb_stat] (memb___id,connectstat,servername,ip,connecttm)
                    values(@memb___id,  @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat, @[i][b][url="http://forum.ragezone.com/members/1333468744.html"]servername[/url][/b][/i], @ip, getdate())
                end
                else        
                    update [muonline].[dbo].[memb_stat] set connectstat = @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat,
                                 servername = @[i][b][url="http://forum.ragezone.com/members/1333468744.html"]servername[/url][/b][/i],ip = @ip,
                                 connecttm = getdate()
                     where memb___id = @memb___id collate latin1_general_cs_as
            end
or just delete and re-create.

Also database>programmibility>stored procedures> right click and modify this table called dbo.wz_disconnect_memb
Code:
use [muonline]
go
/****** object:  Storedprocedure [dbo].[wz_disconnect_memb]    script date: 05/30/2016 08:28:44 ******/
set ansi_nulls off
go
set quoted_identifier off
go

            alter procedure [dbo].[wz_disconnect_memb]
            @memb___id varchar(10)
            as
            begin    
            set nocount on
                declare  @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id varchar(10)
                declare @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat tinyint
                set @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat = 0 
                set @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id = 'not'
                select @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id = s.memb___id collate latin1_general_cs_as from [muonline].[dbo].[memb_stat] s inner join [muonline].[dbo].[memb_info] i on s.memb___id = i.memb___id collate latin1_general_cs_as
                       where i.memb___id = @memb___id

                if( @[i][b][url="http://forum.ragezone.com/members/1333416677.html"]find[/url][/b][/i]_id <> 'not' )
                begin        
                    update [muonline].[dbo].[memb_stat] set connectstat = @[i][b][url="http://forum.ragezone.com/members/1333459481.html"]connects[/url][/b][/i]tat, disconnecttm = getdate(), onlinehours = onlinehours + datediff(hh,connecttm,getdate())
                     where memb___id = @memb___id
                end 
            end
after u do this changes close sql server and test.


woooorks perfeeeeeeeect
ty sir
 
Upvote 0
Status
Not open for further replies.
Back
Top