View Single Post
04-18-24, 04:11 AM   #18
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,953
My understanding was that ..

1. You want to know the criteria ID for an achievement's criterias. - That is what that code does
2. You wanted to be able to use that criteria information to change stuff on the map - I supplied the criteria information, you said you knew what you had to do with it so I didn't look into how to use it

This line of code is the criteria information for a single criteria for a single achievement

Lua Code:
  1. criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible
  2.            = GetAchievementCriteriaInfo(achievementID, criteriaIndex)
  3.  
  4. If you add a print statement to view these values they should show in your chat window allowing you to see the criteriaID and other information you may be able to use to do what you want.   Unfortunately programming isn't something that just works, you have to investigate to see that it is doing what you want at each stage and expand on it.

This block of code is extracting key information and putting it into the data table / array for later use
Lua Code:
  1. data.criteriaID = criteriaID
  2.             data.criteriaString = criteriaString
  3.             data.criteriaType = criteriaType
  4.             data.completed = completed
  5.             data.assetID = assetID

Essentially that almost complete addon code I posted yesterday is only missing the functionality you said you knew what to do. I gave you the code to get any criteria for any achievement you want in a table/array you can access like you have done in your previous addons. You just need to add the code that uses that criteria information.
I know how I can add this to my addon so that it works, but I don’t know where to get the criteria (I only found criteria for rare monsters)
There isn't anything else I can add that will get the criteria information any differently. You just have to access the data table / array my code creates in the code you already know what to do.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote