Advertisement
Pdan4

m

Jun 1st, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. while true do
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. write("Welcome to the Mining program.\n The Turtle will mine a prism that's to the left, forward, and below.\n ")
  5.  
  6. write("\n Blocks forward?")
  7. local forward1 = read()
  8. local forward = forward1-1
  9.  
  10. write("\n Blocks left?")
  11. local left1 = read()
  12. local left = left1 - 1
  13.  
  14. write("\n Blocks deep?")
  15. local deep1 = read()
  16. local deep = deep1 - 1
  17.  
  18. write("\n \n After filling in the dimensions, press ENTER to start.")
  19. local top= forward*left
  20.  
  21. local side = top*deep
  22.  
  23.  
  24. for i=1,side, top do
  25. for i=1,top, top do
  26. turtle.digDown()
  27. turtle.turnLeft()
  28. turtle.turnLeft()
  29.  
  30. for i=1,top, forward do
  31.  
  32. for i=1,forward do
  33. turtle.dig()
  34. turtle.forward()
  35. end
  36.  
  37. turtle.turnLeft()
  38. turtle.dig()
  39. turtle.turnLeft()
  40. end
  41.  
  42. end
  43. print("Finished mining.")
  44.  
  45. if sEvent == "key" then
  46. if param == 28 then
  47. Mine(side)
  48. break
  49. end
  50. end
  51. end
  52. end
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement