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.
OTClient Code

These are codes that I have posted on various forums/discord.

Load Backpacks on config load #1
openBackpacks = function()
    containers = getContainers()
    if #containers < 1 and containers[0] == nil then
        bpItem = getBack()
        if bpItem ~= nil then
            g_game.open(bpItem)
        end
    end

    schedule(500, function()
        local nextContainers = {}
        containers = getContainers()
            for i, container in pairs(g_game.getContainers()) do
            for i, item in ipairs(container:getItems()) do
                if item:isContainer() then
                    table.insert(nextContainers, item)
                end
            end
        if #nextContainers == 0 then return end
        local delay = 1
        for i = 1, #nextContainers do
            schedule(delay, function()
                g_game.open(nextContainers[i], nil)
            end)
            delay = delay + 250
        end
        end
    end)
end

-- this loads the function straighta way
openBackpacks()
-- this adds a button to your bot, so you can press it
UI.Button("Backpack Open", function()
    openBackpacks()
end)
#LUA
01/01/2021