- 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,
Thanks to:
4FUNer
sqrobert
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