Advertisement
Guest User

stripmine

a guest
Nov 23rd, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 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.         mineStep()
  18.         turtle.select(16)
  19.         turtle.place()      
  20.         for l in 1, 15 do
  21.             turtle.select(l)
  22.             turtle.drop()
  23.             end
  24.         turtle.turnLeft()
  25.         mineStep()
  26.         mineStep()
  27.         mineStep()
  28.         turtle.turnLeft()
  29.         end
  30.     end
  31.  
  32. --first parameter is the number of tunnels, second is the length of a tunnel
  33. --put a number of chests corresponding to the number of tunnels into the turtles last (bottom right) slot
  34. excavation(16,16)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement