Advertisement
Digitamz

Drill 3

Jul 5th, 2020
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local arg = { ... }
  2. local c = arg[1]
  3. local y = 0
  4. local x = 1
  5. for i=1,c do
  6. for i=1,x do
  7. turtle.forward()
  8. end
  9. local continue = true
  10. while continue do
  11. for i=1,4 do
  12. turtle.dig()
  13. turtle.turnRight()
  14. end
  15. turtle.digDown()
  16. local moved = turtle.down()
  17. if moved then
  18. y = y + 1
  19. else
  20. continue = false
  21. end
  22. end
  23.  
  24.  
  25.  
  26. for i=1,y do
  27. turtle.up()
  28. end
  29. y = 0
  30. turtle.turnRight()
  31. turtle.turnRight()
  32. for i=1,x do
  33. turtle.forward()
  34. end
  35. x = x + 3
  36.  
  37. for i=1,16 do
  38. turtle.select(i)
  39. if turtle.getFuelLevel() < 10000 then
  40. turtle.refuel()
  41. end
  42. data = turtle.getItemDetail()
  43. if data then
  44. if (data.name == "minecraft:cobblestone" or data.name == "minecraft:dirt" or data.name == "minecraft:stone") then
  45. turtle.turnLeft()
  46. turtle.turnLeft()
  47. turtle.drop()
  48. turtle.turnRight()
  49. turtle.turnRight()
  50. end
  51. end
  52. turtle.drop()
  53. end
  54. turtle.turnLeft()
  55. turtle.turnLeft()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement