Meeschter

Untitled

Jun 20th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1.  
  2. function attack()
  3.  while true do
  4.   turtle.attack()
  5.   check()
  6.   sleep(.5)
  7.  end
  8. end
  9.  
  10. function check()
  11.  if turtle.getItemCount(16) > 0 then
  12.   for i=1, 16 do
  13.    turtle.select(i)
  14.    turtle.dropDown()
  15.   end
  16.  turtle.select(1)
  17.  end
  18. end
  19.  
  20. local function startup()
  21.  term.clear()
  22.  term.setCursorPos(1,1)
  23.  print"Turtle Powered Mob Farm starting..."
  24.  attack()
  25. end
  26.  
  27. local rtn, error = pcall(startup)
  28. if not rtn then
  29.  print("Error: "..error)
  30. print("Exiting")end
Advertisement
Add Comment
Please, Sign In to add comment