ericl16384

ComputerCraft - Stripminer

Jun 7th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local initialized = false
  2. while not initialized do
  3.     print("Place fuel in slot 1.")
  4.     print("Place torches in slot 2.")
  5.     print("Press ENTER to start.")
  6.     read()
  7.  
  8.     -- fuel
  9.     turtle.select(1)
  10.     initialized = true
  11.     while turtle.getFuelLevel() < 129 do
  12.         if turtle.refuel(1) then
  13.             print("Refueling.")
  14.         else
  15.             print("Invalid fuel.")
  16.             print()
  17.             initialized = false
  18.             break
  19.         end
  20.     end
  21. end
  22.  
  23. -- setup
  24. turtle.select(2)
  25.  
  26. -- dig
  27. print("Starting digging.")
  28. for i = 1, 64 do
  29.     turtle.dig()
  30.     turtle.forward()
  31. end
  32.  
  33. -- turn around
  34. print("Turning around.")
  35. turtle.digDown()
  36. turtle.down()
  37. turtle.turnLeft()
  38. turtle.turnLeft()
  39. -- placing torch
  40. print("Placing torch.")
  41. turtle.placeUp()
  42.  
  43. -- dig
  44. print("Starting digging.")
  45. for i = 1, 7 do
  46.     turtle.dig()
  47.     turtle.forward()
  48. end
  49. -- placing torch
  50. print("Placing torch.")
  51. turtle.placeUp()
  52. for i = 1, 7 do
  53.     -- dig
  54.     print("Starting digging.")
  55.     for j = 1, 8 do
  56.         turtle.dig()
  57.         turtle.forward()
  58.     end
  59.     -- placing torch
  60.     print("Placing torch.")
  61.     turtle.placeUp()
  62. end
  63. -- finished
  64. print("Finished digging.")
Advertisement
Add Comment
Please, Sign In to add comment