Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local times = 0
- term.clear()
- term.setCursorPos(1, 1)
- term.write("Times to run: ")
- times = read()
- for i = 1, times do
- if turtle.detect() then
- turtle.dig()
- end
- if not turtle.detect() then
- turtle.forward()
- print("Moved Forward: "..i.. " Times")
- end
- if turtle.detectUp() then
- turtle.digUp()
- end
- if turtle.detectDown() then
- turtle.digDown()
- end
- if i == 10 then
- turtle.select(2)
- turtle.placeUp()
- turtle.select(1)
- end
- if i == 60 then
- turtle.select(3)
- turtle.drop(64)
- turtle.select(1)
- end
- end
- local f = turtle.getFuelLevel()
- if f < 10 then
- turtle.refuel()
- end
Advertisement
Add Comment
Please, Sign In to add comment