Advertisement
lachiu

Temp

Aug 24th, 2020 (edited)
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. print("How wide do I mine, boss?")
  2. local Width = tonumber(read())
  3. print("How deep do I mine, boss?")
  4. local Depth = tonumber(read())
  5. print("How high do I mine, boss?")
  6. local Height = tonumber(read())
  7.  
  8. function Mine(Width,Depth,Height)
  9. for calcDepth = 1,Depth,1
  10. do
  11. for calcWidth = 1,Width,1
  12. do
  13. for calcHeight = 1,Height,1
  14. do
  15. turtle.dig()
  16. if calcHeight ~= Height then
  17. turtle.up()
  18. end
  19. end
  20.  
  21. for calcHeight = Height-1,1,-1
  22. do
  23. turtle.down()
  24. end
  25.  
  26. if calcWidth ~= Width then
  27. MoveRight(1)
  28. end
  29. end
  30. MoveLeft(Width-1)
  31.  
  32. if calcDepth ~= Depth then
  33. turtle.forward()
  34. end
  35.  
  36. end
  37. end
  38.  
  39. -- Checks if block is present in front, if not break loop, otherwise mine said block
  40. function Dig()
  41.  
  42. end
  43.  
  44. -- Moves x blocks Left
  45. function MoveLeft(Move)
  46. turtle.turnLeft()
  47.  
  48. for i = 1,Move,1
  49. do
  50. turtle.forward()
  51. end
  52. turtle.turnRight()
  53. end
  54.  
  55. -- Moves x blocks Right
  56. function MoveRight(Move)
  57. turtle.turnRight()
  58.  
  59. for i = 1,Move,1
  60. do
  61. turtle.forward()
  62. end
  63.  
  64. turtle.turnLeft()
  65. end
  66.  
  67. Mine(Width, Depth, Height)
  68. print("Job completed, boss.")
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement