Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tPeripheralList
- local nPeripheralIndex
- local tPeripheralMethods
- local tPeripheralList = peripheral.getNames()
- print("Peripherals found on your system:")
- for nIndex = 1, #tPeripheralList do
- print(tostring(nIndex) .. ": " .. peripheral.getType(tPeripheralList[nIndex]) .. " \"" .. tPeripheralList[nIndex] .. "\"")
- end
- print()
- print("Enter peripheral number:")
- nPeripheralIndex = tonumber(read())
- tPeripheralMethods = peripheral.getMethods(tPeripheralList[nPeripheralIndex])
- print()
- if tPeripheralMethods == nil then
- print("Peripheral not found!")
- else
- for nIndex = 1, #tPeripheralMethods do
- print(tPeripheralMethods[nIndex])
- if nIndex - math.floor(nIndex / 15) * 15 == 0 then
- print("[more] Press enter to continue...")
- read()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement