Advertisement
KingKevin23

CCMining

Feb 27th, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. function mine(x)
  2.   counter = 0
  3.   repeat
  4.     turtle.dig()
  5.     turtle.forward()
  6.     turtle.digUp()
  7.     counter = counter + 1
  8.   until counter == x
  9. end
  10.  
  11. function turnAround()
  12.   turtle.turnRight()
  13.   turtle.turnRight()
  14. end
  15.  
  16. function moveForward(x)
  17.   counter = 0
  18.   repeat
  19.     turtle.forward()
  20.     counter = counter + 1
  21.   until counter == x
  22. end
  23.  
  24. function placeTorch()
  25.   turtle.up()
  26.   turtle.select(2)
  27.   turtle.back()
  28.   turtle.place()
  29.   turtle.down()
  30. end
  31.  
  32. function stripMine(x)
  33.   for i = 0, x, +1
  34.   do
  35.     mine(3)
  36.     turtle.turnRight()
  37.     mine(5)
  38.     placeTorch()
  39.     turnAround()
  40.     moveForward(4)
  41.     mine(5)
  42.     placeTorch()
  43.     turnAround()
  44.     moveForward(4)
  45.     turtle.turnLeft()
  46.   end
  47. end
  48.  
  49. turtle.refuel()
  50. stripMine(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement