Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- height = 5
- nap = 2
- hibernate = 60
- space = 1
- space = space + 1
- function harvest()
- print("Harvesting")
- turtle.placeDown()
- sleep(nap)
- turtle.digDown()
- end
- function climb()
- for i = 1,height do
- turtle.up()
- if i % space == 0 then
- harvest()
- end
- end
- end
- function goHome()
- print("Going home")
- for i = 1,height do
- turtle.down()
- end
- end
- function unload()
- turtle.turnRight()
- for i = 1,15 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(16)
- turtle.turnLeft()
- end
- --------Main--------
- turtle.select(16)
- while true do
- climb()
- goHome()
- unload()
- print("Sleeping")
- sleep(hibernate)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement