Sayomie550

Untitled

Jan 9th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local stabbed = 0
  2. local slot = 0
  3.  
  4. while true do
  5.  
  6.     function display()
  7.         term.clear()
  8.         term.setCursorPos(1,1)
  9.         print("Stab Bot 9000 V1.0.0")
  10.         print("Number of mobs stabbed: " ..stabbed)
  11.     end
  12.    
  13.     function attack()
  14.         if turtle.attack() then
  15.             stabbed = stabbed + 1
  16.         end
  17.     end
  18.    
  19.     function gather()
  20.         turtle.suck()
  21.         sleep(.1)
  22.     end
  23.    
  24.     function deposit()
  25.         if turtle.getItemSpace(16) < 64 then
  26.             slot = 1
  27.             while slot < 17 do
  28.                 turtle.select(slot)
  29.                 turtle.dropUp()
  30.                 slot = slot + 1
  31.                 sleep(.5)
  32.             end
  33.         end
  34.        
  35.     end
  36.     sleep(.5)
  37.     display()
  38.     attack()
  39.     gather()
  40.     deposit()
  41. end
Advertisement
Add Comment
Please, Sign In to add comment