Restart BPs (Close -> Open main bp -> Open last bp inside main bp) on Reconnect
This script will close all open containers, open main backpack (backpack slot) and open the last container located inside main backpack if your character goes offline and online again.
This script will close all open containers, open main backpack (backpack slot) and open the last container located inside main backpack if your character goes offline and online again.
local characterOnline = connected()
if not characterOnline then
LOGGED_OFF = true
elseif characterOnline and LOGGED_OFF then
closewindows()
wait(300, 500)
local back_item = back()
if back_item.id > 0 then
openitem(back_item.id, 'back')
wait(800, 1200)
resizewindows()
wait(100, 300)
local containers = getcontainers()
for i = #containers, 1, -1 do
local cont = containers[i]
if cont ~= nil and cont.open then
for __, item in ipairs(cont.items) do
if itemhasflags(item.id, 4) then
openitemslot(item.index, cont.index, true)
wait(800, 1200)
resizewindows()
break
end
end
break
end
end
end
LOGGED_OFF = false
end
