Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. progress = 0
  2. solid = 5
  3. dist = 0
  4.  
  5. function doit()
  6.  
  7. select( 16 )
  8. turtle.refuel( turtle.getItemCount( 16 ) )
  9. print( "Turtle has refueled!" )
  10.  
  11. --1
  12. while ( turtle.detect() == true ) do
  13. turtle.dig()
  14. end
  15. turtle.forward()
  16.  
  17. while ( turtle.detectUp() == true ) do
  18. turtle.digUp()
  19. end
  20. turtle.up()
  21. while ( turtle.detectUp() == true ) do
  22. turtle.digUp()
  23. end
  24.  
  25. turtle.turnRight()
  26.  
  27. --2
  28. while ( turtle.detect() == true ) do
  29. turtle.dig()
  30. end
  31. turtle.forward()
  32.  
  33. while ( turtle.detectUp() == true ) do
  34. turtle.digUp()
  35. end
  36. while ( turtle.detectDown() == true ) do
  37. turtle.digDown()
  38. end
  39.  
  40. --3
  41. while ( turtle.detect() == true ) do
  42. turtle.dig()
  43. end
  44. turtle.forward()
  45.  
  46. while ( turtle.detectUp() == true ) do
  47. turtle.digUp()
  48. end
  49. while ( turtle.detectDown() == true ) do
  50. turtle.digDown()
  51. end
  52.  
  53. --4
  54. while ( turtle.detect() == true ) do
  55. turtle.dig()
  56. end
  57. turtle.forward()
  58.  
  59. while ( turtle.detectUp() == true ) do
  60. turtle.digUp()
  61. end
  62. while ( turtle.detectDown() == true ) do
  63. turtle.digDown()
  64. end
  65.  
  66. --5
  67. while ( turtle.detect() == true ) do
  68. turtle.dig()
  69. end
  70. turtle.forward()
  71.  
  72. while ( turtle.detectUp() == true ) do
  73. turtle.digUp()
  74. end
  75. while ( turtle.detectDown() == true ) do
  76. turtle.digDown()
  77. end
  78.  
  79. --6
  80. while ( turtle.detect() == true ) do
  81. turtle.dig()
  82. end
  83. turtle.forward()
  84.  
  85. while ( turtle.detectUp() == true ) do
  86. turtle.digUp()
  87. end
  88. while ( turtle.detectDown() == true ) do
  89. turtle.digDown()
  90. end
  91.  
  92. /*
  93. if ( solid >= 5 ) then
  94.  
  95. solid = 0
  96.  
  97. if ( turtle.getItemCount( 1 ) > 0 ) then
  98. turtle.select( 1 )
  99. elseif ( turtle.getItemCount( 2 ) > 0 ) then
  100. turtle.select( 2 )
  101. elseif ( turtle.getItemCount( 3 ) > 0 ) then
  102. turtle.select( 3 )
  103. elseif ( turtle.getItemCount( 4 ) > 0 ) then
  104. turtle.select( 4 )
  105. end
  106.  
  107. solid_ring()
  108.  
  109. for i = 1, 6, 1 do
  110.  
  111. turtle.up()
  112. while ( turtle.detectUp() == true ) do
  113. turtle.digUp()
  114. end
  115. turtle.placeUp()
  116.  
  117. turtle.down()
  118. turtle.down()
  119.  
  120. while ( turtle.detectDown() == true ) do
  121. turtle.digDown()
  122. end
  123. turtle.placeDown()
  124.  
  125. turtle.up()
  126. turtle.back()
  127.  
  128. end
  129.  
  130. turtle.turnLeft()
  131. turtle.turnLeft()
  132.  
  133. solid_ring()
  134.  
  135. turtle.turnRight()
  136. turtle.down()
  137.  
  138. end
  139. */
  140.  
  141. end
  142.  
  143. print( "----------------------------------" )
  144. print( "----Activating Cosmic Tunneler----" )
  145. print( "----------------------------------" )
  146. sleep( 0.5 )
  147.  
  148. print( " " )
  149. print( "Cosmic Tunneler will create a 6x3 tunnel from one the current location." )
  150. print( "This Turtle should be oriented for the bottom left of the tunnel." )
  151. sleep( 0.5 )
  152. print( "Place the building blocks in slot 1-4." )
  153. print( "Place the accent blocks in slot 5-12." )
  154. print( "Place the torches in slot 15." )
  155. print( "Place the fuel in slot 16." )
  156. sleep( 0.5 )
  157.  
  158. print( "Input Integer - Enter Distance to Tunnel..." )
  159. dist = tonumber( io.read() )
  160. sleep( 0.5 )
  161.  
  162. print( "Ready to begin? [y/n]" )
  163. input = io.read()
  164.  
  165. if ( input == 'y' ) then
  166. print( "Program will now begin!" )
  167. doit()
  168. else
  169. print( "Program will not start." )
  170. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement