Sayomie550

Untitled

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