Advertisement
RDS_YES

turtle hollower

Nov 7th, 2021 (edited)
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. --fuel chest in slot 14, chest to put items away in slot 15
  2. turtle.digUp()
  3. turtle.digDown()
  4. local Far, THICCnes = ...
  5. Far = tonumber(Far)
  6. THICCnes = tonumber(THICCnes)
  7. if not Far or not THICCnes then
  8. error("User did not give numbers as arguments to the program I am angy >:(")
  9. end
  10. local blocks = 0
  11. local turns = 0
  12. local ends = 0
  13. local endblock = 0
  14. local function Drops()
  15. for i = 1,14,1 do
  16. turtle.select(i)
  17. turtle.dropUp()
  18. end
  19. end
  20. local function Storage()
  21. turtle.select(16)
  22. turtle.placeUp()
  23. Drops()
  24. turtle.select(16)
  25. turtle.digUp()
  26. end
  27. local function Fuel()
  28. turtle.select(15)
  29. turtle.placeUp()
  30. turtle.select(1)
  31. turtle.suckUp(64)
  32. turtle.refuel()
  33. turtle.dropUp()
  34. turtle.select(15)
  35. turtle.digUp()
  36. turtle.select(1)
  37. end
  38. local function TurnLeft()
  39. turtle.turnLeft()
  40. turtle.dig()
  41. turtle.forward()
  42. turtle.digUp()
  43. turtle.digDown()
  44. turtle.turnLeft()
  45. turns = 0
  46. ends = ends + 1
  47. end
  48. local function TurnRight()
  49. turtle.turnRight()
  50. turtle.dig()
  51. turtle.forward()
  52. turtle.digUp()
  53. turtle.digDown()
  54. turtle.turnRight()
  55. Storage()
  56. Fuel()
  57. turns = 1
  58. ends = ends + 1
  59. end
  60. local function Mines()
  61. turtle.dig()
  62. turtle.forward()
  63. turtle.digUp()
  64. turtle.digDown()
  65. blocks = blocks + 1
  66. end
  67. repeat
  68. Mines()
  69. if blocks == Far then
  70. if turns == 0 then
  71. TurnRight()
  72. elseif turns == 1 then
  73. TurnLeft()
  74. end
  75. blocks = 0
  76. end
  77. until ends == THICCnes
  78. Storage()
  79. if (THICCnes % 2 == 0) then
  80. turtle.turnLeft()
  81. repeat
  82. turtle.forward()
  83. endblock = endblock + 1
  84. until endblock == THICCnes
  85. else
  86. turtle.turnRight()
  87. repeat
  88. turtle.forward()
  89. endblock = endblock + 1
  90. until endblock == THICCnes
  91. endblock = 0
  92. turtle.turnLeft()
  93. repeat
  94. turtle.forward()
  95. endblock = endblock + 1
  96. until endblock == Far
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement