moving potions to supply bp
so i am having trouble this script i got keeps glitching out when buying manas/healths and wont bring them to supply bp this is the code could any1 care to either fix it or write me one that will work greatly appreciated
local items = {268, 266, 236, 239, 238, 237, 7643,}
-- mana/health id
local MainBP = MainBP
local PotionsBP = SuppBP
Module.New("Sort Supplies", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(items, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(PotionsBP))
break
end
end
end)