summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-09-20 20:15:51 -0300
committerJesusaves <cpntb1@ymail.com>2021-09-20 20:15:51 -0300
commit50842b7eecde5d0f0152256f07d6504d557a699b (patch)
tree718c62c6e70ac5f2867c0887d22086cf31756111 /src
parent501d7834ba0bc674cb38e7e3bdcde6483352052f (diff)
downloadevol-hercules-50842b7eecde5d0f0152256f07d6504d557a699b.tar.gz
evol-hercules-50842b7eecde5d0f0152256f07d6504d557a699b.tar.bz2
evol-hercules-50842b7eecde5d0f0152256f07d6504d557a699b.tar.xz
evol-hercules-50842b7eecde5d0f0152256f07d6504d557a699b.zip
I'll need notice capability too
Diffstat (limited to 'src')
-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 efad185..7355a7a 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -248,6 +248,7 @@ HPExport void plugin_init (void)
addScriptCommand("debugmes","v*",debugmes);
addScriptCommand("consolewarn","v*",consolewarn);
addScriptCommand("consolebug","v*",consolebug);
+ addScriptCommand("consoleinfo","v*",consoleinfo);
addScriptCommand("countitem","v?",countitem);
addScriptCommand("atcommand","s",atcommand);
addScriptCommand("getinventorylist","",getinventorylist);
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 7fe408a..0163a6a 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -3107,6 +3107,26 @@ BUILDIN(consolebug)
}
/*==========================================
+ *
+ *------------------------------------------*/
+BUILDIN(consoleinfo)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+
+ if (!script->sprintf_helper(st, 2, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ ShowNotice("script notice : %d %d : %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
+/*==========================================
* gmcommand [MouseJstr]
*------------------------------------------*/
BUILDIN(atcommand)
diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h
index 183f21e..740645d 100644
--- a/src/emap/script_buildins.h
+++ b/src/emap/script_buildins.h
@@ -133,6 +133,7 @@ BUILDIN(countitem);
BUILDIN(debugmes);
BUILDIN(consolewarn);
BUILDIN(consolebug);
+BUILDIN(consoleinfo);
BUILDIN(atcommand);
BUILDIN(getinventorylist);