summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 14:55:53 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 14:55:53 -0300
commit177914a338aa2c74656651bfa9ee6f10412b49b4 (patch)
treed7e7e42e997a9a1c70290f6ff87c869eb62008e0
parent4d3a66b4eab50397d6b4ee02b8e2f2b5c00aa527 (diff)
downloadevol-hercules-177914a338aa2c74656651bfa9ee6f10412b49b4.tar.gz
evol-hercules-177914a338aa2c74656651bfa9ee6f10412b49b4.tar.bz2
evol-hercules-177914a338aa2c74656651bfa9ee6f10412b49b4.tar.xz
evol-hercules-177914a338aa2c74656651bfa9ee6f10412b49b4.zip
WONT-FIX
-rw-r--r--src/emap/init.c2
-rw-r--r--src/emap/script_buildins.c20
-rw-r--r--src/emap/script_buildins.h2
3 files changed, 24 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index 0d1efa5..158b82b 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -222,6 +222,8 @@ HPExport void plugin_init (void)
addScriptCommand("getnpcsubtype", "?", getNpcSubtype);
addScriptCommand("kick", "v?", kick);
addScriptCommand("getskillname", "i", getskillname);
+ // Overrides
+ addScriptCommand("debugmes","v*",debugmes);
do_init_langs();
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 263e3a6..a86b0ea 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -2687,3 +2687,23 @@ BUILDIN(getskillname)
return true;
}
+/*==========================================
+ *
+ *------------------------------------------*/
+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 ea77fdb..1b1c2df 100644
--- a/src/emap/script_buildins.h
+++ b/src/emap/script_buildins.h
@@ -107,5 +107,7 @@ BUILDIN(getNpcSubtype);
BUILDIN(kick);
BUILDIN(getCraftRecipe);
BUILDIN(getskillname);
+// Overrides
+BUILDIN(debugmes);
#endif // EVOL_MAP_SCRIPT_BUILDINS