Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local i = tonumber(84) -- id
- rednet.open("right")
- term.clear()
- term.setCursorPos(1,1)
- while true do
- term.setTextColor(colors.yellow)
- term.write("Command: ")
- term.setTextColor(colors.white)
- local command = read()
- if string.find(command, "quit") == 1 then
- term.clear()
- term.setCursorPos(1,1)
- break
- end
- rednet.send(i, command)
- while true do
- local event, id, message = os.pullEvent("rednet_message")
- if string.find(message, "connected") == 8 then
- print(message)
- elseif string.find(message, "such") == 4 then
- term.setTextColor(colors.red)
- print(message)
- break
- elseif string.find(message, "sig") == 1 then
- rednet.send(i, "sig")
- else
- print(message)
- break
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement