summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-28 15:30:33 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-28 15:30:33 +0300
commit7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a (patch)
tree91dea9fbfe7bd16c272120a813c52b021b1cf1e8 /src
parentd6cf585005cb59e3b3cebf026b60de42dfebcf6e (diff)
downloadevol-hercules-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.gz
evol-hercules-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.bz2
evol-hercules-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.tar.xz
evol-hercules-7218f15b792d6ae2bf88b65f6901ae5aa86ecb7a.zip
Allow get/set npc stand state by variable '.stand'.
Diffstat (limited to 'src')
-rw-r--r--src/emap/script.c13
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;
}