Originally Posted by SnowmanDK
Hi all.
I know that
GetAchievementCriterion(872)
will return
19
as that's the requirement to complete the Achievement for finding M'aiq.
What I need to do is to track if I already have him in my current zone.
In have messed around with different codes a lot, but can't seem to make it work properly.
What I need is a way to say something like:
Lua Code:
local REQ = 1 -- the number of times I need to find Ma'iq in this zone. if LocalAchievement(872) == REQ then PrintLine("M'aiq is completed in this zone") else PrintLine("M'aiq is missing in this zone") end
|
From the API documentation:
GetAchievementCriterion(integer achievementId, luaindex criterionIndex)
Returns: string description, integer numCompleted, integer numRequired
If numCompleted == numRequired criterion is completed.
So if you want to know if you have found M'aiq in Auridon, you have to use:
Lua Code:
local desc, completed, required = GetAchievementCriterion(872, 2)
if completed >= required then
d("Completed")
end
Criterion index is counted from the top - you can check it in game in achievement window or on Esohead:
http://esohead.com/achievements/872-i-like-maiq