ObsidianDrache

Untitled

Sep 6th, 2021 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. local btogo = 2000 --legth of the tunnel.
  2. local b = 0 --blocks walked.
  3. local tb = 0 -- blocks until next torch.
  4. local t = turtle.getItemCount(16)
  5. local i = 0
  6. local is = 15
  7.  
  8. --loop to line 39.
  9. repeat
  10.  
  11. --fuel.
  12. if btogo * 4 > turtle.getFuelLevel() then print("Need more fuel!")
  13. end
  14.  
  15. --digging.
  16. turtle.dig()
  17. turtle.forward()
  18. turtle.digUp()
  19. turtle.digDown()
  20. b = b + 1
  21.  
  22. -- Torch placement.
  23. tb = tb + 1
  24.  
  25. if tb == 9 then
  26. turtle.back()
  27. end
  28. if tb == 9 then
  29. turtle.select(16)
  30. end
  31. if tb == 9 then
  32. turtle.placeUp()
  33. end
  34. if tb == 9 then
  35. turtle.select(1)
  36. end
  37. if tb == 9 then
  38. tb = 0
  39. end
  40.  
  41. --Inventory Management.
  42. i = i + 1
  43. if i == 100 then
  44. turtle.select(15)
  45. end
  46. if i == 100 then
  47. turtle.placeDown()
  48. end
  49. if i == 100 then
  50. turtle.select(1)
  51. end
  52.  
  53. if i == 100 then
  54. repeat
  55.  
  56. if i == 100 then
  57. is = is - 1
  58. end
  59.  
  60. if i == 100 then
  61. turtle.select(is)
  62. end
  63. if i == 100 then
  64. turtle.dropDown()
  65. end
  66.  
  67. until is == 1
  68. end
  69.  
  70. if i == 100 then
  71. is = 15
  72. end
  73.  
  74. if i == 100 then
  75. i = 0
  76. end
  77.  
  78.  
  79. until b == btogo
Advertisement
Add Comment
Please, Sign In to add comment