Advertisement
Risk_exe

Untitled

Apr 19th, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1.  
  2. function Down()
  3. if turtle.detectDown() then
  4. turtle.digDown();
  5. end
  6. turtle.down();
  7. end
  8.  
  9. function Up()
  10. while turtle.detectUp() do
  11. turtle.digUp();
  12. end
  13. turtle.up();
  14. end
  15.  
  16. function Forward()
  17. while turtle.detect() do
  18. turtle.dig();
  19. end
  20. turtle.forward();
  21. end
  22.  
  23.  
  24. function Excrete_netherrack()
  25. local holder = turtle.getSelectedSlot();
  26. for i=1,16,1 do
  27. local x = turtle.getItemDetail(i);
  28. if x == nil or x["name"] == "minecraft:ancient_debris" or x["name"] == "minecraft:gold_nugget" or x["name"] == "minecraft:quartz" then
  29. -- literally just do not do anything...
  30. else
  31. turtle.select(i);
  32. turtle.drop();
  33. end
  34. end
  35. turtle.select(holder);
  36. end
  37.  
  38. local exvac = true;
  39.  
  40. function Begin()
  41. turtle.select(1);
  42. turtle.refuel();
  43. turtle.turnLeft();
  44.  
  45. for x = 1, 16, 1 do
  46.  
  47. for i = 1, 16, 1 do
  48. Forward();
  49. end
  50.  
  51. if exvac then
  52. turtle.turnRight(); Forward(); turtle.turnRight();
  53. else
  54. turtle.turnLeft(); Forward(); turtle.turnLeft();
  55. end
  56. exvac = not exvac;
  57. Excrete_netherrack();
  58.  
  59. end
  60.  
  61. --[[ return to position ]]
  62. turtle.turnLeft();
  63. for i=1, 16, 1 do
  64. turtle.forward();
  65. end
  66. turtle.turnLeft(); turtle.turnLeft();
  67. Dump_to_big_cheese();
  68. Wait();
  69. end
  70.  
  71. function Dump_to_big_cheese()
  72. for i=1,16,1 do
  73. turtle.drop();
  74. end
  75. end
  76.  
  77.  
  78. function Wait()
  79. while true do
  80. local event = os.pullEvent("redstone");
  81. Up();
  82. Begin();
  83. end
  84. end
  85.  
  86. while true do
  87. local event = os.pullEvent("redstone");
  88. Begin();
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement