Advertisement
Pdan4

Quarry

Jun 1st, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 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 w%2==-1+d then
  31. turtle.turnRight()
  32. turtle.forward()
  33. turtle.turnRight()
  34. end
  35.  
  36. if w%2==0+d then
  37. turtle.turnLeft()
  38. turtle.forward()
  39. turtle.turnLeft()
  40. end
  41. end
  42. end
  43. turtle.down()
  44. turtle.turnLeft()
  45. turtle.turnLeft()
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement