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())
- gpu.setBackground(0x000000)
- term.clear()
- gpu.setForeground(0xFF0000)
- print("Статус устройства v. 2.1 by RAPD123")
- gpu.setForeground(0xFFFFFF)
- print("")
- if component.isAvailable("robot") then
- gpu.setForeground(0x00FF00)
- print("Это робот!")
- else
- print("Это устройство не является роботом")
- end
- gpu.setForeground(0xFFFFFF)
- print("Доступно ОЗУ:", fm)
- print("Всего ОЗУ:", tm)
- print("Доступно энергии:", e)
- print("Всего энергии:", me)
- print("Устройство работает в секундах:", ut)
- print("Адрес устройства:", computer.address())
- if computer.users() == "" then
- print("Список пользователей:", computer.users())
- end
- if component.isAvailable("robot") then
- local robot = require("robot")
- local rl = "N/A"
- if component.isAvailable("experience") then
- local rl = math.modf(component.experience.level())
- end
- local rn = 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