diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-27 23:37:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-27 23:37:07 +0300 |
commit | 4f83ea8b4fab0f6fc7a136d7ce668160eeeae656 (patch) | |
tree | 3b803ec7d1eaa042b361fa058637acc6a102f018 /src/emap/script.c | |
parent | fe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6 (diff) | |
download | evol-hercules-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.gz evol-hercules-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.bz2 evol-hercules-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.tar.xz evol-hercules-4f83ea8b4fab0f6fc7a136d7ce668160eeeae656.zip |
Allow get npc chat id by variable '.chat'.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r-- | src/emap/script.c | 12 |
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; } |