Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = require("component")
- local event = require("event")
- local sg = c.stargate
- local term = require("term")
- function main()
- term.clear()
- print("Введите адрес врат: ")
- local address = io.read()
- sg.dial(address)
- status, info = sg.dial('0000-000-sa') --возвращает true/false при подключении и в info ошибку если что-то пошло не так
- print (status, info)
- local a={}
- while a[1] ~= 'touch' do --просто выводит все о чем информируют врата
- a={event.pull()}
- for i=1,#a do
- print(a[i])
- end
- end
- os.sleep(30)
- sg.disconnect()
- end
- while true do
- main()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement