emagiannu

Pneumatic-Craft Plant Farm

Jun 12th, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local BM = 3
  2.  
  3. function bone()
  4.   turtle.select(2)
  5.   for i=1, BM do
  6.     turtle.place()
  7.   end
  8. end
  9.  
  10. function plant()
  11.   turtle.select(1)
  12.   turtle.drop(1)
  13. end
  14.  
  15. function collect()
  16.   turtle.dig()
  17.   turtle.suck()
  18. end
  19.  
  20. function drop()
  21.   turtle.select(3)
  22.   turtle.transferTo(1)
  23.   turtle.dropUp()
  24. end
  25.  
  26. --MAIN
  27.  
  28. while true do
  29.   if not turtle.detect() then
  30.     plant()
  31.   else
  32.     bone()
  33.     collect()
  34.     drop()
  35.   end
  36.  
  37.   sleep(3)
  38. end
Add Comment
Please, Sign In to add comment