Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
95
Open next container #54
This will open the next backpack if only contains 1 item and iscontainer
548b | 15 lines.
nextBackpack = macro(100,"Open next container",function()
    local containerId = 2854
    for i, container in pairs(getContainers()) do
        containerItem = container:getContainerItem()
        if containerItem and containerItem:getId() == containerId then
            if container:getItemsCount() == 1 then
                item = container:getItem(0)
                if item and item:isContainer() then
                    g_game.open(item, container)
                    delay(200)
                end
            end
        end
    end
end)

12 Sep 2021