Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cutTree()
- if turtle.detect() then
- local h = 0
- turtle.digDown()
- turtle.down()
- while turtle.detect() do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- h = h + 1
- end
- while h > 0 do
- turtle.digDown()
- turtle.down()
- h = h - 1
- end
- turtle.select(16)
- turtle.place()
- turtle.up()
- else
- turtle.digDown()
- turtle.down()
- if turtle.detect() then
- turtle.select(15)
- turtle.place()
- end
- turtle.digUp()
- turtle.up()
- end
- end
- while true do
- for n = 1,3 do
- cutTree()
- turtle.turnRight()
- for n =1,4 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- turtle.turnLeft()
- for n=1,12 do
- turtle.forward()
- end
- turtle.turnRight()
- sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement