From 95892027052d6123805a16e12dbd12ec44d3b85d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 14 Mar 2014 14:32:07 -0300 Subject: 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 --- src/map/script.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/script.c') 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(,,) -> -/// unitwalk(,) -> +/// unitwalk(,) -> 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; -- cgit v1.2.3-70-g09d2