Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local computer = require("computer")
- local component = require("component")
- local term = require("term")
- local gpu = component.gpu
- local tm = math.modf(computer.totalMemory() / 1024)
- local fm = math.modf(computer.freeMemory() / 1024)
- local me = math.modf(computer.maxEnergy())
- local e = math.modf(computer.energy())
- local ut = math.modf(computer.uptime())
- local ro = component.isAvailable("robot")
- gpu.setBackground(0x000000)
- term.clear()
- gpu.setForeground(0xFF0000)
- print("Статус устройства v. 1.2 by RAPD123")
- gpu.setForeground(0xFFFFFF)
- print("")
- if ro == "true" then
- gpu.setForeground(0x00FF00)
- print("Это робот, будет отображена дополнительная информация")
- else
- print("Это устройство не является роботом")
- end
- gpu.setForeground(0xFFFFFF)
- print("Всего килобайт ОЗУ:", tm)
- print("Свободно килобайт ОЗУ:", fm)
- print("Максимум энергии в устройстве/сети:", me)
- print("Доступно энергии в устройстве/сети:", e)
- print("Устройство работает в секундах:", ut)
- print("Адрес устройства:", computer.address())
- print("Список пользователей:", computer.users())
- if ro == "true"
- then
- local robot = require("robot")
- local rl = math.modf(robot.level())
- local rn = math.modf(robot.name())
- local ri = math.modf(robot.inventorySize())
- print("Уровень робота:", rl)
- print("Имя робота:", rn)
- print("Объём инвентаря:", ri)
- end
- computer.beep(1000, 0.1)
- computer.beep(1500, 0.15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement