Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local saplingSlot = 1
- function forward()
- while not turtle.forward() do
- turtle.dig()
- turtle.attack()
- end
- end
- function back()
- while not turtle.back() do
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function plant()
- turtle.select(saplingSlot)
- forward()
- turtle.dig()
- turtle.place()
- back()
- turtle.place()
- turtle.turnRight()
- forward()
- turtle.turnLeft()
- forward()
- turtle.dig()
- turtle.place()
- back()
- turtle.place()
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- while turtle.compare() do
- sleep(5)
- end
- end
- function chop()
- turtle.dig()
- forward()
- local height= 0
- while turtle.digUp() do
- turtle.dig()
- turtle.up()
- height=height+1
- end
- turtle.turnRight()
- turtle.dig()
- forward()
- turtle.turnLeft()
- for i=height, 1,-1 do
- turtle.digDown()
- turtle.dig()
- turtle.down()
- end
- turtle.dig()
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- back()
- end
- function unload()
- for slot=1,16 do
- if slot ~= saplingSlot then
- turtle.select(slot)
- turtle.dropDown()
- end
- end
- end
- while true do
- plant()
- chop()
- unload()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement