Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- saplingsRemaining = turtle.getItemCount(1)
- bonemealRemaining = turtle.getItemCount(2)
- while true do --The main loop of the script
- turtle.select(1)
- if not turtle.detect() then -- If nothing is infront of the turtle plant a tree
- turtle.place()
- saplingsRemaining = turtle.getItemCount(1)
- end
- sleep(0.75)
- if (turtle.compareTo(1)) then
- turtle.select(2)
- turtle.place()
- bonemealRemaining = turtle.getItemCount(2)
- end
- if(bonemealRemaining == 0) then
- turtle.select(2)
- turtle.turnRight()
- turtle.suck()
- turtle.turnLeft()
- bonemealRemaining = turtle.getItemCount(2)
- end
- if(saplingsRemaining == 0) then
- turtle.select(1)
- turtle.turnLeft()
- turtle.suck()
- turtle.turnRight()
- saplingsRemaining = turtle.getItemCount(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement