Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Server = 154
- textutils.slowWrite("Sending ") term.setTextColor(colors.yellow) textutils.slowWrite(Username) term.setTextColor(colors.white) textutils.slowWrite("'s Message...")
- print("Name:")
- Sender = read()
- print("To:")
- Username = read()
- print("Subject:")
- MessageName = read()
- print("Message:")
- Message = read()
- rednet.send(Server, "SendMessage")
- os.sleep(0.1)
- rednet.send(Server, Username)
- os.sleep(0.1)
- rednet.send(Server, Sender)
- os.sleep(0.1)
- rednet.send(Server, MessageName)
- os.sleep(0.1)
- rednet.send(Server, Message)
- ID, Success = rednet.receive(5)
- if Success then
- if Success == "true" then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.lime)
- print("Message Has Been Sent!")
- term.setTextColor(colors.yellow)
- print("\n(-)Ok")
- term.setTextColor(colors.white)
- repeat
- event, key = os.pullEvent("key")
- os.sleep(0.1)
- until key == 28
- Back()
- elseif Success == "false" then
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("Message Failed To Send!")
- print("Make Sure The User Exists And That You Typed A Subject And A Message!")
- term.setTextColor(colors.yellow)
- print("\n(-)Ok")
- term.setTextColor(colors.white)
- repeat
- event, key = os.pullEvent("key")
- os.sleep(0.1)
- until key == 28
- Back()
- end
- else
- term.setTextColor(colors.red)
- print("\nThere Was An Error!\nMake Sure The S-Mail Server Is Turned On!")
- term.setTextColor(colors.yellow)
- print("\n(-)Ok")
- term.setTextColor(colors.white)
- repeat
- event, key = os.pullEvent("key")
- os.sleep(0.1)
- until key == 28
- Back()
- end
Add Comment
Please, Sign In to add comment