summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 9de888e31..0e4144605 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -39,6 +39,7 @@
#include "unit.h"
#include "irc.h"
#include "pet.h"
+#include "mail.h"
#include "script.h"
#include <stdio.h>
@@ -4052,6 +4053,10 @@ BUILDIN_FUNC(getmonsterinfo); // [Lupus]
BUILDIN_FUNC(checkvending); // check vending [Nab4]
BUILDIN_FUNC(checkchatting); // check chatting [Marka]
+#ifndef TXT_ONLY
+BUILDIN_FUNC(openmail); // [Mail System]
+#endif
+
#ifdef PCRE_SUPPORT
BUILDIN_FUNC(defpattern); // MouseJstr
BUILDIN_FUNC(activatepset); // MouseJstr
@@ -4390,6 +4395,9 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(roclass,"i*"), //[Skotlex]
BUILDIN_DEF(checkvending,"*"),
BUILDIN_DEF(checkchatting,"*"),
+#ifndef TXT_ONLY
+ BUILDIN_DEF(openmail,""),
+#endif
{NULL,NULL,NULL},
};
@@ -13446,3 +13454,11 @@ BUILDIN_FUNC(warpportal)
return 0;
}
+
+#ifndef TXT_ONLY
+BUILDIN_FUNC(openmail)
+{
+ mail_openmail(script_rid2sd(st));
+ return 0;
+}
+#endif