Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getMeal()
- turtle.turnRight()
- turtle.select(3)
- turtle.suck()
- turtle.turnLeft()
- end
- function deposit()
- sap = turtle.getItemCount(1) - 2
- wood = turtle.getItemCount(2) - 1
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(2)
- turtle.drop(sap)
- turtle.select(1)
- turtle.drop(wood)
- turtle.turnRight()
- turtle.turnRight()
- end
- function breakTree()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- end
- while turtle.getFuelLevel() > 100 do
- if turtle.getItemCount(3) == 1 then
- break
- end
- turtle.select(1)
- turtle.place()
- turtle.select(3)
- turtle.place()
- turtle.dig()
- turtle.forward()
- breakTree()
- turtle.back()
- os.sleep(120)
- turtle.suck()
- turtle.up()
- deposit()
- if turtle.getItemCount(3) == 1 then
- getMeal()
- end
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement