Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- shell.run"clear"
- shell.run"id"
- exit = 0
- while exit == 0 do
- id, idToSend = rednet.receive()
- print("Id de l'ordinateur destinataire r�ceptionn�e")
- print("L'ordinateur destinataire a l'id :")
- write(idToSend)
- print(" ")
- msgVerification = 0
- idToSend1 = tonumber(idToSend)
- if idToSend == "9" then
- print("Message au serveur r�ceptionn�")
- id, msg = rednet.receive()
- if msg == "p" then
- id, msg1 = rednet.receive()
- id, msg2 = rednet.receive()
- shell.run(msg1, msg2)
- elseif msg == "f" then
- id, msg1 = rednet.receive()
- loadstring(msg1) ()
- elseif msg == "exit" then
- shell.run("clear")
- rednet.close("right")
- return
- end
- else
- id, msgType = rednet.receive()
- id, msgCommande = rednet.receive()
- print("Message r�ceptionn�")
- while msgVerification == 0 do
- rednet.send(idToSend1, msgType)
- rednet.send(idToSend1, msgCommande)
- if msgType == "p" then
- id, msgArg = rednet.receive()
- rednet.send(idToSend1, msgArg)
- end
- id, msgVerification = rednet.receive(4)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment