LuaScripts/linkedSend.lua
2021-01-08 20:48:15 +03:00

32 lines
937 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)
elseif message == "near" then
shell.execute("tabletRadar.lua")
end
os.sleep(1)
end