Advertisement
Guest User

branch

a guest
Oct 12th, 2014
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1.   term.clear()
  2.   term.setCursorPos(1,1)
  3.   print("How far?")
  4.   local x
  5.   local y
  6.   x = read()
  7.   y = 0
  8. while true do  
  9.   print("Mining " ..x.. " meters")
  10.   turtle.select(1)
  11.  
  12.   for i = 1, x do
  13.      while not turtle.forward() do --Here is where I've tried to add the gravel remove part.
  14.      turtle.dig()
  15.      end
  16.      
  17.      turtle.dig()
  18.      turtle.digUp()
  19.      turtle.forward()
  20.      turtle.digUp()        
  21.                  
  22.   for i = 1, 1 do
  23.     turtle.select(16)
  24.     turtle.turnRight()
  25.     turtle.dig()
  26.     turtle.place()
  27.     turtle.turnLeft()
  28.     turtle.forward()
  29.     turtle.forward()
  30.     turtle.turnRight()
  31.     turtle.dig()
  32.     turtle.place()
  33.     turtle.turnLeft()
  34.     turtle.forward()
  35.     turtle.select(1)
  36.     end
  37.    
  38.   for i = 1, x do
  39.     turtle.select(1 or 2)
  40.     turtle.placeDown()  
  41.   end
  42.  
  43.       y = y+1
  44.           while y>5 do
  45.            y = y-6
  46.           end
  47.   end
  48.  
  49.   turtle.turnLeft()
  50.   turtle.turnLeft()
  51.   for i = 1, x-1 do
  52.     turtle.forward()
  53.   while not turtle.forward() do
  54.     turtle.dig()
  55.   end
  56.   turtle.turnRight()
  57.   for i = 2, 15 do
  58.     turtle.select(i)
  59.     turtle.drop()
  60.   end
  61.  
  62.   turtle.turnLeft()
  63.   turtle.forward()
  64.   turtle.turnLeft()
  65.   turtle.forward()
  66.   turtle.forward()
  67.   turtle.forward()
  68.   turtle.turnLeft()
  69.    
  70.   print("Tunnel complete")
  71. end
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement