Advertisement
tumblerr

Untitled

Sep 3rd, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. -- pastebin get gKUbhNpg 4x3secure
  2. print("Thank you for using the M^3 Broad Path Building Program! Place Torches in slot 1, and Path Blocks in 2-16")
  3. write "Enter distance you want to go:"
  4. distance = read()
  5. distance = distance/2
  6. hg = distance
  7. print("Starting in 3 seconds...")
  8. sleep(3)
  9.  
  10. print("Tunneling...")
  11. t = 0
  12.  
  13.  
  14. local sslot = 1
  15. turtle.select(sslot)
  16. sslot = (sslot%16)+1
  17. turtle.select(sslot)
  18. turtle.getItemCount(sslot)
  19.  
  20. function digg()
  21. turtle.dig()
  22. turtle.forward()
  23. end
  24. function wall()
  25. turtle.place()
  26. turtle.digUp()
  27. turtle.up()
  28. turtle.place()
  29. turtle.digUp()
  30. turtle.up()
  31. turtle.place()
  32. turtle.placeUp()
  33. turtle.down()
  34. turtle.down()
  35. end
  36.  
  37. function turnAround()
  38. turtle.turnRight()
  39. turtle.turnRight()
  40. end
  41.  
  42.  
  43. function place()
  44. turtle.digUp()
  45. turtle.up()
  46. turtle.digUp()
  47. turtle.up()
  48. turtle.placeUp()
  49. turtle.down()
  50. turtle.down()
  51. turtle.placeDown()
  52. turtle.dig()
  53. turtle.forward()
  54. end
  55. function placeEnd()
  56. turtle.digUp()
  57. turtle.up()
  58. turtle.digUp()
  59. turtle.up()
  60. turtle.placeUp()
  61. turtle.down()
  62. turtle.down()
  63. turtle.placeDown()
  64. turtle.dig()
  65. end
  66.  
  67.  
  68. for x = 1,distance do
  69. turtle.select(sslot)
  70. digg()
  71. turtle.turnLeft()
  72. wall()
  73. turnAround()
  74. place()
  75. place()
  76. place()
  77. placeEnd()
  78. wall()
  79. turtle.turnLeft()
  80. digg()
  81. turtle.turnRight()
  82. wall()
  83. turnAround()
  84. place()
  85. place()
  86. place()
  87. placeEnd()
  88. wall()
  89. turtle.turnRight()
  90. hg = hg-1
  91. t = t+1
  92. if t == 3 then
  93. turtle.select(1)
  94. turtle.turnLeft()
  95. turtle.up()
  96. turtle.turnLeft()
  97. turtle.place()
  98. turtle.turnRight()
  99. turtle.down()
  100. turtle.turnRight()
  101. turtle.select(sslot)
  102. t = 0
  103. end
  104.  
  105.  
  106. while turtle.getItemCount(sslot) < 1 do
  107. sslot = (sslot%16)+1
  108. end
  109. turtle.select(sslot)
  110.  
  111. print("")
  112. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement