s3ptum

mine exp10000

Aug 5th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. --Mining program by s3ptum
  2.  
  3. --initial features
  4. --to make 3x3 tunnel length based on user input
  5. --automatic refuel
  6. --ability to deal with gravel type blocks
  7. --place torches
  8.  
  9. function digIt()
  10. while turtle.detect() do
  11. turtle.dig()
  12. os.sleep(0.5)
  13. end
  14. turtle.forward()
  15. while turtle.detectDown() or turtle.detectUp() do
  16. turtle.digUp()
  17. turtle.digDown()
  18. end
  19. end
  20.  
  21. function placeTorch()
  22. turtle.down()
  23. turtle.back()
  24. turtle.select(16)
  25. turtle.placeUp()
  26. turtle.forward()turtle.up()
  27. end
  28.  
  29. local run = 0
  30. local j = 0
  31. local k = 0
  32. term.write("Branch length?")
  33. run = read()
  34.  
  35. for i = 1, run do
  36. k = i-1
  37. j = k % 10
  38. if j==1 then
  39. placeTorch()
  40. digIt()
  41. end
  42.  
  43. turtle.down()
  44. turtle.select(16)
  45. turtle.placeUp()
  46. turtle.turnRight()
  47. turtle.turnRight()
  48.  
  49. for i = 1, run do
  50. turtle.forward()
  51. end
  52.  
  53.  
  54.  
  55.  
Advertisement
Add Comment
Please, Sign In to add comment