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
- function moveAndRefuelIfNeeded()
- while not turtle.forward() do
- i = 1
- while not turtle.refuel() do
- turtle.select(i)
- i = i + 1
- end
- end
- end
- while round < max do
- for rot = 0, 3 do
- success, data = turtle.detectUp()
- if success then
- turtle.digUp()
- pickUp()
- end
- success, data = turtle.detectDown()
- if success then
- turtle.digDown()
- pickUp()
- end
- success, data = turtle.detect()
- if success then
- turtle.dig()
- pickUp()
- end
- for i = 0, round do
- moveAndRefuelIfNeeded()
- end
- turtle.turnLeft()
- end
- print("Round", round, "done")
- round = round + 1
- end
- print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement