Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- -- Check for a block and make sure not a sapling
- turtle.select(1)
- if turtle.detect() and not turtle.compare() then
- turtle.select(2)
- turtle.dig()
- turtle.forward()
- -- Chop the tree
- while turtle.digUp() do
- turtle.up()
- end
- -- Done chopping, return to the bottom
- while not turtle.detectDown() do
- turtle.down()
- end
- -- Move onto the first barrel, deposit wood
- turtle.back()
- for i = 2,16 do
- turtle.select(i)
- if (turtle.compare(1)) then
- turtle.drop()
- else
- turtle.dropDown()
- end
- end
- -- Move onto the second barrel, deposit saplings
- turtle.back()
- for i = 2,16 do
- turtle.select(i)
- if (turtle.compare(1)) then
- turtle.dropDown()
- else
- turtle.forward()
- end
- -- Place a sapling
- turtle.select(1)
- turtle.place()
- end
- else
- sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment