Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require("term")
- local component = require("component")
- local event = require("event")
- local ccb = component.chat_box
- local path = "chatlog.txt"
- -- Принимаем сообщения с сервера:
- while true do
- component.gpu.setResolution(45, 15)
- print("Загрузка...")
- os.sleep(0.5)
- print("Инициализация выводного файла...")
- os.sleep(0.5)
- print("Вход в систему...")
- os.sleep(0.1)
- print("Username:Hallowt")
- os.sleep(0.1)
- print("Pass:**********")
- end
- elseif print("██████████")
- print("Логгирую чат...")
- os.sleep(0.5)
- print("Записываю сообщение на диск...")
- os.sleep(0.1)
- print("Записано!")
- os.sleep(0.1)
- print("░░░░░░░░░░░░░░░░")
- _, _, p, m = event.pull("chat_message")
- f = io.open(path, "a")
- if f == nil then
- io.open(path, "w")
- f:close()
- f = io.open(path, "a")
- end
- f:write(string.format("%s:%s\n",p,m))
- f:flush()
- f:close()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement