diff options
Diffstat (limited to 'src/emap/script.c')
-rw-r--r-- | src/emap/script.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index 05266d1..6675f78 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -175,10 +175,23 @@ int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, stru void escript_set_reg_npc_str(struct script_state* st, struct reg_db *n, int64 *num, const char* name, const char *str) { + if (!strcmp(name, ".map$")) + { + ShowWarning("you cant assign '.map$'.\n"); + script->reportsrc(st); + hookStop(); + } } char *escript_get_val_npcscope_str(struct script_state* st, struct reg_db *n, struct script_data* data) { + const char *name = reference_getname(data); + if (!strcmp(name, ".map$")) + { + getNDReturn(0); + hookStop(); + return map->list[nd->bl.m].name; + } return NULL; } |