Advertisement
KingKevin23

ComputerCraft

Feb 27th, 2020
495
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.place()
  28.   turtle.down()
  29. end
  30.  
  31. function stripMine(x)
  32.   counter = 0
  33.   repeat
  34.     mine(3)
  35.     turtle.turnRight()
  36.     mine(5)
  37.     placeTorch()
  38.     turnAround()
  39.     moveForward(5)
  40.     mine(5)
  41.     placeTorch()
  42.     turnAround()
  43.     moveForward(5)
  44.     turtle.turnLeft()
  45.     counter = counter + 1
  46.   until counter == x
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement