if (PotionSort == true) then
local moveItems = {236, 237, 238, 239, 266, 268, 283, 284, 285, 7439, 7440, 7443, 7642, 7643, 7644, 7876, 3147, 3148, 3149, 3152, 3153, 3155, 3156, 3158, 3160, 3161, 3164, 3165, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3182, 3188, 3189, 3190, 3191, 3192, 3195, 3197, 3198, 3200, 3202, 3203} -- works with item names or ids.
Module.New('PotionSorter', function(module)
local MainBP = Container.GetFirst()
for _, i in pairs(moveItems) do
if ( Self.ItemCount(i, MainBP, false) > 0 ) then
for spot = 0, MainBP:ItemCount() do
local item = MainBP:GetItemData(spot)
if ( item.id == Item.GetID(i) or item.id == i ) then
module

elay(300, 500)
MainBP:MoveItemToContainer(spot, Container.GetByName(PotBP):Index(), 0)
module

elay(600, 800)
break
end
end
end
module

elay(300, 500)
end
module

elay(600, 900)
end)
end