summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-27 23:37:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-27 23:37:07 +0300
commit4f83ea8b4fab0f6fc7a136d7ce668160eeeae656 (patch)
tree3b803ec7d1eaa042b361fa058637acc6a102f018
parentfe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6 (diff)
downloadplugin-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.gz
plugin-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.bz2
plugin-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.xz
plugin-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.zip
Allow get npc chat id by variable '.chat'.
-rw-r--r--src/emap/script.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index 95bc5ae..81593dc 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -116,6 +116,12 @@ void escript_set_reg_npc_num(struct script_state* st, struct reg_db *n, int64 *n
nd->ud->state.speed_changed = 1;
hookStop();
}
+ else if (!strcmp(name, ".chat"))
+ {
+ ShowWarning("you cant assign '.chat'.\n");
+ script->reportsrc(st);
+ hookStop();
+ }
}
int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, struct script_data* data)
@@ -170,6 +176,12 @@ int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, stru
hookStop();
return nd->speed;
}
+ else if (!strcmp(name, ".chat"))
+ {
+ getNDReturn(0);
+ hookStop();
+ return nd->chat_id;
+ }
return 0;
}