I corrected this script and added the missing variables.
TGLOBAL_GSP -> Functions -> TLogout.
PHP Code:
/* LOGOUT PROCESS
======================================================== PARAMETER ======================================================== @dwUserID INT
======================================================== RETURN VALUE ======================================================== 0 : SUCCESS 1 : NO USER
======================================================== PROCESS ======================================================== 1. Check TCURRENTUSER table 2. Delete user from TCURRENTUSER 3. Update log data
*/
ALTER PROCEDURE [dbo].[TLogout] @dwUserID INT, @dwCharID INT, @bLevel TINYINT, @dwExp INT, @bSlot TINYINT, @szNAME VARCHAR, @bClass TINYINT, @bRace TINYINT, @bCountry TINYINT, @bSex TINYINT, @bHair TINYINT, @bFace TINYINT AS DECLARE @dwCurCharID INT DECLARE @dwKEY INT
BEGIN TRAN LOGOUT SELECT TOP 1 @dwKEY = dwKEY, @dwCurCharID = dwCharID, @bGroupID = bGroupID, @bChannel = bChannel, @dLoginDate = dLoginDate FROM TCURRENTUSER WHERE dwUserID = @dwUserID IF (@@ROWCOUNT = 0) BEGIN /* Not found connected user */ COMMIT TRAN LOGOUT RETURN 1 END ELSE BEGIN UPDATE TLOG SET dwCharID = @dwCurCharID, bGroupID = @bGroupID, bChannel = @bChannel, timeLOGOUT = GETDATE() WHERE dwKEY = @dwKEY END
/* @dwCurCharID e il dwCharID */ SELECT * FROM TALLCHARTABLE WHERE dwCharID = @dwCurCharID
======================================================== RETURN VALUE ======================================================== 0: SUCCESS 1: NO USER
======================================================== PROCESS ======================================================== 1. Check TCURRENTUSER table 2. Delete user from TCURRENTUSER 3. Update log data
BEGIN TRAN LOGOUT SELECT TOP 1 @dwKEY = dwKEY, @dwCurCharID = dwCharID, @bGroupID = bGroupID, @bChannel = bChannel, @dLoginDate = dLoginDate FROM TCURRENTUSER WHERE dwUserID = @dwUserID IF (@@ROWCOUNT = 0) BEGIN /* Not found connected user */ COMMIT TRAN LOGOUT RETURN 1 END ELSE BEGIN UPDATE TLOG SET dwCharID = @dwCurCharID, bGroupID = @bGroupID, bChannel = @bChannel, timeLOGOUT = GETDATE() WHERE dwKEY = @dwKEY END
/* @dwCurCharID e il dwCharID */ SELECT * FROM TALLCHARTABLE WHERE dwCharID = @dwCurCharID
IF(@@ROWCOUNT = 1) BEGIN UPDATE TALLCHARTABLE SET bLevel = @bLevel, dwExp=@dwExp, dLoginDate=@dLoginDate, dLogoutDate=GETDATE(), bSlot =@bSlot, szNAME =@szNAME, bClass =@bClass, bRace=@bRace, bCountry =@bCountry, bSex =@bSex, bHair =@bHair, bFace =@bFace, dwPlayTime=dwPlayTime + DATEDIFF(second, @dLoginDate, getdate()) WHERE dwCharID=@dwCharID AND bWorldID=@bGroupID
DELETE FROM TCURRENTUSER WHERE dwUserID = @dwUserID END
Make a character, enter in game and change name or change color hair, ok now do logout, next.. see the tallchartable and tchartable, you will see that tallchartable not refresh all information becouse dont save all thinks of the tchartable and that can make some problems.
vb.net sql Function 01/26/2013 - .NET Languages - 2 Replies hallo ich würde gerne mit vb.net auf eine sql function zugreifen
auf tables is ja ned schwer aber wie mach ich das mit functions
mfg
Help with function 01/22/2013 - Metin2 Private Server - 1 Replies What function i can use to teleport a members of a party? I need to teleport the party members to the dragon room:
Coords.
Index - X - Y
73 1774 12204
Thanks ;)
function 07/23/2012 - Rappelz Private Server - 4 Replies Hi pepole Trying to make Lua Code
But i cant find The Function to Open Store :D anyone can help l
Function Box 09/27/2011 - Combat Arms - 5 Replies Hey
undzwar hab ich eine frage
von den DailyJob kriegt man ja auch eine Function box
und wollte fragen ob man da nur wsachen für 1 day oder mehrere tage bekommen kann
bedanke mcih schonmal für eure antworten :)
[VIP-function] ToxicSYS [VIP-function] 08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies heeeey E-pvpers :pimp:
this is a new hack by TSYS
Status : UNDETECTED
Functions (VIDEO) :
YouTube - WarRock - Bikini event VIP hack