Code: Select all
function CWaypointList:getWaypointIndex()
return self.CurrentWaypoint;
end
---
Second question:
In the player profile there is an section to define code when leaving combat:
I tried to use this section in my waypoint script too. But currently without success. Adding code for a specific script to onLeaveCombat in the profile file, is not a viable solution.<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>
What I like to do: if the char is on the way from quest giver to the laby and is being attacked, it should kill the mob. After leaving combat, it should mount it's horse again. Currently I've added a function at each waypoint that checks if being mounted, but this is crude and not like I wanted it to be. Any comments how to do this?