summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index d61811c..7fe408a 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -3067,6 +3067,46 @@ BUILDIN(debugmes)
}
/*==========================================
+ *
+ *------------------------------------------*/
+BUILDIN(consolewarn)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+
+ if (!script->sprintf_helper(st, 2, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ ShowWarning("script warning : %d %d : %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
+/*==========================================
+ *
+ *------------------------------------------*/
+BUILDIN(consolebug)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+
+ if (!script->sprintf_helper(st, 2, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ ShowError("script error : %d %d : %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
+/*==========================================
* gmcommand [MouseJstr]
*------------------------------------------*/
BUILDIN(atcommand)