--Reconnect
auto(2000)
--PS: If UseReconnect = true and UseConnect = true, the action will use reconnect()
local CheckStamina = true
local Stamina = 15 --hours
--If use reconnect()
local UseReconnect = true --only reconnect()
local ControlG = true --reconnect using ctrl+g
--If use connect()
local UseConnect = false --only connect()
local acc = '12345'
local pass = '12345'
local char = 'char'
------------------------------------------------------------------------------------
function CiscoAutoReconnect()
if sstime() <= 85800 and sstime() >= 600 then
if UseConnect then
connect(acc, pass, char)
waitping()
if not $connected then
reconnect(true)
waitping()
end
elseif (UseConnect and UseReconnect) or UseReconnect then
reconnect(ControlG)
waitping()
end
return true
end
return false
end
if not $connected then
if CheckStamina then
if $stamina >= Stamina*60 then
CiscoAutoReconnect()
end
elseif not CheckStamina then
CiscoAutoReconnect()
end
end
Persistent AutoOpenBP