summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-14 18:39:55 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-14 18:39:55 -0300
commitab958499730abfe9318f1312effb65775efafd89 (patch)
tree4db76c0facef5639ba4bff6b878a1f27c06eddd2
parente3a5e3a50314e19e0fc85659bf0fedee6a9ac71e (diff)
downloadevol-hercules-ab958499730abfe9318f1312effb65775efafd89.tar.gz
evol-hercules-ab958499730abfe9318f1312effb65775efafd89.tar.bz2
evol-hercules-ab958499730abfe9318f1312effb65775efafd89.tar.xz
evol-hercules-ab958499730abfe9318f1312effb65775efafd89.zip
Force debugmes to don't be deprecated. I'm not going to change that on ML. Dot.
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/script_buildins.c20
-rw-r--r--src/emap/script_buildins.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index 2c85e39..de27f2c 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -225,6 +225,7 @@ HPExport void plugin_init (void)
addScriptCommand("homstatus","",homstatus);
addScriptCommand("readparam2","i?",readparam2);
addScriptCommand("npcshopattach","s?",npcshopattach);
+ addScriptCommand("debugmes","v*",debugmes);
do_init_langs();
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 26a2dd4..de5ba06 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -2729,3 +2729,23 @@ BUILDIN(readparam2)
return true;
}
+/*==========================================
+ *
+ *------------------------------------------*/
+static BUILDIN(debugmes)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+
+ if (!script->sprintf_helper(st, 2, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ ShowDebug("script debug : %d %d : %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h
index 04da908..8c29632 100644
--- a/src/emap/script_buildins.h
+++ b/src/emap/script_buildins.h
@@ -114,5 +114,6 @@ BUILDIN(deployhomunculus);
BUILDIN(recallhomunculus);
BUILDIN(homstatus);
BUILDIN(readparam2);
+BUILDIN(debugmes);
#endif // EVOL_MAP_SCRIPT_BUILDINS