Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. function Plantar()
  2. turtle.select(9)
  3. turtle.place()
  4. print("Tree Planted!")
  5. end
  6.  
  7. function Dopar()
  8. local success, data = turtle.inspect()
  9. compare = data.name
  10. while compare == "minecraft:sapling" do
  11. turtle.select(5)
  12. turtle.place()
  13. local success, data = turtle.inspect()
  14. compare = data.name
  15. end
  16. print("Doppy Tree!")
  17. end
  18. function Tallar()
  19. turtle.select(13)
  20. local success, data = turtle.inspect()
  21. turtle.dig()
  22. turtle.forward()
  23. comparatronc = data.name
  24. while comparatronc == "minecraft:log" do
  25. turtle.digUp()
  26. turtle.up()
  27. local success, data = turtle.inspectUp()
  28. comparatronc = data.name
  29. end
  30. end
  31. function goDown()
  32. while turtle.inspectDown() == false do
  33. turtle.down()
  34. end
  35. turtle.back()
  36. end
  37. function deposit()
  38. turlte.select(14)
  39. turtle.dropDown()
  40. end
  41. function bonemeal()
  42. turtle.select(5)
  43. if turtle.getItemCount() < 20 then
  44. restant = turtle.getItemSpace()
  45. turtle.suckDown(restant)
  46. end
  47. end
  48. function refuel()
  49. restant = turtle.getItemSpace()
  50. turtle.select(1)
  51. if turtle.getItemCount() < 10 then
  52. turtle.turnRight()
  53. turtle.forward()
  54. turtle.turnLeft()
  55. turtle.suck(restant)
  56. turtle.turnRight()
  57. turtle.back()
  58. turtle.turnLeft()
  59. end
  60. end
  61. --main
  62. while true do
  63. Plantar()
  64. Dopar()
  65. Tallar()
  66. goDown()
  67. shell.run("busca")
  68. print("Depositing wood...")
  69. deposit()
  70. print("Deposited!")
  71. bonemeal()
  72. print("Bonemealed!")
  73. if turtle.getFuelLevel() < 100 then
  74. turtle.select(1)
  75. turtle.refuel()
  76. end
  77. for i=1,40 do
  78. shell.run("clear")
  79. print("Turtle waiting ".. i .." s")
  80. sleep(0.8)
  81. end
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement