Run this in a separate tab and it'll keep an eye on system variables for you. It will stop when your char gets logged out for any reason and can help you in troubleshooting your script by showing the time and system status when the char was logged.
Lemme know if there are any issues.
gosub showEUOMenu1
repeat
menu set t1 #time
menu set c1 X = #charposx Y = #charposy Z = #charposz
menu set r1 #result
menu set c2 #contname - #contsize - #contid - #contkind - #conttype
menu set l1 #lobjectid - #lobjecttype - #ltargetid
menu set f1 #findid - #findtype - #findkind - #findstack
menu set s1 #sysmsg
menu set p1 #property
until clilogged = 0
halt
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title Cervs' Scrypt Status
menu Window Color Lime
menu Window Size 387 337
menu Font Transparent #true
menu Font Align Right
menu Font Name Comic Sans MS
menu Font Size 12
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Font BGColor Lime
menu Text EUOLabel1 40 5 Time
menu Text EUOLabel2 135 5 CharPosX, Y, Z
menu Text EUOLabel3 10 60 ContName, ContSize, ContID, ContKind, ContType
menu Text EUOLabel4 55 115 LObjectID, LObjectType, LTargetID
menu Text EUOLabel5 50 170 FindID, FindType, FindKind, FindStack
menu Text EUOLabel6 305 5 Result
menu Text EUOLabel7 165 225 SysMsg
menu Text EUOLabel8 160 280 Property
menu Font Name MS Sans Serif
menu Font Size 8
menu Font BGColor Window
menu Edit t1 7 30 101 Time
menu Edit c1 117 30 146 Position
menu Edit c2 8 85 371 Container
menu Edit l1 8 140 371 Last
menu Edit f1 8 195 371 Find
menu Edit r1 278 30 101 Result
menu Edit s1 8 250 371 System , #spc , Message
menu Edit p1 8 305 371 Property
menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------