09-20-2021, 08:09 PM
Logout from time to time
local LOGOUT_TIME = { Min = 600, Max = 835 } -- In seconds. How long should stay online? After that amount of time, the character will be logged out.
if connected() then
if NEXT_LOGOUT == nil then
NEXT_LOGOUT = runningtime() + random(LOGOUT_TIME.Min, LOGOUT_TIME.Max)
end
if runningtime() >= NEXT_LOGOUT then
while connected() do
wait(1000, 2000)
if not battlesigned() then
logout()
end
end
NEXT_LOGOUT = nil
end
end