Advertisement
ecco7777

CC Advanced Peripherals Inventory Slot Emptier

Jun 14th, 2025 (edited)
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. local manager = peripheral.find("inventoryManager")
  2. if not manager then
  3.     error("No Inventory Manager peripheral found!")
  4. end
  5.  
  6. local SLOT = 35  -- Always pull from slot 35
  7.  
  8. while true do
  9.     local removed = manager.removeItemFromPlayer("up", { fromSlot = SLOT })
  10.     if removed and removed > 0 then
  11.         print(string.format("Moved %d items from slot %d to chest above", removed, SLOT))
  12.         sleep(0.5)
  13.     else
  14.         -- Nothing to move, try again later
  15.         sleep(1)
  16.     end
  17. end
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement