Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- rednet.host("myprot-exe","mobile")
- rednet.host("spynet","IECOS")
- function head()
- term.clear()
- term.setCursorPos(1,1)
- x,y = term.getSize()
- term.write("+")
- for i=1,(x-13)/2,1 do
- term.write("-")
- end
- term.write("[")
- term.setTextColor(colors.yellow)
- term.write("IEC-OS.aic")
- term.setTextColor(colors.white)
- term.write("]")
- for i=1,(x-13)/2,1 do
- term.write("-")
- end
- term.write("+")
- term.setCursorPos(1,2)
- end
- head()
- while true do
- message = read()
- head()
- if message == "spynet retrieve" then
- rednet.broadcast("retrieve","spynet")
- sender,message = rednet.receive("spynet",15)
- if message == nil then
- term.write("Timeout.")
- x,y = term.getCursorPos()
- term.setCursorPos(1,y+1)
- else
- term.write(message)
- x,y = term.getCursorPos()
- term.setCursorPos(1,y+1)
- end
- else
- rednet.broadcast(message,"myprot-exe")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement