FR_MailSystem.c 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
  2. //( (c)2005 RagMods Modification Team presents )
  3. //( ______ __ __ )
  4. //( /\ _ \/\ \__/\ \ v 1.00.00 )
  5. //( __\ \ \_\ \ \ ,_\ \ \___ __ ___ __ )
  6. //( /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ )
  7. //( /\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \_\.\_ )
  8. //( \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ )
  9. //( \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ )
  10. //( )
  11. //( -- [s] [c] [r] [i] [p] [t] [s] -- )
  12. //( _ _ _ _ _ _ _ _ _ _ _ _ _ )
  13. //( / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ )
  14. //( ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) )
  15. //( \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ )
  16. //( )
  17. //( Advanced Fusion Maps (c) 2003-2005 The Fusion Project )
  18. //(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
  19. //===== eAthena Script ======================================
  20. //= Mail System (using built in mail function)
  21. //===========================================================
  22. //===== By ==================================================
  23. //= [Lance]
  24. //===== Version =============================================
  25. //= 1.0
  26. //===== Compatible With =====================================
  27. //= Any flavours of Athena SQL
  28. //===== Description =========================================
  29. //= Allows players to send and receive mails without GM lvl.
  30. //===== Comments ============================================
  31. //= 1.0 - Initial release [Lance]
  32. //===========================================================
  33. prontera,143,171,3 script Messenger 738,1,1,{
  34. mes "[Messenger Deviruchi]";
  35. mes "Hiya! I'm the fastest messenger in Rune Midgard!";
  36. next;
  37. mes "[Messenger Deviruchi]";
  38. mes "I can send your friends messages even if he or she is offline!";
  39. next;
  40. mes "[Messenger Deviruchi]";
  41. mes "Wanna try?";
  42. menu "Yes", MENUSYS, "No", -;
  43. close;
  44. MENUSYS:
  45. next;
  46. mes "[Messenger Deviruchi]";
  47. mes "What can I do for ya?";
  48. emotion e_what;
  49. menu "Check Mail",L_CHECK,"Send Mail",L_SEND, "Leave", -;
  50. next;
  51. mes "[Messenger Deviruchi]";
  52. mes "Do come again!";
  53. emotion e_no1;
  54. close;
  55. L_CHECK:
  56. atcommand strcharinfo(0) + ":@listnewmail";
  57. menu "Read Mail", L_READ, "Check All Mails",CHKALLMAIL,"Send Mail",L_SEND, "Delete Mail", DELMAIL, "Back", MENUSYS;
  58. close;
  59. CHKALLMAIL:
  60. atcommand strcharinfo(0) + ":@listmail";
  61. menu "Read Mail", L_READ, "Delete Mail", DELMAIL, "Back", MENUSYS;
  62. close;
  63. L_READ:
  64. next;
  65. mes "[Messenger Deviruchi]";
  66. mes "Please tell me the message number you want to read.";
  67. input @msgnum;
  68. next;
  69. mes "[Messenger Deviruchi]";
  70. mes "Here it is!";
  71. emotion e_no1;
  72. atcommand strcharinfo(0) + ":@readmail " + @msgnum;
  73. menu "Reply Mail", L_SEND, "Back", MENUSYS;
  74. close;
  75. L_SEND:
  76. next;
  77. mes "[Messenger Deviruchi]";
  78. mes "Who do you want to send this message to?";
  79. input @rcpt$;
  80. next;
  81. mes "[Messenger Deviruchi]";
  82. mes "What message do you want to send to him?";
  83. input @body$;
  84. next;
  85. atcommand strcharinfo(0) + ":@sendmail " + @rcpt$ + " " + @body$;
  86. mes "[Messenger Deviruchi]";
  87. mes "All done!";
  88. emotion e_no1;
  89. menu "Send another mail", L_SEND, "Back", MENUSYS;
  90. close;
  91. DELMAIL:
  92. next;
  93. mes "[Messenger Deviruchi]";
  94. mes "Which message number do you want me to delete?";
  95. input @msgnum;
  96. next;
  97. mes "[Messenger Deviruchi]";
  98. mes "Are you sure you want to delete mail no. " + @msgnum + "?";
  99. menu "Yes",-,"No",DELMAIL, "Back", MENUSYS;
  100. atcommand strcharinfo(0) + ":@deletemail " + @msgnum;
  101. mes "[Messenger Deviruchi]";
  102. mes "All done!";
  103. emotion e_no1;
  104. menu "Delete another mail", DELMAIL, "Back", MENUSYS;
  105. close;
  106. OnTouch:
  107. npctalk "Relax.. I'm no bad guy..";
  108. emotion e_heh;
  109. end;
  110. }