Możecie sobie to dodać np. w tools->in game script editor albo jako osobny skrypcik.
Samo chodzi, samo kopie, tylko kilof musi być w slocie na strzałe (tam gdzie trzymacie golden falcona).
local mineableIds = {4457, 4467, 4458, 4464, 4460, 4459, 4461, 4462}
local idx = 0
local pickId = 3308
local useDistance = 1
local moveDist = 8
local function getClosestPosition(positions)
local closestTile
local closestTileDistance = 99999
for _, position in ipairs(positions) do
local tileDist = getDistanceBetween(pos(), position)
if tileDist < closestTileDistance then
closestTile = position
closestTileDistance = tileDist
end
end
if closestTile then
return closestTile
end
end
macro(500, "Kopalnia", function()
local possibleMine = {}
local foundMine = 0
local tiles = g_map.getTiles(posz())
shuffled = {}
for i, v in ipairs(tiles) do
local pos = math.random(1, #shuffled+1)
table.insert(shuffled, pos, v)
end
local found = false
for i, tile in ipairs(shuffled) do
if tile:getTopUseThing() ~= nil then
local topID = tile:getTopUseThing():getId()
if mineableIds[idx + 1] == topID then
local distance = getDistanceBetween(pos(), tile:getPosition())
if (distance <= useDistance) then
idx = (idx + 1) % #mineableIds
return usewith(getAmmo(), tile:getTopUseThing())
elseif distance > useDistance and distance <= moveDist then
if findPath(pos(), tile:getPosition(), moveDist, {ignoreNonPathable=true, precision=1}) then
table.insert(possibleMine, tile:getPosition())
foundMine = foundMine + 1
end
end
end
end
end
if foundMine >= 1 then
return autoWalk(getClosestPosition(possibleMine), moveDist, {ignoreNonPathable=true, precision=1})
else
idx = (idx + 1) % #mineableIds
end
end)