summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 20:20:06 +0000
committerLupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 20:20:06 +0000
commitbe12ec3ffb1632d8f9f7727ae9a17ea137bde375 (patch)
tree821d07f7d405ec9c89010cadac06395ea5ca622b /src/map/script.c
parent3a582ad4976cd2672e22a33cd738346e5e09a9bd (diff)
downloadhercules-be12ec3ffb1632d8f9f7727ae9a17ea137bde375.tar.gz
hercules-be12ec3ffb1632d8f9f7727ae9a17ea137bde375.tar.bz2
hercules-be12ec3ffb1632d8f9f7727ae9a17ea137bde375.tar.xz
hercules-be12ec3ffb1632d8f9f7727ae9a17ea137bde375.zip
Added LOGMES script command
implemented an example: kafra_bank.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@759 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 1bcb118ee..8ffa7d0ea 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -295,6 +295,7 @@ int buildin_checkoption2(struct script_state *st); // [celest]
int buildin_guildgetexp(struct script_state *st); // [celest]
int buildin_skilluseid(struct script_state *st); // originally by Qamera [celest]
int buildin_skillusepos(struct script_state *st); // originally by Qamera [celest]
+int buildin_logmes(struct script_state *st); // [Lupus]
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -511,6 +512,7 @@ struct {
{buildin_skilluseid,"skilluseid","ii"}, // originally by Qamera [Celest]
{buildin_skilluseid,"doskill","ii"}, // since a lot of scripts would already use 'doskill'...
{buildin_skillusepos,"skillusepos","iiii"}, // [Celest]
+ {buildin_logmes,"logmes","s"}, //this command actls as MES but prints info into LOG file either SQL/TXT [Lupus]
{NULL,NULL,NULL},
};
int buildin_message(struct script_state *st); // [MouseJstr]
@@ -6347,6 +6349,18 @@ int buildin_skillusepos(struct script_state *st)
return 0;
}
+/*==========================================
+ * Allows player to write NPC logs (i.e. Bank NPC, etc) [Lupus]
+ *------------------------------------------
+ */
+int buildin_logmes(struct script_state *st)
+{
+ if (log_config.npc <= 0 ) return 0;
+ conv_str(st,& (st->stack->stack_data[st->start+2]));
+ log_npc(script_rid2sd(st),st->stack->stack_data[st->start+2].u.str);
+ return 0;
+}
+
//
// ŽÀs•”main
//