• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Goblin Points Fix

Newbie Spellweaver
Joined
May 22, 2010
Messages
77
Reaction score
3
I do not know if there is another like mine problem with "goblin points", that they are not automatically adding, but here's what I came up with with MSSQL 2000.
1. Open MuOnline and fiend in Stored Procedurs -> WZ_DISCONNECT_MEMB
Double click and change all with this,

Code:
CREATE PROCEDURE WZ_DISCONNECT_MEMB

@uid varchar(20)
AS
Begin

BEGIN TRANSACTION

SET NOCOUNT ON
declare [USER=27501]OnLine[/USER]Hours real
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
SELECT  [USER=27501]OnLine[/USER]Hours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid

UPDATE MEMB_STAT
SET DisConnectTM = getdate(), ConnectStat =0, OnlineHours = OnlineHours+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid

UPDATE MEMB_INFO
SET GoblinCoin = GoblinCoin+ [USER=27501]OnLine[/USER]Hours*0.1) 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

Thanks to:

4FUNer
sqrobert
 
Newbie Spellweaver
Joined
May 22, 2010
Messages
77
Reaction score
3
FiXed The bug with OnlineHours.
Code:
USE [MuOnline]
GO
/****** Object:  StoredProcedure [dbo].[WZ_DISCONNECT_MEMB]    Script Date: 03/01/2014 19:34:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]

@uid varchar(20)
AS
Begin

BEGIN TRANSACTION

SET NOCOUNT ON
declare  [USER=27501]OnLine[/USER]Hours real
declare @GP real
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
SELECT   [USER=27501]OnLine[/USER]Hours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid
SELECT @GP=GoblinCoin FROM MEMB_INFO WHERE memb___id=@uid

UPDATE MEMB_STAT
SET DisConnectTM = getdate(), ConnectStat =0, OnlineHours = OnlineHours+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid

UPDATE MEMB_INFO
SET GoblinCoin =@GP  [USER=27501]OnLine[/USER]Hours*[COLOR="#FF0000"]12[/COLOR] WHERE memb___id = @uid

UPDATE MEMB_STAT
SET OnlineHours = 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

Edit 12 to change the multiplier. Now for 1 hour will give you 12 Gp
 
Experienced Elementalist
Joined
Sep 20, 2011
Messages
227
Reaction score
9
Incorrect syntax near ')'. error-.-



FiXed The bug with OnlineHours.
Code:
USE [MuOnline]
GO
/****** Object:  StoredProcedure [dbo].[WZ_DISCONNECT_MEMB]    Script Date: 03/01/2014 19:34:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]

@uid varchar(20)
AS
Begin

BEGIN TRANSACTION

SET NOCOUNT ON
declare  [USER=27501]OnLine[/USER]Hours real
declare @GP real
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
SELECT   [USER=27501]OnLine[/USER]Hours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid
SELECT @GP=GoblinCoin FROM MEMB_INFO WHERE memb___id=@uid

UPDATE MEMB_STAT
SET DisConnectTM = getdate(), ConnectStat =0, OnlineHours = OnlineHours+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid

UPDATE MEMB_INFO
SET GoblinCoin =@GP  [USER=27501]OnLine[/USER]Hours*[COLOR="#FF0000"]12[/COLOR] WHERE memb___id = @uid

UPDATE MEMB_STAT
SET OnlineHours = 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

Edit 12 to change the multiplier. Now for 1 hour will give you 12 Gp

pls help

Incorrect syntax near ')'. error-.- in query
 
Newbie Spellweaver
Joined
Jul 30, 2008
Messages
8
Reaction score
1
USE [MuOnline]
GO
/****** Object: StoredProcedure [dbo].[WZ_DISCONNECT_MEMB] Script Date: 03/01/2014 19:34:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[WZ_DISCONNECT_MEMB]

@uid varchar(20)
AS
Begin

BEGIN TRANSACTION

SET NOCOUNT ON
declare @OnLineHours real
declare @GP real
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
SELECT @OnLineHours =OnlineHours FROM MEMB_STAT WHERE memb___id = @uid
SELECT @GP=GoblinCoin FROM MEMB_INFO WHERE memb___id=@uid

UPDATE MEMB_STAT
SET DisConnectTM = getdate(), ConnectStat =0, OnlineHours = OnlineHours+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid

UPDATE MEMB_INFO
SET GoblinCoin =@GP + @OnLineHours * 12 WHERE memb___id = @uid

UPDATE MEMB_STAT
SET OnlineHours = 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

Fix syntax error :).
 
Back
Top