Advertisement
Pdan4

DavidDigPdanMine

Jun 1st, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 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.  
  5. write("\n Blocks forward? ")
  6. local length = read()
  7.  
  8.  
  9. write("\n Blocks left? ")
  10. local width = read()
  11.  
  12. write("\n Blocks down? ")
  13. local depth = read()
  14.  
  15. write("\n \n After filling in the dimensions, press ENTER to start.")
  16.  
  17. for d=1, depth do
  18.   for w=1, width do
  19.   turtle.digDown()
  20.    
  21.     for l=1, length-1 do
  22.     turtle.forward()
  23.     turtle.digDown()
  24.     end
  25.  
  26.   if width-w>0 then
  27.     if w%2==0 then
  28.       turtle.turnLeft()
  29.       turtle.forward()
  30.       turtle.turnLeft()
  31.       end
  32.    
  33.     if w%2==1 then
  34.       turtle.turnRight()
  35.       turtle.forward()
  36.       turtle.turnRight()
  37.       end
  38.    end
  39.   end
  40. turtle.down()
  41. turtle.turnLeft()
  42. turtle.turnLeft()
  43.  
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement