WZ_DISCONNECT MEMB procedure

Results 1 to 8 of 8
  1. #1
    Member bustini is offline
    MemberRank
    May 2014 Join Date
    70Posts

    WZ_DISCONNECT MEMB procedure

    Hello friends, I have a problem with the procedure w_disconnect memb because I do not have the online players hours , someone could help me fix it please?
    I searched many places but I have not found a solution.


  2. #2
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: WZ_DISCONNECT MEMB procedure

    I have it somewhere in my backups, I will try to find it.

  3. #3
    Member bustini is offline
    MemberRank
    May 2014 Join Date
    70Posts

    Re: WZ_DISCONNECT MEMB procedure

    Quote Originally Posted by jacubb View Post
    I have it somewhere in my backups, I will try to find it.
    Thanks friend, will wait for your answer : D

  4. #4
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: WZ_DISCONNECT MEMB procedure

    In MEMB_STAT table add column:
    OnlineTime INT NOT NULL DEFAULT(0)

    And this is my disconnect procedure:
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_DISCONNECT_MEMB]    Script Date: 6.2.2015 20:33:44 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[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 , OnlineTime = OnlineTime+(DATEDIFF(mi,ConnectTM,getdate())) WHERE memb___id = @uid
    
    UPDATE Character SET cLevel = 400 , MapNumber = 40, MapPosX = 225, MapPosY = 25, MapDir = 1, PkTime= 0, Money = 2000000000 Where CtlCode = 32 And AccountID = @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
    After logout it will move GM character to GM map and update level to 400 and money to 2 mld.

  5. #5
    Member bustini is offline
    MemberRank
    May 2014 Join Date
    70Posts

    Re: WZ_DISCONNECT MEMB procedure

    thank you very much friend, I will create the procedure with your information. This procedure measures the time the hours or minutes ?

  6. #6
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: WZ_DISCONNECT MEMB procedure

    Quote Originally Posted by bustini View Post
    thank you very much friend, I will create the procedure with your information. This procedure measures the time the hours or minutes ?
    In minutes.

  7. #7
    Member bustini is offline
    MemberRank
    May 2014 Join Date
    70Posts

    Re: WZ_DISCONNECT MEMB procedure

    thanks a lot my friend ;)

  8. #8
    ImperiaMuCMS CEO jacubb is offline
    MemberRank
    Jul 2011 Join Date
    SlovakiaLocation
    1,507Posts

    Re: WZ_DISCONNECT MEMB procedure

    Quote Originally Posted by bustini View Post
    thanks a lot my friend ;)
    Let me know if it's working, I am not sure if I didn't forgot on something.



Advertisement