e.g. searching for nearest waypoint, after playing manually for a while.
The onskillcastevent is not so useful it force you to dismount and messes up since is always called.
Maybe the eventmonitor can used for it but I dont know how.
Edit
Following code added to the onload section of a waypoint works well.
Don´t use it in selfcrossing waypoints and demand of continously doing things.
Code: Select all
<onload>
<!--- ......--->
function myResumeCallback()
resumeCallback()
player:updateXYZ();
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));
end
atResume(myResumeCallback) -- sets the resume callback function
</onload>