Advertisement
Clorith

Untitled

Mar 15th, 2014
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. found = 0
  2.  
  3. function deploy()
  4.     turtle.select(1)
  5.     turtle.placeDown()
  6. end
  7.  
  8. function clearInv()
  9.     for i = 1,10 do
  10.         while turtle.getItemCount(i) > 0 do
  11.             found = 1
  12.             turtle.select(i)
  13.             turtle.dropDown()
  14.         end
  15.     end
  16.     turtle.select(1)
  17. end
  18.  
  19. function getMiner()
  20.     turtle.select(1)
  21.     while turtle.getItemCount(1) > 0 do
  22.         clearInv()
  23.     end
  24.     turtle.digDown()
  25. end
  26.  
  27. deploy()
  28. sleep(10)
  29. clearInv()
  30. while found > 0 do
  31.     found = 0
  32.     clearInv()
  33.     sleep(3)
  34. end
  35. getMiner()
  36.  
  37. rednet.open( "right" )
  38. rednet.broadcast( "cycleDone" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement