From 4f83ea8b4fab0f6fc7a136d7ce668160eeeae656 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Sep 2015 23:37:07 +0300 Subject: Allow get npc chat id by variable '.chat'. --- src/emap/script.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/emap/script.c') 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; } -- cgit v1.2.3-70-g09d2