Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local dist = args[1]
- turtle.select(16)
- if turtle.getItemCount(16) == 0 then
- error('Please place target block in slot 16')
- end
- function searchAround()
- turtle.select(16)
- if turtle.compareDown() then
- turtle.digDown()
- turtle.down()
- searchAround()
- turtle.up()
- elseif turtle.compareUp() then
- turtle.digUp()
- turtle.up()
- searchAround()
- turtle.down()
- end
- turtle.turnLeft()
- if turtle.compare() then
- turtle.dig()
- turtle.forward()
- searchAround()
- turtle.back()
- end
- turtle.turnRight()
- turtle.turnRight()
- if turtle.compare() then
- turtle.dig()
- turtle.forward()
- searchAround()
- turtle.back()
- end
- turtle.turnLeft()
- end
- for i = 1,dist do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- searchAround()
- turtle.up()
- searchAround()
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement