Niseg

simple farm

Mar 23rd, 2013
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. -- simple farmer by niseg
  2.  
  3. print("put seeds in slot 1 and bone meal in slot 2")
  4. turtle.select(1)
  5. if turtle.detect() then turtle.dig() end
  6.  
  7. while(turtle.getItemCount(2)>1) do
  8.  
  9. turtle.place()
  10. sleep(0.5)
  11. turtle.select(2)
  12. turtle.place(2)
  13. sleep(0.5)
  14. turtle.select(1)
  15. turtle.dig()
  16. if(turtle.getItemCount(2)==1) then
  17. for i=3,16 do
  18. turtle.select(i)
  19. if turtle.compareTo(2) then
  20. local cnt=turtle.getItemCount(i)
  21. if cnt==64 then
  22. turtle.transferTo(2,63)
  23. else
  24. turtle.transferTo(2,cnt)
  25. end
  26.  
  27. end
  28.  
  29. end
  30. turtle.select(1)
  31. end
  32.  
  33. end
Advertisement
Add Comment
Please, Sign In to add comment