Hello!

I am currently mana training a lot on my character (more than 200 backpacks of potions),
and I found this great script to mana pot my main character:

Code:
function pumpMana()
    local charToPump = Creature.New("Eternal Oblivion")
    local charToPumpPos = charToPump:Position()
    local manaId = 238
    local backpack = Container.GetByName("shopping bag")
    if (Self.DistanceFromPosition(charToPumpPos.x, charToPumpPos.y, charToPumpPos.z) <= 2) and (Self.Position().z == charToPumpPos.z) then
        for spots = 0, backpack:ItemCount() do
            local item = backpack:GetItemData(spots)
            if (item.id == manaId) then
                backpack:UseItemWithCreature(spots, charToPump:ID())
                break
            end
        end
    end
end
while true do
pumpMana()
wait(900,1100)
end
But how can I make it work with multiple backpacks?
I have now opened 15 backpacks of potions, but when first backpack is empty, it stop potting.´
And I must close it manually.

Is there a way to make it continue to next backpack of potions, without closing it manually?
I want to be able to be 100% afk when potting the other character.

Need to make some array with backpacks, but idk how - i suck at coding.
And i want it to finish the first bp in line, before going to the next