Page 1 of 1

__WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 1:44 pm
by raff
Hi,
it has been a while, since the last time, I used this bot.

I started yesterday again and made some quest profiles, but unfortunately

Code: Select all

__WPL:setWaypointIndex(1)
seems not working for me.

I tried in my waypoint file:

Code: Select all

<waypoints type="TRAVEL" >
<onLoad>
     __WPL:setWaypointIndex(1);
</onLoad>
...
</waypoints>
and this in my previous waypoint file:

Code: Select all

if RoMScript("igf_questStatus('Kobold Mutation')") == "complete" then
loadPaths("kobold_finish_1.xml");
__WPL:setWaypointIndex(1);
end
but both methods don't work for me

Code: Select all

Loaded waypoint path kobold_finish_1.xml
Waypoint #52 is closer then #1. Hence we start with waypoint #52.
No return path with default naming kobold_finish_1_return.xml found.
We use the normal waypoint path kobold_finish_1.xml now.
Equipment update took: 1
Moving to waypoint #52, (-3210, -3890)

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 8:01 pm
by rock5
There was another post about this;

Code: Select all

<waypoints type="TRAVEL" >
<onLoad>
     __WPL:setWaypointIndex(1);
</onLoad>
...
</waypoints>
and Administrator made some changes so this should work(rev 492). I'm assuming the output is for your second example. What happens when you run this version?

Another possibility is if you updated your bot after a long time it may not have merged properly. Try right-clicking the 'rom' folder and selecting 'TortoiseSVN/Revert'.

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 8:17 pm
by Alkaiser
I attempted this method before and it didn't work for me either.

The

Code: Select all

<onLoad>
     __WPL:setWaypointIndex(1);
</onLoad>
was ignored... and the nearest waypoint was selected as per default behavior.

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 9:32 pm
by rock5
After following the code it looks like the fix was for the profile onLoad event. So if you put __WPL:setWaypointIndex(1) in your profiles onLoad event it should work. But obviously this is not what we are after.

I'll see what i can do.

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 9:49 pm
by rock5
Fixed in rev 525.

Ended up being a simple 1 line change. It now finds the nearest point before running the onload event so it gets overwritten.

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Tue Nov 23, 2010 10:22 pm
by Alkaiser
That's great! Thanks!

Re: __WPL:setWaypointIndex(1) not longer working?

Posted: Wed Nov 24, 2010 10:12 am
by raff
Thanks for the fix :)

but I must confess, the first method

Code: Select all

if RoMScript("igf_questStatus('Kobold Mutation')") == "complete" then
loadPaths("kobold_finish_1.xml");
__WPL:setWaypointIndex(1);
end
is working, I was so stupid and had in the previous waypoint only

Code: Select all

loadPaths("kobold_finish_1.xml");
*shame*