Thanks @Cisco
Thanks @Cisco
funny im using a reco with windaddons and not using acc/password and its working perfect o.0
do u guy want i share it?
im using windaddons and @Smoky Reconnect and works amazing...
when character dies logout in temple etc.
only when tibiascreen freeze reconnect doesnt work. so u need reopeon client ^^
when i get home i share it with ur guys
Last edited by Elgu; 05-19-2015 at 12:06 PM.
@Elgu is right, here works perfectly
I use this way , here it works
PHP Code:
--[Smoky] Reconnect
init start
local ReopenBps = false
local IgnoreServerSave = false
-- [[ ONLY EDIT SPECIAL CHECKS IF YOU KNOW WHAT YOU ARE DOING ]]--
-- special checks are the checks itll do after you login
-- for example: if you are skulled, inside temple, etc ...
local SpecialChecks = {
{
function()
return isontemple()
end,
function()
return closebot()
end
},
{
function()
return ($self.skull == SKULL_RED or $self.skull == SKULL_BLACK) and $pzone
end,
function()
return closebot()
end
},
{
function()
return $stamina <= 14*60 and $pzone
end,
function()
return closebot()
end
},
}
-- DO NOT EDIT BELOW --
local reconState = 1
if $curscript.type == 'cavebot' then
reconState = -1
printerror('Reconnect should be placed at Scripter/Persistents and not Cavebot/Scripter.\nChange this setting to run it properly.')
end
local openFunc = function()
local lifeTime = $timems
local reopenLogin = get('Looting/OpenBPsAtLogin')
set('Looting/OpenBPsAtLogin', 'no')
reopenwindows('small')
setsetting('Looting/OpenNextBP', 'yes')
while $openingbps do
wait(100)
if $timems - lifeTime >= 10000 and not $pzone then
set('Looting/OpenBPsAtLogin', reopenLogin)
setsetting('Looting/OpenNextBP', 'yes')
return false
end
end
set('Looting/OpenBPsAtLogin', reopenLogin)
setsetting('Looting/OpenNextBP', 'yes')
return true
end
local randTimeSS = math.random(100, 700)
init end
auto(1000)
local rec = getuseroption("Reconnect")
if (rec) then
if IgnoreSS or (sstime() >= 600 + randTimeSS and sstime() <= 85800 - randTimeSS) and reconState == 1 and not $connected then
set('Targeting/Enabled', 'no')
set('Cavebot/Enabled', 'no')
set('Looting/Enabled', 'no')
reconnect()
randTimeSS = math.random(100, 700)
if $connected then
pausewalking(10000)
else
return
end
for _, callback in ipairs(SpecialChecks) do
-- here we check for the given special checks like
-- is on temple, low stamina, skulled, and logout
-- if something happened
if callback[1]() then
reconState = 0
return callback[2] ~= nil and callback[2]()
end
end
if ReopenBps then
local clientMin = $minimized
if clientMin and not $addons.enabled then
-- if windaddons is enabled then we don't need to restore the window
-- but if it's not, the bp opener will get stuck and alert you anytime
-- se we restore the window to make sure it'll open you won't die
restoreclient() waitping()
end
local reopenSuccess = openFunc()
if not reopenSuccess then
-- this will only happen if you took more than 10 seconds to open bps
-- if this happened probably you have another script trying to open it
-- or any other thing blocking it from opening, if so we should start
-- cavebot and targeting again to make sure you won't die, because after
-- 10 seconds the monsters will surround you and start attacking
print('It took too long to open the backpacks, they could be already opened but for safety reasons you were alerted.')
pausewalking(0)
set('Targeting/Enabled', 'yes')
set('Cavebot/Enabled', 'yes')
set('Looting/Enabled', 'yes')
setsetting('Looting/OpenNextBP', 'yes')
-- alert in this case
for _ = 1, 10 do
beep()
wait(1000)
end
end
if clientMin and not $minimized then
minimizeclient()
end
end
if not ($targeting and $cavebot) then
set('Targeting/Enabled', 'yes')
set('Cavebot/Enabled', 'yes')
set('Looting/Enabled', 'yes')
setsetting('Looting/OpenNextBP', 'yes')
pausewalking(0)
end
end
end