LuaScripts/linkedSend.lua
2021-01-08 20:40:50 +03:00

30 lines
800 B
Lua

local computer = require("computer")
local component = require("component")
local event = require("event")
local shell = require("shell")
local t = component.tunnel
shell.execute("wget -f https://raw.githubusercontent.com/erius0/luaScripts/main/help.txt")
shell.execute("wget -f https://raw.githubusercontent.com/erius0/luaScripts/main/tabletRadar.lua")
shell.execute("clear")
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