Instead of putting files for you to download, I am going to show you the parts of the files you need to add to your procedures.
Edits to make to the
PS_userdata.dbo.usp_Try_GameLogin_Taiwan:
Under DECLARE you must declare the variable @LeaveDate
Like so:
Code:
@LeaveDate datetime
You need to add this instead of the current select statement for the UserUID:
Code:
SELECT @UserUID=[UserUID], @Status=[Status], @Leave=[Leave], @LeaveDate=LeaveDate
FROM Users_Master
WHERE UserID = @UserID AND Pw = @InPassword
-- NotExist User OR Leave User
IF( @UserUID = 0)
BEGIN
SET @Status = -3
END
ELSE IF (@Leave = 1) --This blocks a logged in account from being kicked
BEGIN
SET @Status = -5
END
ELSE IF (DATEDIFF(SECOND, @LeaveDate, GETDATE()) < 6)--This is the time delay
BEGIN
SET @Status = -7
END
*Remove the password check for the OMGWeb Database.
Under --Log Insert, add the UPDATE statement inside the IF statement, below is an example:
Code:
IF( @Status = 0 OR @Status = 16 OR @Status = 32 OR @Status = 48 OR @Status = 64 OR @Status = 80 )
BEGIN
UPDATE Users_Master SET Leave = 1, JoinDate = GETDATE() WHERE UserUID = @UserUID
EXEC usp_Insert_LoginLog_E @SessionID=@SessionID, @UserUID=@UserUID, @UserIP=@UserIP, @LogType=0, @LogTime=@LoginTime, @LoginType=@LoginType
END
Edits to make to
PS_userdata.dbo.usp_Try_GameLogout_R
Add this after the IF statements:
Code:
UPDATE Users_Master SET Leave = 1, JoinDate = GETDATE() WHERE UserUID = @UserUID
Edits to make to
PS_GameLog.dbo.usp_Insert_Action_Log_E
You must declare the variable @CharLeave below the AS like so:
Code:
DECLARE @CharLeave int
Add this:
Then below that:
Code:
IF @ActionType = '116'--Trade Item-remove item from originator
BEGIN
WAITFOR DELAY '00:00:05'--Time delay to give the duper time to log out fully
SELECT @CharLeave=Leave
FROM PS_userdata.dbo.Users_Master
WHERE UserUID=@UserUID
IF @CharLeave=0
BEGIN
EXEC PS_GameData.dbo.usp_Save_Char_Item_Del_E @CharID=@CharID, @IDList=@Value1
END
END
IF @ActionType = '164'--Trade Gold-remove gold from originator
BEGIN
WAITFOR DELAY '00:00:05'--Time delay to give the duper time to log out fully
SELECT @CharLeave=Leave
FROM PS_userdata.dbo.Users_Master
WHERE UserUID=@UserUID
IF @CharLeave=0
BEGIN
UPDATE PS_GameData.dbo.Chars
SET [Money]=@Value2
WHERE PS_GameData.dbo.Chars.CharID=@CharID
END
END
You are now done.
Credits to EarthCrush *[GM]Father* for this.