2021-01-08 16:42:38 +00:00
|
|
|
local computer = require("computer")
|
2021-01-07 23:32:44 +00:00
|
|
|
local component = require("component")
|
|
|
|
local event = require("event")
|
2021-01-08 17:22:25 +00:00
|
|
|
local shell = require("shell")
|
2021-01-07 23:32:44 +00:00
|
|
|
local t = component.tunnel
|
2021-01-08 14:59:19 +00:00
|
|
|
|
2021-01-08 17:34:26 +00:00
|
|
|
os.sleep(1)
|
2021-01-08 17:22:25 +00:00
|
|
|
shell.execute("wget -f https://raw.githubusercontent.com/erius0/luaScripts/main/help.txt")
|
2021-01-08 17:34:26 +00:00
|
|
|
os.sleep(1)
|
2021-01-08 17:22:25 +00:00
|
|
|
shell.execute("wget -f https://github.com/erius0/luaScripts/blob/main/tabletRadar")
|
2021-01-08 17:23:09 +00:00
|
|
|
shell.execute("clear")
|
2021-01-08 17:18:39 +00:00
|
|
|
|
2021-01-08 14:59:19 +00:00
|
|
|
local instr = "help - вывести все команды\nexit - выйти"
|
|
|
|
local f = io.open("help.txt", "r")
|
|
|
|
local help = f:read("*all")
|
|
|
|
f:close()
|
|
|
|
|
|
|
|
print(instr)
|
|
|
|
|
2021-01-07 23:32:44 +00:00
|
|
|
while true do
|
|
|
|
io.write("msg: ")
|
|
|
|
_, message = pcall(io.read)
|
2021-01-08 15:05:18 +00:00
|
|
|
t.send(message)
|
2021-01-07 23:32:44 +00:00
|
|
|
if message == "exit" then
|
|
|
|
break
|
2021-01-08 14:59:19 +00:00
|
|
|
elseif message == "help" then
|
|
|
|
print(help)
|
2021-01-08 16:42:38 +00:00
|
|
|
elseif message == "update" then
|
|
|
|
computer.shutdown(true)
|
2021-01-07 23:32:44 +00:00
|
|
|
end
|
2021-01-08 15:13:08 +00:00
|
|
|
os.sleep(1)
|
2021-01-07 23:32:44 +00:00
|
|
|
end
|