Jump to content

Condition for achievement?


createdby

Recommended Posts

Hi

I am writing a quest and I wanted to know if it is possible
to make condition for this achievement


http://www.wowhead.com/achievement=10665/explore-azsuna

example:
Query: I have the achievement, yes or no
is it yes go to area 2
is it no go back to area 1

I would like to incorporate that into my questsort

<QuestsSorted Action = "Pulse" NameClass = "Aszuna" />

sry for my bad english i hope you understand me
Google Translate

 

thanks for help

greets

 

 

 

Link to comment
Share on other sites

local achievementID = 10665;
local id, name, points, completed, month, day, year, description, flags, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);
print('======================================');
print(tostring(name));
for i=1,GetAchievementNumCriteria(achievementID) do
	local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, i);
	print(tostring(criteriaString) .. ', completed=' .. tostring(completed) .. ', eligible=' .. tostring(eligible));
end 

 

Link to comment
Share on other sites

hey droidz thanks for your answer

I copied the code you posted,
If I then start my profile, he should skip the area actually because he already has the success

but he also wants to fly into the area


Is it correct that way?

do I have to change something?

b6e27d-1511718783.png

thanks for your help

 

 

 

 

Link to comment
Share on other sites

I have the achievement with my char
http://www.wowhead.com/achievement=10665/explore-azsuna

if I start the profile should skip the profile if he already has the achievement
but he does not do that

 

The bot should check if he has the achievement and if so should he skip the area

if he does not have the achievement he should go to the area

 

i hope you understand me :laugh:

Edited by createdby
Link to comment
Share on other sites

I try to explain it differently

for this success
http://www.wowhead.com/achievement=10665/explore-azsuna
you have to explore individual areas

if I have explored an area begins the next profile

If i start the area again that I have already explored the bot should skip the area
if he has already explored that

 

example:

he explores the area: Felblaze Ingress

then he goes to the next area: Nar'thalas

I stop the bot and start the profile again then he wants to go again to the area Felblaze Ingress

but he has already explored

So I need a solution that he then continues in the area Nar'thalas

Edited by createdby
Link to comment
Share on other sites

In quest order use step type "If" (don't forget to add step "EndIf", pulse your quest beetween "if" end "endif") with c# code:

wManager.Wow.Helpers.Lua.LuaDoString<bool>(@"
local achievementID = 10665;
local indexCriteria = 1;
local id, name, points, completedA, month, day, year, description, flagsA, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);
if completedA then return completedA end
local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, indexCriteria);
return completed;")

line 3, replace 1 by criteria id, list of id (of Explore Azsuna):

1 - Faronaar
2 - Felblaze Ingress
3 - The Greenway
4 - Isle of the Watchers
5 - Llothien Highlands
6 - Lost Orchard
7 - Nar'thalas
8 - Oceanus Cove
9 - Ruined Sanctum
10 - Temple of Lights
11 - Ley-Ruins of Zarkhenar

 

Link to comment
Share on other sites

ok thanks for that

I did it that way, but he still wants to jump in Stormheim1

	<QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Lua.LuaDoString&lt;bool&gt;(@&quot;&#xD;&#xA;local achievementID = 10668;&#xD;&#xA;local indexCriteria = 1;&#xD;&#xA;local id, name, points, completedA, month, day, year, description, flagsA, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);&#xD;&#xA;if completedA then return completedA end&#xD;&#xA;local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, indexCriteria);&#xD;&#xA;return completed;&quot;)" />
	<QuestsSorted Action="Pulse" NameClass="Stormheim1" />
	<QuestsSorted Action="EndIf" NameClass="wManager.Wow.Helpers.Lua.LuaDoString&lt;bool&gt;(@&quot;&#xD;&#xA;local achievementID = 10668;&#xD;&#xA;local indexCriteria = 1;&#xD;&#xA;local id, name, points, completedA, month, day, year, description, flagsA, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);&#xD;&#xA;if completedA then return completedA end&#xD;&#xA;local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, indexCriteria);&#xD;&#xA;return completed;&quot;)" />

area is Aggrammar's Vault :blink:

what can i do

thanks for your help

Edited by createdby
Link to comment
Share on other sites

same with aszuna

<QuestsSorted Action="If" NameClass="wManager.Wow.Helpers.Lua.LuaDoString&lt;bool&gt;(@&quot;&#xD;&#xA;local achievementID = 10665;&#xD;&#xA;local indexCriteria = 1;&#xD;&#xA;local id, name, points, completedA, month, day, year, description, flagsA, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);&#xD;&#xA;if completedA then return completedA end&#xD;&#xA;local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, indexCriteria);&#xD;&#xA;return completed;&quot;)" />
	<QuestsSorted Action="Pulse" NameClass="Aszuna1" />
	<QuestsSorted Action="EndIf" NameClass="wManager.Wow.Helpers.Lua.LuaDoString&lt;bool&gt;(@&quot;&#xD;&#xA;local achievementID = 10668;&#xD;&#xA;local indexCriteria = 1;&#xD;&#xA;local id, name, points, completedA, month, day, year, description, flagsA, icon, rewardText, isGuild, wasEarnedByMe, earnedBy = GetAchievementInfo(achievementID);&#xD;&#xA;if completedA then return completedA end&#xD;&#xA;local criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achievementID, indexCriteria);&#xD;&#xA;return completed;&quot;)" />

 

Link to comment
Share on other sites

  • 3 years later...

the code @Droidz work for some achs, not all. this works for all achs

public static bool Achievement(int achievementID, int index)
    {
        bool haveAchievement = Lua.LuaDoString<bool>("local achievementID = " + achievementID + "; local indexCriteria = " + index +"; local achievementInfo = {GetAchievementInfo(achievementID)}; if achievementInfo[4] then return achievementInfo[4] end local achCriteriaInfo = {GetAchievementCriteriaInfo(achievementID, indexCriteria)}; return achCriteriaInfo[3];");
        return haveAchievement;
    }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...