diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/emap/script.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index 81593dc..1b6b9f0 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -110,7 +110,6 @@ void escript_set_reg_npc_num(struct script_state* st, struct reg_db *n, int64 *n else if (!strcmp(name, ".speed")) { getND(); - unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit nd->speed = *val; nd->ud->state.speed_changed = 1; @@ -122,6 +121,13 @@ void escript_set_reg_npc_num(struct script_state* st, struct reg_db *n, int64 *n script->reportsrc(st); hookStop(); } + else if (!strcmp(name, ".sit")) + { + getND(); + nd->vd->dead_sit = (*val) ? 2 : 0; + clif->sitting(&nd->bl); + hookStop(); + } } int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, struct script_data* data) @@ -182,6 +188,12 @@ int escript_get_val_npcscope_num(struct script_state* st, struct reg_db *n, stru hookStop(); return nd->chat_id; } + else if (!strcmp(name, ".sit")) + { + getNDReturn(0); + hookStop(); + return nd->vd->dead_sit == 2 ? 1 : 0; + } return 0; } |