Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ip
- function startup()
- term.clear()
- term.setCursorPos(1,1)
- print("Please Type The ID Of The Computer That your Connecting To: ")
- ip = tonumber(read())
- print("Starting to Connect")
- sleep(1)
- print(".")
- sleep(1)
- print(".")
- sleep(1)
- print(".")
- sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- print("Connected -------- Info: ID: ",ip)
- term.setCursorPos(1,17)
- print("----------------------------IanChatBeta0.2---------")
- end
- function S()
- rednet.open("back")
- msg = io.read()
- term.setCursorPos(1,18)
- rednet.send(ip, msg)
- print(" ")
- term.setCursorPos(1,18)
- end
- function R()
- rednet.open("back")
- id, message, Distance = rednet.receive()
- term.setCursorPos(1,2)
- print(" ")
- term.setCursorPos(1,3)
- print(" ")
- term.setCursorPos(1,4)
- print(" ")
- term.setCursorPos(1,5)
- print(" ")
- term.setCursorPos(1,2)
- print ("Computer ",id," Distance ", Distance, ": ",message)
- term.setCursorPos(1,18)
- end
- startup()
- while true do
- parallel.waitForAny(S, R)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement