diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-28 15:30:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-28 15:30:33 +0300 |
commit | 7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a (patch) | |
tree | 91dea9fbfe7bd16c272120a813c52b021b1cf1e8 /src/emap/script.c | |
parent | d6cf585005cb59e3b3cebf026b60de42dfebcf6e (diff) | |
download | plugin-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.gz plugin-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.bz2 plugin-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.xz plugin-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.zip |
Allow get/set npc stand state by variable '.stand'.
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 1b6b9f0..72b50c7 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -128,6 +128,13 @@ void escript_set_reg_npc_num(struct script_state* st, struct reg_db *n, int64 *n clif->sitting(&nd->bl); hookStop(); } + else if (!strcmp(name, ".stand")) + { + getND(); + nd->vd->dead_sit = (*val) ? 0 : 2; + clif->sitting(&nd->bl); + hookStop(); + } } int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, struct script_data* data) @@ -194,6 +201,12 @@ int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, stru hookStop(); return nd->vd->dead_sit == 2 ? 1 : 0; } + else if (!strcmp(name, ".stand")) + { + getNDReturn(0); + hookStop(); + return nd->vd->dead_sit == 0 ? 1 : 0; + } return 0; } |