grand_mind1

bTunnel

Jun 28th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local function dropOff()
  2.     turtle.digDown()
  3.     turtle.select(16)
  4.     turtle.placeDown()
  5.     for i = 1,15 do
  6.         turtle.select(i)
  7.         turtle.dropDown()
  8.     end
  9. end
  10.  
  11. local function tunnel(num)
  12.     for i = 1,num do
  13.         turtle.digUp()
  14.         turtle.turnLeft()
  15.         turtle.dig()
  16.         turtle.up()
  17.         turtle.dig()
  18.         turtle.turnRight()
  19.         turtle.turnRight()
  20.         turtle.dig()
  21.         turtle.down()
  22.         turtle.dig()
  23.         turtle.turnLeft()
  24.         if turtle.getItemCount(15) > 0 then
  25.             dropOff()
  26.         end
  27.         turtle.select(1)
  28.         turtle.dig()
  29.         turtle.forward()
  30.     end
  31. end
  32. compID = 26
  33. rednet.open("right")
  34. id, msg = rednet.receive()
  35. if id == compID then
  36.     tunnel(msg)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment