Advertisement
lachiu

Untitled

Jul 25th, 2020 (edited)
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 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. local calcDepth = 0
  10. while calcDepth < Depth do
  11.  
  12. local calcHeight = 0
  13. while calcHeight < Height do
  14. turtle.dig()
  15. turtle.up()
  16.  
  17. calcHeight = calcHeight + 1
  18. end
  19.  
  20. turtle.turnRight()
  21. turtle.forward()
  22. turtle.turnLeft()
  23. calcHeight = 0
  24.  
  25. while calcHeight < Height do
  26. turtle.dig()
  27. turtle.down()
  28.  
  29. calcHeight = calcHeight + 1
  30. end
  31.  
  32. turtle.turnRight()
  33. turtle.forward()
  34. turtle.turnLeft()
  35. calcHeight = 0
  36.  
  37. while calcHeight < Height do
  38. turtle.dig()
  39. turtle.up()
  40.  
  41. calcHeight = calcHeight + 1
  42. end
  43.  
  44. turtle.turnLeft()
  45. for i = 0,Width,1
  46. do
  47. turtle.forward()
  48. end
  49. turtle.turnRight()
  50. for i = 0,Height,1
  51. do
  52. turtle.down()
  53. end
  54.  
  55. calcDepth = calcDepth + 1
  56. turtle.forward()
  57. end
  58.  
  59. for i = 1,Depth,1
  60. do
  61. turtle.back()
  62. end
  63. end
  64. Mine(Width, Depth, Height)
  65. print("Job completed, boss.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement