hello, I need help with a relifer.
Bot should buy "X" (eg X = 700mana potion) but Bot buy only 100 mana potion. ;/
Code:-- resupply if not islocation(3) then gotolabel('to_mshop') else reachcreature('Asima') waitping() sellflasks() local itemsbuy = { {name = 'mana potion', count = items.manaMax, move = true}, {name = items.healthName, count = items.healthMax, move = false} } for i, item in ipairs(itemsbuy) do local tobuy = item.count - itemcount(item.name) while tobuy > 0 and $tradeopen and $cap > iteminfo(item.name).weight + math.random(10, 20) do buyitems(item.name, tobuy) waitping(1, 1.5) if item.move then while getcontainer(bp.supply).emptycount > 0 and itemcount(item.name, bp.main) > 0 do moveitems(item.name, bp.supply) waitping(1, 1.4) end end tobuy = tobuy - 100 end end end