Page 1 of 1

doesn't skip waypoint anymore

Posted: Sat Jan 22, 2011 10:33 am
by lisa
It might be just me but running a char on a new WP, it isn't skipping any waypoints, ever. It will run to a mob, turn round and go back to the last waypoint and then turn again and continue on even though there were 2 waypoints between the dead mob and the waypoint it walked back to.

If it is just me, any settings I might have messed up to make it not skip anymore?
Looks far to unnatural.

Re: doesn't skip waypoint anymore

Posted: Sat Jan 22, 2011 1:56 pm
by Administrator
Try this in your onLeaveCombat event:

Code: Select all

<![CDATA[
local nwp = __WPL:getNearestWaypoint();
local cwp = __WPL.CurrentWaypoint;

if( math.abs(nwp - cwp) < 3 ) then
 -- Within 2 waypoints, allow update
  __WPL:setWaypointIndex(nwp);
elseif( nwp < 3 and cwp > math.abs(#__WPL.Waypoints - 2) ) then
  -- Within 2 waypoints, but looping around to the beginning.
  __WPL:setWaypointIndex(nwp);
end
]]>

Re: doesn't skip waypoint anymore

Posted: Sat Jan 22, 2011 8:48 pm
by lisa
Keeps returning this error.

Code: Select all

nil value passed to distance()
I even commented out all but

Code: Select all

 local nwp = __WPL:getNearestWaypoint();
and it still returned same error, which I find odd as it is just setting a string?

Re: doesn't skip waypoint anymore

Posted: Sat Jan 22, 2011 10:25 pm
by rock5
Logically getNearestWaypoint should default to getting the nearest waypoint to the player, but it doesn't. This should work

Code: Select all

local nwp = __WPL:getNearestWaypoint(player.X, player.Z);

Re: doesn't skip waypoint anymore

Posted: Sat Jan 22, 2011 10:45 pm
by lisa
No errors anymore =)

Need to test it out more, first glance it does set to go to a different waypoint, trouble is it is now saying it is skipping that waypoint. So maybe it is doing the skip thing again now, lol, I need to test this more.