LuaScripts/linkedSend.lua
2021-01-08 18:05:18 +03:00

21 lines
443 B
Lua

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)
end
end