Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- id = 12
- x = nil
- y = nil
- z = 0
- term.setCursorPos(1,1)
- print("Searching")
- function Clear()
- rednet.broadcast("/clear")
- timer = 5
- repeat
- term.setCursorPos(10,10)
- print("Screen clearing in "..timer)
- timer = timer - 1
- sleep(1)
- until
- timer == 0
- shell.run("clear")
- print("Searching")
- end
- function Pos()
- x,y = term.getCursorPos()
- end
- function Send()
- Pos()
- input = read()
- rednet.broadcast(""..input)
- term.setCursorPos(x,y)
- print(id..": "..input)
- end
- function Search()
- rednet.open("top")
- a,b = rednet.receive()
- Filter()
- end
- function Filter()
- if b == "/clear" then
- Clear() else
- print(a..": "..b)
- end
- end
- repeat
- parallel.waitForAny(Search ,Send)
- until
- z == nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement