Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local clients = peripheral.call("back", "getNamesRemote")
- local chests = {}
- local function DiscoverChests()
- for k,client in pairs(clients) do
- print(peripheral.getType(client))
- if (peripheral.getType(client) == "chest") then
- table.insert(chests, client)
- end
- end
- end
- DiscoverChests()
- for k,chest in pairs(chests) do
- print(chest)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement