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.
2.1K
Open next container #54
This will open the next backpack if only contains 1 item and iscontainer. Second script will open the next backpack if full.
File: openbp_empty.lua | 548b | 15 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
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)
File: openbp_full.lua | 646b | 17 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
nextBackpackFull = macro(100,"Open next container Full",function()
    local containerId = 2867
    for _, container in pairs(getContainers()) do
        containerItem = container:getContainerItem()
        if containerItem and containerItem:getId() == containerId then
            if container:getCapacity() == #container:getItems() then
              for _, item in ipairs(container:getItems()) do
                if item:getId() == containerId then
                  g_game.open(item, container)
                  delay(200)
                  break
                end
              end
            end
        end
    end
end)

12 Sep 2021
Ads