LuaScripts/linkedSend.lua
2021-01-08 19:42:38 +03:00

25 lines
556 B
Lua

local computer = require("computer")
local component = require("component")
local event = require("event")
local t = component.tunnel
local instr = "help - вывести все команды\nexit - выйти"
local f = io.open("help.txt", "r")
local help = f:read("*all")
f:close()
print(instr)
while true do
io.write("msg: ")
_, message = pcall(io.read)
t.send(message)
if message == "exit" then
break
elseif message == "help" then
print(help)
elseif message == "update" then
computer.shutdown(true)
end
os.sleep(1)
end