Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function step()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function nextSel(Ind)
- local stop = 0
- while turtle.getItemCount(Ind) == 0 and stop == 0 dofile(
- Ind = Ind + 1
- if Ind > 16 then
- Ind = 1
- stop = 1
- end
- end
- turtle.select(Ind)
- end
- local N = (...)
- for i = 1, N do
- step()
- if i % 5 == 0 then
- print("Percorsi " .. i .. " Blocchi.")
- end
- if i % 20 == 0 then
- nextSel(1)
- turtle.placeDown()
- end
- if turtle.getFuelLevel() == 0 then
- if turtle.refuel(1) then
- term.write("Refueled.")
- end
- end
- end
- for i = 1, N do
- turtle.back()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement