Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- table = {"BTSHello", "Orange"}
- idT = {}
- while true do
- event, id, txt, dis = os.pullEvent("rednet_message")
- print("odebrano")
- if txt == "HelloBTS" then
- --rednet.send(id, "test")
- rednet.send(id, textutils.serialize(table))
- print("wyslano")
- elseif txt == "connectBTS" then
- rednet.send(id, "true")
- a = "true"
- for i=1, #idT do
- if id == idT[1] then
- a = "false"
- end
- end
- if a == "true" then
- idT[#idT+1] = id
- end
- print("potwierdzono")
- else
- for i=1, #idT do
- if idT[i] == id then
- else
- rednet.send(idT[i], txt)
- print("Poszlo w pizdu")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement