summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-04 01:18:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-16 22:25:17 +0300
commit058dabd69eb190f507e56747e5f25f68b935ec69 (patch)
treed4fec81036aa282c2a3a87230e3e84fdf99eeedf /src
parent5736970973fefa2a1e10a1847c9bb12bd2cb0719 (diff)
downloadhercules-058dabd69eb190f507e56747e5f25f68b935ec69.tar.gz
hercules-058dabd69eb190f507e56747e5f25f68b935ec69.tar.bz2
hercules-058dabd69eb190f507e56747e5f25f68b935ec69.tar.xz
hercules-058dabd69eb190f507e56747e5f25f68b935ec69.zip
Add script command to set npc click/activate instance.
New script command: setnpcdistance N Where N is distance in tiles from where npc can be clicked. Add setnpcdistance into docs.
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a458bab49..5be4347ec 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13311,6 +13311,16 @@ BUILDIN(npcstop) {
return true;
}
+BUILDIN(setnpcdistance) {
+ struct npc_data *nd = (struct npc_data *) map->id2bl (st->oid);
+ if (!nd)
+ return false;
+
+ nd->area_size = script_getnum(st, 2);
+
+ return true;
+}
+
/*==========================================
* getlook char info. getlook(arg)
@@ -19378,6 +19388,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(npcspeed,"i"), // [Valaris]
BUILDIN_DEF(npcwalkto,"ii"), // [Valaris]
BUILDIN_DEF(npcstop,""), // [Valaris]
+ BUILDIN_DEF(setnpcdistance,"i"), // [4144]
BUILDIN_DEF(getmapxy,"rrri?"), //by Lorky [Lupus]
BUILDIN_DEF(checkoption1,"i"),
BUILDIN_DEF(checkoption2,"i"),