root/npc/custom/Lance/FR_MailSystem.c @ 25

Revision 1, 4.0 kB (checked in by jinshiro, 17 years ago)
Line 
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//===========================================================
33prontera,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
45MENUSYS:
46        next;
47        mes "[Messenger Deviruchi]";
48        mes "What can I do for ya?";
49        emotion e_what;
50        menu "Check Mail",L_CHECK,"Send Mail",L_SEND, "Leave", -;
51        next;
52        mes "[Messenger Deviruchi]";
53        mes "Do come again!";
54        emotion e_no1;
55        close;
56
57L_CHECK:
58        atcommand strcharinfo(0) + ":@listnewmail";
59        menu "Read Mail", L_READ, "Check All Mails",CHKALLMAIL,"Send Mail",L_SEND, "Delete Mail", DELMAIL, "Back", MENUSYS;
60        close;
61
62CHKALLMAIL:
63        atcommand strcharinfo(0) + ":@listmail";
64        menu "Read Mail", L_READ, "Delete Mail", DELMAIL, "Back", MENUSYS;
65        close;
66
67L_READ:
68        next;
69        mes "[Messenger Deviruchi]";
70        mes "Please tell me the message number you want to read.";
71        input @msgnum;
72        next;
73        mes "[Messenger Deviruchi]";
74        mes "Here it is!";
75        emotion e_no1;
76        atcommand strcharinfo(0) + ":@readmail " + @msgnum;
77        menu "Reply Mail", L_SEND, "Back", MENUSYS;
78        close;
79
80L_SEND:
81        next;
82        mes "[Messenger Deviruchi]";
83        mes "Who do you want to send this message to?";
84        input @rcpt$;
85        next;
86        mes "[Messenger Deviruchi]";
87        mes "What message do you want to send to him?";
88        input @body$;
89        next;
90        atcommand strcharinfo(0) + ":@sendmail " + @rcpt$ + " " + @body$;
91        mes "[Messenger Deviruchi]";
92        mes "All done!";
93        emotion e_no1;
94        menu "Send another mail", L_SEND, "Back", MENUSYS;
95        close;
96
97DELMAIL:
98        next;
99        mes "[Messenger Deviruchi]";
100        mes "Which message number do you want me to delete?";
101        input @msgnum;
102        next;
103        mes "[Messenger Deviruchi]";
104        mes "Are you sure you want to delete mail no. " + @msgnum + "?";
105        menu "Yes",-,"No",DELMAIL, "Back", MENUSYS;
106        atcommand strcharinfo(0) + ":@deletemail " + @msgnum;
107        mes "[Messenger Deviruchi]";
108        mes "All done!";
109
110        emotion e_no1;
111        menu "Delete another mail", DELMAIL, "Back", MENUSYS;
112        close;
113
114OnTouch:
115        npctalk "Relax.. I'm no bad guy..";
116        emotion e_heh;
117        end;
118}
Note: See TracBrowser for help on using the browser.