Advertisement
Pdan4

Quarry2

Jun 2nd, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. write("Welcome to the Mining program.\n The Turtle will mine a prism that's to the left, forward, and below.\n GUI by Pdan4, code by David341.")
  4. write("Prism will begin after pressing enter after filling the DEPTH query.\n")
  5.  
  6. write("\n \nBlocks forward? ")
  7. local length = read()
  8.  
  9. write("\nBlocks left? ")
  10. local width = read()
  11.  
  12. write("\nBlocks down? ")
  13. local depth = read()
  14.  
  15.  
  16.  
  17. for d=1, depth do
  18.   for w=1, width do
  19.   turtle.dig()
  20.   turtle.digDown()
  21.    
  22.     for l=2, length do
  23.     turtle.dig()
  24.     turtle.forward()
  25.     turtle.digDown()
  26.    
  27.     end
  28.  
  29.   if width-w>0 then
  30.     if d%2==1 then
  31.         if w%2==0 then
  32.         turtle.turnRight()
  33.         turtle.forward()
  34.         turtle.turnRight()
  35.         end
  36.    
  37.         if w%2==1 then
  38.         turtle.turnLeft()
  39.         turtle.forward()
  40.         turtle.turnLeft()
  41.         end
  42.       end
  43.  
  44.        if d%2==0 then
  45.         if w%2==1 then
  46.         turtle.turnRight()
  47.         turtle.forward()
  48.         turtle.turnRight()
  49.         end
  50.    
  51.         if w%2==0 then
  52.         turtle.turnLeft()
  53.         turtle.forward()
  54.         turtle.turnLeft()
  55.         end
  56.       end
  57.  
  58.    end
  59.   end
  60. turtle.down()
  61. turtle.turnLeft()
  62. turtle.turnLeft()
  63.  
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement