Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- y = 0
- print("Starting tree felling")
- function down()
- while x > 0 do
- turtle.down()
- x = x - 1
- end
- end
- function next()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.dig()
- end
- function treeup()
- while turtle.detect() or turtle.detectUp() do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- x = x + 1
- end
- end
- function treedown()
- y = 0 + x
- while y > 0 do
- turtle.dig()
- turtle.digDown()
- turtle.down()
- y = y - 1
- end
- turtle.dig()
- end
- turtle.dig()
- turtle.forward()
- treeup()
- next()
- treedown()
- print("Tree felling completed")
- print("Tree was "..x.." blocks tall")
Advertisement
Add Comment
Please, Sign In to add comment