I don't remember how exactly the LoginStatus value is set to 1 when the char is logged in, using RebeccaBlack's script as I remember, but I assume it's usp_Read_Char_Info_R or something like that, not sure. By reading the procedure name we can understand that the character information is being read from the Chars table and sent to the ps_game.exe for using. Such a thing is needed only when a character is starting the game. Now, there's a procedure triggered for a specific char when the character logs off, which is usp_Save_Char_Info_E. In the usp_Save_Char_Info_E procedure you should add a little detail:
Code:
UPDATE Chars
SET [Level] = @Level, StatPoint = @StatPoint, SkillPoint = @SkillPoint,
[Str] = @Str, dex = @Dex, Rec = @Rec, [int] = @Int, Wis = @Wis, Luc = @Luc,
HP = @Hp, Mp = @Mp, Sp = @Sp,
Map = @Map, dir = @Dir, [exp] = @Exp, [money] = @Money,
PosX = @Posx, PosY = @PosY, PosZ = @PosZ, hg = @Hg, vg = @Vg, cg = @Cg, og = @Og, ig = @Ig,
KillLevel=@KillLevel, DeadLevel=@DeadLevel, LeaveDate=GETDATE(), [B][I][U]LoginStatus = 0[/U][/I][/B]
WHERE CharID = @CharID
The bold, italic and underlined text is what you need to add in order for the LoginStatus value to go back to 0 when the character logs off.