justync7

hacksmail

Jun 30th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. Server = 154
  2. textutils.slowWrite("Sending ") term.setTextColor(colors.yellow) textutils.slowWrite(Username) term.setTextColor(colors.white) textutils.slowWrite("'s Message...")
  3. print("Name:")
  4. Sender = read()
  5. print("To:")
  6. Username = read()
  7. print("Subject:")
  8. MessageName = read()
  9. print("Message:")
  10. Message = read()
  11. rednet.send(Server, "SendMessage")
  12. os.sleep(0.1)
  13. rednet.send(Server, Username)
  14. os.sleep(0.1)
  15. rednet.send(Server, Sender)
  16. os.sleep(0.1)
  17. rednet.send(Server, MessageName)
  18. os.sleep(0.1)
  19. rednet.send(Server, Message)
  20. ID, Success = rednet.receive(5)
  21. if Success then
  22. if Success == "true" then
  23. term.clear()
  24. term.setCursorPos(1,1)
  25. term.setTextColor(colors.lime)
  26. print("Message Has Been Sent!")
  27. term.setTextColor(colors.yellow)
  28. print("\n(-)Ok")
  29. term.setTextColor(colors.white)
  30. repeat
  31. event, key = os.pullEvent("key")
  32. os.sleep(0.1)
  33. until key == 28
  34. Back()
  35. elseif Success == "false" then
  36. term.clear()
  37. term.setCursorPos(1,1)
  38. term.setTextColor(colors.red)
  39. print("Message Failed To Send!")
  40. print("Make Sure The User Exists And That You Typed A Subject And A Message!")
  41. term.setTextColor(colors.yellow)
  42. print("\n(-)Ok")
  43. term.setTextColor(colors.white)
  44. repeat
  45. event, key = os.pullEvent("key")
  46. os.sleep(0.1)
  47. until key == 28
  48. Back()
  49. end
  50. else
  51. term.setTextColor(colors.red)
  52. print("\nThere Was An Error!\nMake Sure The S-Mail Server Is Turned On!")
  53. term.setTextColor(colors.yellow)
  54. print("\n(-)Ok")
  55. term.setTextColor(colors.white)
  56. repeat
  57. event, key = os.pullEvent("key")
  58. os.sleep(0.1)
  59. until key == 28
  60. Back()
  61. end
Add Comment
Please, Sign In to add comment