1. Hello collegues,

    I am trying to ascertain via the API and Events to ascertain the zones a charactare has visted or still must visit. Og´f course it would be easy for a new character to track the visited zones via GetMapZones and Get CurrentMapZone and the respective Events, but how to you find out the already visited zones of a character which is not new (i.e. someone who is using the addon on an already existing character.

    Any ideas would be appreciated....

    Andy W.

     

     

    Hello collegues,

    I am trying to ascertain via the API and Events to ascertain the zones a charactare has visted or still must visit. Og´f course it would be easy for a new character to track the visited zones via GetMapZones and Get CurrentMapZone and the respective Events, but how to you find out the already visited zones of a character which is not new (i.e. someone who is using the addon on an already existing character.

    Any ideas would be appreciated....

    Andy W.

     

     

    Well it depends what you are trying to accomplish.  If you're looking to see what the user needs to still complete in order to get the achievement to fully explore each zone, you can get that information from the achievements API, or possibly through the POIs that are available on each map.  If you could explain what you are trying to do, that would allow us to give you better information.

    Thanks for the interest in my question and the quick reply...

    I need to find out which zones have not been visited by a character in order to see what needs to be completed for the achievment.

    I cannot find a way thru the API to ascertain this information.

    I am missing a ZonesVisited() function and am stuck in a big way.

    Any help would be appreciated....

    Andy W.

    Like most things in the WoW API of course it's not as simple as that.  You can request information about an achievement using GetAchievementInfo() and you can get information about criteria using GetAchievementCriteriaInfo().  For example, the following script will print out all of the possible zones that the user would have to explore in order to get the "World Explorer" achievement:

    function PrintAchievementCriteria(id)

    local id,name,points,completed = GetAchievementInfo(id)

    print("Achievement #" .. id .. ": " .. name)



    for j=1,GetAchievementNumCriteria(id) do

    local string, type, completed, quantity, totalQuantity, name, flags, assetID, quantityString, criteriaID = GetAchievementCriteriaInfo(id, j)



    if type == CRITERIA_TYPE_ACHIEVEMENT and assetID then

    PrintAchievementCriteria(assetID)

    else

    print(string.format(" * %s%s", string, completed and " (completed)" or ""))

    end



    end

    end



    PrintAchievementCriteria(46)



    -- Achievement #46: World Explorer

    -- Achievement #42: Explore Eastern Kingdoms

    Forgive how rough the code is, it was just done to illustrate one of the ways the API works.  Achievement 46  corresponds to "World Explorer".