FunnyGamingFr

Turtle attack

Aug 1st, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. num = 1
  2.  
  3. function attack()
  4.  turtle.attack()
  5.  check()
  6.  sleep(.1)
  7.  turtle.suck()
  8.  
  9. end
  10.  
  11. function check()
  12.  if turtle.getItemCount(16) > 0 then
  13.   turtle.turnRight()
  14.   for i = 1, 16 do
  15.    turtle.select(num)
  16.    turtle.drop()
  17.    num = num + 1
  18.   end
  19.   num = 1
  20.   turtle.turnLeft()
  21.   turtle.select(1)
  22.  end
  23. end
  24.  
  25. while true do
  26.  attack()
  27. end
Add Comment
Please, Sign In to add comment