summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am4
-rw-r--r--src/map/dummy.c2
-rw-r--r--src/map/init.c6
-rw-r--r--src/map/script.c22
-rw-r--r--src/map/script.h9
5 files changed, 37 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 1bd1756..5582456 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,9 @@ AUTOMAKE_OPTIONS = subdir-objects
MAP_SRC = map/dummy.c \
map/dummy.h \
- map/init.c
+ map/init.c \
+ map/script.c \
+ map/script.h
lib_LTLIBRARIES = libevol_map.la
libevol_map_la_SOURCES = ${MAP_SRC}
diff --git a/src/map/dummy.c b/src/map/dummy.c
index 0541d53..ae579b7 100644
--- a/src/map/dummy.c
+++ b/src/map/dummy.c
@@ -14,8 +14,6 @@
#include "../../../map/pc.h"
#include "../../../map/script.h"
-//#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
-
void showNotImplimented()
{
ShowWarning("Not implimented\n");
diff --git a/src/map/init.c b/src/map/init.c
index 9d840a4..8c65efe 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -15,12 +15,13 @@
#include "../../../map/script.h"
#include "map/dummy.h"
+#include "map/script.h"
#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
HPExport struct hplugin_info pinfo =
{
- "evoldummy",
+ "evol_map",
SERVER_TYPE_MAP,
"0.1",
HPM_VERSION
@@ -48,8 +49,7 @@ HPExport void plugin_init (void) {
// addScriptCommand("mesn", "*", dummy);
// addScriptCommand("mesq", "s*", dummy);
// addScriptCommand("g", "ss", dummyStr);
- addScriptCommand("l", "s*", dummyStr);
- // must be ss
+ addScriptCommand("l", "s*", l);
addScriptCommand("lg", "s*", dummyStr);
addScriptCommand("getlang", "*", dummyStr);
addScriptCommand("setlang", "i", dummy);
diff --git a/src/map/script.c b/src/map/script.c
new file mode 100644
index 0000000..0ad7d48
--- /dev/null
+++ b/src/map/script.c
@@ -0,0 +1,22 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 Evol developers
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../../../common/HPMi.h"
+#include "../../../common/malloc.h"
+#include "../../../common/mmo.h"
+#include "../../../common/socket.h"
+#include "../../../common/strlib.h"
+#include "../../../map/clif.h"
+#include "../../../map/pc.h"
+#include "../../../map/script.h"
+
+BUILDIN(l)
+{
+ // for now not translate and not use format parameters
+ script_pushstr(st, strdup(script_getstr(st, 2)));
+ return true;
+}
diff --git a/src/map/script.h b/src/map/script.h
new file mode 100644
index 0000000..e5c0bbd
--- /dev/null
+++ b/src/map/script.h
@@ -0,0 +1,9 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 Evol developers
+
+#ifndef EVOL_MAP_SCRIPT
+#define EVOL_MAP_SCRIPT
+
+BUILDIN(l);
+
+#endif // EVOL_MAP_SCRIPT