Advertisement
Risk_exe

Untitled

Apr 13th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 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. if turtle.detectUp() then
  11. turtle.digUp();
  12. end
  13. turtle.up();
  14. end
  15.  
  16. function Forward()
  17. if turtle.detect() then
  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 not x == nil and x.name == 'minecraft:netherrack' then
  29. turtle.select(i);
  30. turtle.drop();
  31. end
  32. end
  33. turtle.select(holder);
  34. end
  35.  
  36. local exvac = true;
  37.  
  38. function Begin()
  39. turtle.select(1);
  40. turtle.refuel();
  41. turtle.turnLeft();
  42.  
  43. for x = 1, 16, 1 do
  44.  
  45. for i = 1, 16, 1 do
  46. Forward();
  47. end
  48.  
  49. if exvac then
  50. turtle.turnRight(); Forward(); turtle.turnRight();
  51. else
  52. turtle.turnLeft(); Forward(); turtle.turnLeft();
  53. end
  54. exvac = not exvac;
  55.  
  56. end
  57.  
  58. --[[ return to position ]]
  59. turtle.turnLeft();
  60. excrete_netherrack();
  61. for i=1, 16, 1 do
  62. turtle.forward();
  63. end
  64. turtle.turnLeft(); turtle.turnLeft();
  65. Wait();
  66. end
  67.  
  68. function Wait()
  69. while true do
  70. local event = os.pullEvent("redstone");
  71. Up();
  72. Begin();
  73. end
  74. end
  75.  
  76. while true do
  77. local event = os.pullEvent("redstone");
  78. Begin();
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement