Sayomie550

Untitled

Jan 9th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 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.         turtle.attack()
  15.         sleep(.1)
  16.         if turtle.attack() then
  17.             stabbed = stabbed + 1
  18.         end
  19.     end
  20.    
  21.     function gather()
  22.         turtle.suck()
  23.         sleep(.1)
  24.     end
  25.    
  26.     function deposit()
  27.         if turtle.getItemSpace(16) < 64 then
  28.             slot = 1
  29.             while slot < 16 do
  30.                 turtle.select(slot)
  31.                 turtle.dropUp()
  32.                 slot = slot + 1
  33.                 sleep(1)
  34.             end
  35.         end
  36.        
  37.     end
  38.    
  39.     --display()
  40.     --attack()
  41.     --gather()
  42.     deposit()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment