Advertisement
Pdan4

Mining1

Jun 1st, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 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.  if sEvent == "key" then
  24.             if param == 28 then
  25.                 --________________________________________________
  26.  
  27.     for i=1,side, top do
  28.     ------
  29.         for i=1,top, top do
  30.         turtle.digDown()
  31.         turtle.turnLeft()
  32.         turtle.turnLeft()
  33.        
  34. ---------------------------------
  35.                             for i=1,top, forward do
  36.                
  37.                             for i=1,forward do
  38.                                 turtle.dig()
  39.                                 turtle.forward()
  40.                             end
  41.  
  42.                     turtle.turnLeft()
  43.                     turtle.dig()
  44.                     turtle.turnLeft()
  45.                 end
  46.             end
  47. ------------------
  48.     print("Finished mining.")
  49.  
  50.                 --________________________________________________
  51.                 break
  52.             end
  53.         end
  54.     end
  55. end
  56. end
  57. end
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement