<div class="alert alert-warning"><b>This script has been discontinued!</b>
It may be malfunctioning and will not be updated. Please try @Leonardo's solution: http://goo.gl/nbs4TA</div>
Relogger & Backpack Reopener
Description
If you character disconnects, will log back on, pause cavebot/looting/targeting, reopen your backpacks and enable cavebot/looting/targeting again.
Configuration
Edit the backpacks variable on the init block to specify the backpacks you want to be opened and in what order.
Code
-- This script has been discontinued, may be malfunctioning and will not be
-- updated. Please try [MENTION=31]Leonardo[/MENTION]'s solution: [url]http://goo.gl/nbs4TA[/url]
init start
-- local SCRIPT_VERSION = '1.1.0'
-- The bot will open these backpacks, in this order. The first item is the
-- name of the backpack, the second the location and the third is whether
-- it should be open as new, which defaults to true.
local backpacks = {
{'Backpack of Holding', 'back'},
{'Dragon Backpack' , '0' },
{'Expedition Backpack', '1' , false},
{'Brocade Backpack' , '1' },
{'Brown Bag' , '0' },
}
local serverSaveWait = {15, 20} -- Wait time on server save, in minutes
local nextTry = $timems
init end
auto(100)
if not $connected and $timems >= nextTry then
set('Cavebot/Enabled', 'no')
set('Targeting/Enabled', 'no')
set('Looting/Enabled', 'no')
reconnect()
while not $connected do
wait(90, 110)
end
waitping()
local bp, loc, new, count, parentCont
for _, v in ipairs(backpacks) do
bp, loc, new = table.unpack(v)
new = tern(new ~= nil, new, true)
count = #getopencontainers()
openitem(bp, loc, new)
if new then
while #getopencontainers() ~= count + 1 do
wait(90, 110)
end
else
waitping()
end
resizewindows(0)
end
set('Cavebot/Enabled', 'yes')
set('Targeting/Enabled', 'yes')
set('Looting/Enabled', 'yes')
end
foreach newmessage m do
if m.type == MSG_RED then
local min = m.content:match(REGEX_SERVER_SAVE)
if min then
nextTry = $timems + (tonumber(min) + math.random(table.unpack(serverSaveWait))) * 60000
break
end
end
end
This thread is not for requests, please use the appropriate thread for it.
12-14-2013, 11:05 PM
K4r4biN
You can add action to close client if character find temple's NPC after logging to make it safier ;p
12-15-2013, 03:54 AM
Raphael
Quote:
Originally Posted by K4r4biN
You can add action to close client if character find temple's NPC after logging to make it safier ;p
The bot automatically pauses on death.
12-15-2013, 08:07 AM
K4r4biN
Quote:
Originally Posted by Raphael
The bot automatically pauses on death.
I know, but I meant situation when you die on kick, so then bot will not pause cause it doesn't know the char dies.
12-15-2013, 12:42 PM
Raphael
Quote:
Originally Posted by K4r4biN
I know, but I meant situation when you die on kick, so then bot will not pause cause it doesn't know the char dies.
Oh, ye, that's true.
Will check it out later.
12-21-2013, 02:33 PM
joraanpe
About the relogger raph, have u used it by server save? I leave my chars and go sleep but when back i find all accounts on the main tibia window, or in the best of the cases stuck with the "connecting to the game server, please wait" window. Any ideas?
12-22-2013, 03:20 PM
jakub
ye would be good to add pause between (9:45CET - 10:20CET)
12-22-2013, 05:35 PM
Raphael
Quote:
Originally Posted by joraanpe
About the relogger raph, have u used it by server save? I leave my chars and go sleep but when back i find all accounts on the main tibia window, or in the best of the cases stuck with the "connecting to the game server, please wait" window. Any ideas?