Quetzi

Attack turtle

Feb 18th, 2013
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. local count = 0
  2.  
  3. function empty()
  4.   for i=1,16 do
  5.     while turtle.getItemCount(i)>0 do
  6.       count=count+1
  7.       print("Depositing Ender pearl " .. count)
  8.       redstone.setOutput("bottom",true)
  9.       sleep(0.1)
  10.       redstone.setOutput("bottom",false)
  11.       sleep(0.3)
  12.     end
  13.   end
  14. end
  15.  
  16.  
  17. while true do
  18.   turtle.attack()
  19.   turtle.select(1)
  20.   if turtle.getItemCount(1)>0 then
  21.     empty()
  22.   end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment