diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index e7a3df4..51e5818 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -24,8 +24,10 @@ #include "map/scriptdefines.h" #include "map/send.h" #include "map/data/mapd.h" +#include "map/data/npcd.h" #include "map/data/session.h" #include "map/struct/mapdext.h" +#include "map/struct/npcdext.h" #include "map/struct/sessionext.h" #include "map/utils/formatutils.h" @@ -648,3 +650,17 @@ BUILDIN(getPcSit) script_pushint(st, pc_issit (sd)); return true; } + +BUILDIN(setNpcDistance) +{ + struct npc_data *nd = (struct npc_data *) map->id2bl (st->oid); + if (!nd) + return false; + + struct NpcdExt *data = npcd_get(nd); + if (!data) + return false; + + data->areaSize = script_getnum(st, 2); + return true; +} |