Advertisement
Pdan4

Quarry4

Jun 2nd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 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. end
  27.  
  28.  
  29. if width-w>0 then
  30. if w%2==1 then
  31. if length%2==1 then
  32. turtle.turnLeft()
  33. turtle.forward()
  34. turtle.turnLeft()
  35. end
  36.  
  37. if length%2==0 then
  38. turtle.turnRight()
  39. turtle.forward()
  40. turtle.turnRight()
  41. end
  42. end
  43.  
  44.  
  45.  
  46.  
  47. if w%2==0 then
  48. if d%2==0 then
  49. if length%2==0 then
  50. turtle.turnRight()
  51. turtle.forward()
  52. turtle.turnRight()
  53. end
  54.  
  55. if length%2==1 then
  56. turtle.turnLeft()
  57. turtle.forward()
  58. turtle.turnLeft()
  59. end
  60. end
  61.  
  62. if d%2==1 then
  63. if length%2==1 then
  64. turtle.turnRight()
  65. turtle.forward()
  66. turtle.turnRight()
  67. end
  68.  
  69. if length%2==0 then
  70. turtle.turnLeft()
  71. turtle.forward()
  72. turtle.turnLeft()
  73. end
  74. end
  75. end
  76.  
  77.  
  78.  
  79.  
  80. end
  81. end
  82. turtle.down()
  83. turtle.turnLeft()
  84. turtle.turnLeft()
  85.  
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement