Farrk

OpenPeripheral-PIM_spoils_bags_1.5.2

Dec 18th, 2013
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. m=peripheral.wrap("top")
  2. while 1 do
  3. slots=m.getSizeInventory()
  4. while slots==0 do
  5. os.sleep(2)
  6. print("slept for 2s")
  7. slots=m.getSizeInventory()
  8. end
  9. for i=0,slots-1 do
  10. info=m.getStackInSlot(i)
  11. if info~= nil then
  12. key,value=next(info)
  13. if value=="item.lootbag" then
  14. print("Found lootbag in slot "..i+1)
  15. m.push("down",i,1)
  16. turtle.place()
  17. break
  18. end
  19. end
  20. os.sleep(0)
  21. end
  22. os.sleep(0)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment