Sayomie550

Untitled

Jan 9th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 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.getItemCount(16) > 1 then
  28.             turtle.turnRight()
  29.             sleep(1)
  30.             turtle.select(1)
  31.             slot = 1
  32.             while slot > 16 do
  33.                 turtle.drop()
  34.                 sleep(1)
  35.                 while turtle.drop(false) do
  36.                     display()
  37.                     print("Chest is full empty to continue stabbing")
  38.                     sleep(5)
  39.                 end
  40.                 slot = slot + 1
  41.             end
  42.             turtle.select(1)
  43.             turtle.turnLeft()
  44.         end
  45.     end
  46.    
  47.     --display()
  48.     --attack()
  49.     --gather()
  50.     deposit()
  51. end
Advertisement
Add Comment
Please, Sign In to add comment