Sayomie550

Untitled

Jan 9th, 2014
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 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.         turtle.select(16)
  28.         sleep(1)
  29.         while turtle.getItemSpace(16) < 64 do
  30.             turtle.select(1)
  31.             sleep(1)
  32.             slot = 1
  33.             while slot < 16 do
  34.                 turtle.dropUp()
  35.                 slot = slot + 1
  36.                 turtle.select(..slot)
  37.                 sleep(1)
  38.             end
  39.         end
  40.        
  41.     end
  42.    
  43.     --display()
  44.     --attack()
  45.     --gather()
  46.     deposit()
  47. end
Advertisement
Add Comment
Please, Sign In to add comment