Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- local function makeMailString(sDst,sMsg)
- local res = "#|#$MAIL#|#"..sDst.."#|#"..os.getComputerID().."#|#"..sMsg.."#|#"
- return res
- end -- end makeMailString
- print("Type your message here:")
- local msg = read()
- print("")
- print("Destination Computer ID:")
- local dst = read()
- print("")
- print("")
- print("Message: "..msg)
- print("Destination: "..dst)
- sMail = makeMailString(dst,msg)
- print(sMail)
- rednet.send(iServerID,sMail)
- local a,b,c = rednet.receive("10")
- if b~=nil then
- local header,d,e,msg = split(b)
- if (header == "$REPLY") and (msg == "mail got") then
- print("mail sent")
- end
- else
- print("Connection timeout, try again later")
- end
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement