diff options
author | shennetsind <ind@henn.et> | 2014-03-14 14:32:07 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-03-14 14:32:07 -0300 |
commit | 95892027052d6123805a16e12dbd12ec44d3b85d (patch) | |
tree | 30c50151d6273f26feeb6153a66e4bb783b4ffc2 /src/map/script.c | |
parent | 1007d606645c16d5246761976b7648809edb8b1d (diff) | |
download | hercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.gz hercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.bz2 hercules-95892027052d6123805a16e12dbd12ec44d3b85d.tar.xz hercules-95892027052d6123805a16e12dbd12ec44d3b85d.zip |
Follow up 1007d606645c16d5246761976b7648809edb8b1d
A bonus. Fixed unitwalk's non-x/y possibility, NPCs can now be set to chase players around for as long as they keep walking, which opens a number of possibilities e.g. help npc y get thru z.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index fca87a81d..63b76e35b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -15308,11 +15308,11 @@ BUILDIN(pcstopfollow) // [zBuffer] List of mob control commands ---> //## TODO always return if the request/whatever was successfull [FlavioJS] -/// Makes the unit walk to target position or map +/// Makes the unit walk to target position or target id /// Returns if it was successfull /// /// unitwalk(<unit_id>,<x>,<y>) -> <bool> -/// unitwalk(<unit_id>,<map_id>) -> <bool> +/// unitwalk(<unit_id>,<target_id>) -> <bool> BUILDIN(unitwalk) { struct block_list* bl; @@ -15330,8 +15330,8 @@ BUILDIN(unitwalk) { int y = script_getnum(st,4); script_pushint(st, unit->walktoxy(bl,x,y,0));// We'll use harder calculations. } else { - int map_id = script_getnum(st,3); - script_pushint(st, unit->walktobl(bl,map->id2bl(map_id),65025,1)); + int target_id = script_getnum(st,3); + script_pushint(st, unit->walktobl(bl,map->id2bl(target_id),1,1)); } return true; |