mathiaas

test

Dec 14th, 2019 (edited)
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function plant()
  2. turtle.select(1)
  3. local success, sapling = turtle.getItemDetail(1)
  4. inventory = {}
  5.  
  6. if (turtle.getItemCount() <= 1) then
  7. for i = 3,16 do
  8. if (turtle.getItemDetail(i).name == sapling.name) then
  9. turtle.select(i)
  10. turtle.transferTo(1)
  11. end
  12. end
  13. elseif (turtle.detect() == false) then
  14. turtle.place()
  15. end
  16. end
  17.  
  18. plant()
Advertisement
Add Comment
Please, Sign In to add comment