Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dropIfFull()
- for i=2,16 do
- turtle.select(i)
- local itemDetail = turtle.getItemDetail()
- if itemDetail then
- turtle.dropUp()
- end
- end
- turtle.select(1)
- end
- function digIfNeeded()
- local success, data = turtle.inspect()
- if success then
- if data.state.age == 7 then
- turtle.dig()
- turtle.select(1)
- turtle.place()
- end
- turtle.turnRight()
- else
- turtle.select(1)
- local itemDetail = turtle.getItemDetail()
- if itemDetail then
- turtle.place()
- else
- error()
- end
- end
- end
- steps = 1
- while true do
- dropIfFull()
- digIfNeeded()
- steps = steps + 1
- if steps == 5 then
- os.sleep(30)
- steps = 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment