summaryrefslogtreecommitdiff
path: root/npc/custom/Lance/FR_MailSystem.txt
blob: e6b93116792d504fac439cd06d699ed888bd8c99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//===== rAthena Script =======================================
//= Custom Mail System
//===== By: ==================================================
//= Lance
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena SVN; prior to new Mail System
//===== Description: =========================================
//= Allows players to send and receive mails without GM lvl.
//===== Additional Comments: =================================
//= 1.0 - Initial release                             [Lance]
//============================================================

prontera,143,171,3	script	Messenger	738,1,1,{
	mes "[Messenger Deviruchi]";
	mes "Hiya! I'm the fastest messenger in Rune Midgard!";
	next;
	mes "[Messenger Deviruchi]";
	mes "I can send your friends messages even if he or she is offline!";
	next;
	mes "[Messenger Deviruchi]";
	mes "Wanna try?";
	menu "Yes", MENUSYS, "No", -;
	close;

MENUSYS:
	next;
	mes "[Messenger Deviruchi]";
	mes "What can I do for ya?";
	emotion e_what;
	menu "Check Mail",L_CHECK,"Send Mail",L_SEND, "Leave", -;
	next;
	mes "[Messenger Deviruchi]";
	mes "Do come again!";
	emotion e_no1;
	close;

L_CHECK:
	atcommand strcharinfo(0) + ":@listnewmail";
	menu "Read Mail", L_READ, "Check All Mails",CHKALLMAIL,"Send Mail",L_SEND, "Delete Mail", DELMAIL, "Back", MENUSYS;
	close;

CHKALLMAIL:
	atcommand strcharinfo(0) + ":@listmail";
	menu "Read Mail", L_READ, "Delete Mail", DELMAIL, "Back", MENUSYS;
	close;

L_READ:
	next;
	mes "[Messenger Deviruchi]";
	mes "Please tell me the message number you want to read.";
	input @msgnum;
	next;
	mes "[Messenger Deviruchi]";
	mes "Here it is!";
	emotion e_no1;
	atcommand strcharinfo(0) + ":@readmail " + @msgnum;
	menu "Reply Mail", L_SEND, "Back", MENUSYS;
	close;

L_SEND:
	next;
	mes "[Messenger Deviruchi]";
	mes "Who do you want to send this message to?";
	input @rcpt$;
	next;
	mes "[Messenger Deviruchi]";
	mes "What message do you want to send to him?";
	input @body$;
	next;
	atcommand strcharinfo(0) + ":@sendmail " + @rcpt$ + " " + @body$;
	mes "[Messenger Deviruchi]";
	mes "All done!";
	emotion e_no1;
	menu "Send another mail", L_SEND, "Back", MENUSYS;
	close;

DELMAIL:
	next;
	mes "[Messenger Deviruchi]";
	mes "Which message number do you want me to delete?";
	input @msgnum;
	next;
	mes "[Messenger Deviruchi]";
	mes "Are you sure you want to delete mail no. " + @msgnum + "?";
	menu "Yes",-,"No",DELMAIL, "Back", MENUSYS;
	atcommand strcharinfo(0) + ":@deletemail " + @msgnum;
	mes "[Messenger Deviruchi]";
	mes "All done!";
	emotion e_no1;
	menu "Delete another mail", DELMAIL, "Back", MENUSYS;
	close;

OnTouch:
	npctalk "Relax.. I'm no bad guy..";
	emotion e_heh;
	end;
}