AndreSoYeah

Untitled

Dec 9th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. height = 7
  2. bone = 2
  3. tree = 1
  4. wood = 4
  5. function plant()
  6. turtle.select(tree)
  7. turtle.place()
  8. end
  9. function destroy()
  10. turtle.select(wood)
  11. turtle.dig()
  12. turtle.forward()
  13. for i = 1,height do
  14. turtle.digUp()
  15. turtle.up()
  16. end
  17. for a = 1,height do
  18. turtle.down()
  19. end
  20. turtle.back()
  21. turtle.dropDown(64)
  22. end
  23. function one()
  24. turtle.up()
  25. detect = turtle.detect()
  26. turtle.down()
  27. if not detect then
  28. if not turtle.detect() then
  29. plant()
  30. turtle.select(bone)
  31. turtle.place()
  32. destroy()
  33. else
  34. turtle.select(bone)
  35. turtle.place()
  36. end
  37. turtle.down()
  38. end
  39. destroy()
  40. end
  41. while true do
  42. one()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment