09-17-2021, 04:35 PM
Reopen backpacks
This script will close all your bps and then open main bp and all containers (parcels, bags, bps, etc.) inside the main bp.
If you use it on Persistents, it will just keep closing and opening everything.
keywords: open bps, reopen bps, container, reopen bps, close all bps, close all containers
This script will close all your bps and then open main bp and all containers (parcels, bags, bps, etc.) inside the main bp.
If you use it on Persistents, it will just keep closing and opening everything.
if windowcount() == 0 then
local bp_item = back()
if bp_item.id > 0 then
local WIN_COUNT = windowcount()
while WIN_COUNT == 0 and bp_item.id > 0 do
openitem(bp_item.id, 'back')
wait(1000, 1500)
bp_item = back()
WIN_COUNT = windowcount()
end
if WIN_COUNT > 0 then
resizewindows(1)
wait(200, 500)
local containers = getcontainers()
for _, cont in ipairs(containers) do
for __, item in ipairs(cont.items) do
if itemhasflags(item.id, 4) then
for i = 1, 3 do
if windowcount() == WIN_COUNT then
openitemslot(item.index, cont.index, true)
wait(500, 1000)
resizewindows(1)
wait(200, 500)
else
break
end
end
WIN_COUNT = windowcount()
end
end
end
end
end
end
keywords: open bps, reopen bps, container, reopen bps, close all bps, close all containers