Add this function in a persis. hotkey:
function buyItemsAndMove(bpToMove, itemName, Amount, CurrentAmount)
bpMain = $back.id
CurrentAmount = CurrentAmount or itemcount(itemName)
if not $tradeopen then
opentrade()
waitping()
end
Amount = Amount-CurrentAmount
while Amount > 0 do
buyitems(itemName, Amount)
waitping(2, 4)
moveitems(itemName, bpToMove, bpMain)
waitping()
end
end
Then change your action:
foreach supplyitem i 'a' do
buyItemsAndMove(mainbp, i.id, i.uptocount)
waitping()
end