diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-05 17:05:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-05 17:05:17 +0300 |
commit | 61205395749c082a9b5e607012504c98d9cdfbd4 (patch) | |
tree | b18afda56844d49f6c346c9dba69369e1af0a2ae | |
parent | 0c0477399f132ac37a8dc07f86bb88b098502278 (diff) | |
download | evol-hercules-61205395749c082a9b5e607012504c98d9cdfbd4.tar.gz evol-hercules-61205395749c082a9b5e607012504c98d9cdfbd4.tar.bz2 evol-hercules-61205395749c082a9b5e607012504c98d9cdfbd4.tar.xz evol-hercules-61205395749c082a9b5e607012504c98d9cdfbd4.zip |
Impliment limited script function l.
without translations for now.
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/map/dummy.c | 2 | ||||
-rw-r--r-- | src/map/init.c | 6 | ||||
-rw-r--r-- | src/map/script.c | 22 | ||||
-rw-r--r-- | src/map/script.h | 9 |
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 |