Advertisement
Guest User

stripmine

a guest
Nov 23rd, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. function mineStep()
  2.     turtle.dig()
  3.     turtle.forward()
  4.     turtle.digUp()
  5.     end
  6.  
  7. function excavation(tunnels, tLength)
  8.     for i = 1, tunnels do
  9.         for n = 1, tLength do
  10.             mineStep()
  11.             end
  12.         turtle.turnRight()
  13.         turtle.turnRight()
  14.         for n = 1, tLength do
  15.             turtle.forward()
  16.             end
  17.         turtle.dig()
  18.         turtle.up()
  19.         turtle.dig()
  20.         turtle.down()
  21.         turtle.select(16)
  22.         turtle.place()      
  23.         for l = 1, 15 do
  24.             turtle.select(l)
  25.             turtle.drop()
  26.             end
  27.         turtle.turnLeft()
  28.         mineStep()
  29.         mineStep()
  30.         mineStep()
  31.         turtle.turnLeft()
  32.         end
  33.     end
  34.  
  35. --first parameter is the number of tunnels, second is the length of a tunnel
  36. --put a number of chests corresponding to the number of tunnels into the turtles last (bottom right) slot
  37. excavation(1,5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement