Advertisement
mouse03f

eggman

Jan 9th, 2025
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. function inventory()
  2.     for i = 1,16 do
  3.         if turtle.getItemCount(i) > 0 then
  4.             turtle.select(i)
  5.             details = turtle.getItemDetail(i)
  6.             if details.name == "minecraft:egg" then
  7.                 n = turtle.getItemCount(i)
  8.                 turtle.dropDown()
  9.                 throwEggs(n)
  10.             else
  11.                 turtle.drop()
  12.             end
  13.         end
  14.     end
  15. end
  16.  
  17. function throwEggs(n)
  18.     for i = 1,n do
  19.         os.sleep(0.1)
  20.         redstone.setOutput("bottom", true)
  21.         os.sleep(0.1)
  22.         redstone.setOutput("bottom", false)
  23.     end
  24. end
  25.  
  26. print("Now running eggbot 2000")
  27. while 1 do
  28.     inventory()
  29.  
  30. end
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement