Advertisement
1amw31rd

ComputerCraft - Mob Killer Turtle

May 18th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. print("Press Q to quit")
  2.  
  3. local timer = os.startTimer(1)
  4.  
  5. while true do
  6.     local event, a = os.pullEvent()
  7.    
  8.     if event == "timer" then
  9.         if a == timer then
  10.             turtle.attack()
  11.             timer = os.startTimer(1)
  12.         end
  13.     elseif event == "char" then
  14.         if a == "q" then
  15.             return
  16.         end
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement