Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local height = 0
- function scan()
- for i=1,height do
- turtle.dig()
- turtle.up()
- if i==height then
- turtle.dig()
- end
- end
- for i=1,height do
- turtle.down()
- end
- end
- function rotate()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function store()
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- turtle.select(1)
- end
- end
- -------------
- while true do
- -------------
- print("How tall is your tree?")
- heightInput = read()
- height = heightInput-1
- scan()
- store()
- sleep(5)
- rotate()
- scan()
- sleep(5)
- rotate()
- scan()
- sleep(5)
- rotate()
- scan()
- sleep(5)
- rotate()
- end
Advertisement
Add Comment
Please, Sign In to add comment