Advertisement
jubjub727

Untitled

Feb 25th, 2023
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local clients = peripheral.call("back", "getNamesRemote")
  2.  
  3. local chests = {}
  4.  
  5. local function DiscoverChests()
  6. for k,client in pairs(clients) do
  7. print(peripheral.getType(client))
  8. if (peripheral.getType(client) == "chest") then
  9. table.insert(chests, client)
  10. end
  11. end
  12. end
  13.  
  14. DiscoverChests()
  15.  
  16. for k,chest in pairs(chests) do
  17. print(chest)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement