Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local storage = peripheral.wrap("right")
- local glass = peripheral.wrap("left")
- write("Search: ")
- local search = read()
- local fing
- local count
- local id
- function find()
- local all = storage.getAvailableItems()
- for num, item in pairs(all) do
- fing = item.fingerprint
- count = item.size
- id = fing.id
- if string.find(id, search) then
- print(id..": "..count)
- return
- end
- end
- end
- glass.clear()
- glass.sync()
- while true do
- sleep()
- find()
- glass.clear()
- glass.addText(1,10,id..": "..count,0xFFFFFF)
- glass.sync()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement