Advertisement
Gioves

[Turtle]Whiter Farm

Dec 11th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. function emptyIfFull() --check if the turtle is full and empty it
  2.     if (turtle.getItemCount(9) > 0) then
  3.         for slot=1,9 do
  4.             turtle.select(slot)
  5.             while turtle.getItemCount(slot) > 0 do
  6.                 turtle.dropUp(turtle.getItemCount(slot))
  7.                 if turtle.getItemCount(slot) > 0 then
  8.                     sleep(0.25)
  9.                 end
  10.             end
  11.         end
  12.         turtle.select(1)
  13.     end
  14. end
  15.  
  16. while true do
  17.     emptyIfFull()
  18.     turtle.attack()
  19.     sleep(0.25)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement