Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- round = 1
- max = 5
- function pickUp()
- for i = 0, 5 do turtle.suck(64) end
- for i = 0, 5 do turtle.suckUp(64) end
- for i = 0, 5 do turtle.suckDown(64) end
- end
- while (round < max) do
- for rot = 0, 3 do
- -- First, up
- success, data = turtle.detectUp()
- if success then
- turtle.digUp()
- sleep(1)
- pickUp()
- end
- -- Next, down
- success, data = turtle.detectDown()
- if success then
- turtle.digDown()
- sleep(1)
- pickUp()
- end
- -- Last, forward
- success, data = turtle.detect()
- if success then
- turtle.dig()
- sleep(1)
- pickUp()
- end
- -- Move forward
- turtle.forward()
- end
- round = round + 1
- turtle.turnLeft()
- print("Round", round, "done")
- end
- print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement