Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 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. print("Selected 14...")
  40. turtle.dropDown()
  41. print("Turtle.dropDown")
  42. end
  43. function bonemeal()
  44. turtle.select(5)
  45. if turtle.getItemCount() < 20 then
  46. restant = turtle.getItemSpace()
  47. turtle.suckDown(restant)
  48. end
  49. end
  50. function refuel()
  51. restant = turtle.getItemSpace()
  52. turtle.select(1)
  53. if turtle.getItemCount() < 10 then
  54. turtle.turnRight()
  55. turtle.forward()
  56. turtle.turnLeft()
  57. turtle.suck(restant)
  58. turtle.turnRight()
  59. turtle.back()
  60. turtle.turnLeft()
  61. end
  62. end
  63. --main
  64. while true do
  65. Plantar()
  66. Dopar()
  67. Tallar()
  68. goDown()
  69. shell.run("busca")
  70. print("Depositing wood...")
  71. deposit()
  72. print("Deposited!")
  73. bonemeal()
  74. print("Bonemealed!")
  75. if turtle.getFuelLevel() < 100 then
  76. turtle.select(1)
  77. turtle.refuel()
  78. end
  79. for i=1,40 do
  80. shell.run("clear")
  81. print("Turtle waiting ".. i .." s")
  82. sleep(0.8)
  83. end
  84. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement