@Smatek @Mexen
Somewhat buggy but it works. Only checks if you're attacking something though.
lua code:
local itemID = {21104} -- ItemID to be picked up
Module.New('lootFromGround', function(module)
if (Self.TargetID() <= 0) then
for y = -5, 5 do
for x = -7, 7 do
if table.contains(itemID, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
Cavebot.Stop()
Self.UseItemFromGround(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1000)
Cavebot.Start()
module:Delay(math.random(1000))
end
end
end
end
end)