Advertisement
CCninja86

MineTech

Feb 24th, 2013
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. turtle.select(1)
  2. OK = (turtle.getItemCount(1) >= 1)
  3.  
  4. if not OK then
  5. print ("Please place torches in the first slot.")
  6. end
  7.  
  8. elseif OK then
  9. print ("What type of mine would you like to make?")
  10. mineType = io.read()
  11.  
  12. if mineType == "Strip Mine" then
  13. print ("How long do you want the mine?")
  14. length = io.read(int)
  15.  
  16. if length ~= "" then
  17. print ("How wide do you want the mine?")
  18. width = io.read(int)
  19.  
  20. if width ~= "" then
  21. newWidth = width - 1
  22. print ("How tall do you want the mine?")
  23. height = io.read(int)
  24.  
  25. if height ~= "" then
  26. newHeight = height - 1
  27. print ("Mining...")
  28. sleep(1)
  29. end
  30.  
  31. function turtleMine()
  32.  
  33. turtle.dig()
  34. turtle.forward()
  35.  
  36. for i = 1, newHeight do
  37. turtle.digUp()
  38. turtle.up()
  39. end
  40.  
  41. turtle.turnRight()
  42.  
  43. for i = 1, newWidth do
  44. turtle.dig()
  45. turtle.forward()
  46. end
  47.  
  48. turtle.turnRight()
  49. turtle.turnRight()
  50.  
  51. for i = 1, newHeight do
  52. turtle.digDown()
  53. turtle.down()
  54. end
  55.  
  56. turtle.dig()
  57. turtle.forward()
  58. turtle.digUp()
  59. turtle.forward()
  60. end
  61.  
  62. for i = 1, x do
  63. while x < length do
  64. turtleMine()
  65. if
  66. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement