createdby 50 Posted November 26, 2017 Share Posted November 26, 2017 Hi I am writing a quest and I wanted to know if it is possible to make condition for this achievementhttp://www.wowhead.com/achievement=10665/explore-azsunaexample: Query: I have the achievement, yes or no is it yes go to area 2 is it no go back to area 1I would like to incorporate that into my questsort<QuestsSorted Action = "Pulse" NameClass = "Aszuna" />sry for my bad english i hope you understand meGoogle Translate thanks for help greets Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/ Share on other sites More sharing options...
Droidz 2742 Posted November 26, 2017 Share Posted November 26, 2017 Hello, you need to use lua https://wow.gamepedia.com/World_of_Warcraft_API#Achievement_Functions Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35778 Share on other sites More sharing options...
Droidz 2742 Posted November 26, 2017 Share Posted November 26, 2017 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 https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35780 Share on other sites More sharing options...
createdby 50 Posted November 26, 2017 Author Share Posted November 26, 2017 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 successbut he also wants to fly into the areaIs it correct that way? do I have to change something? thanks for your help Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35785 Share on other sites More sharing options...
Droidz 2742 Posted November 27, 2017 Share Posted November 27, 2017 No it is an sample code, this script will output in wow chat achievement states. What do you want to check exactly? Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35810 Share on other sites More sharing options...
createdby 50 Posted November 27, 2017 Author Share Posted November 27, 2017 (edited) I have the achievement with my charhttp://www.wowhead.com/achievement=10665/explore-azsunaif I start the profile should skip the profile if he already has the achievementbut 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 Edited November 27, 2017 by createdby Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35820 Share on other sites More sharing options...
createdby 50 Posted November 30, 2017 Author Share Posted November 30, 2017 (edited) I try to explain it differentlyfor this success http://www.wowhead.com/achievement=10665/explore-azsunayou have to explore individual areasif I have explored an area begins the next profileIf i start the area again that I have already explored the bot should skip the areaif 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 November 30, 2017 by createdby Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-35998 Share on other sites More sharing options...
Droidz 2742 Posted December 1, 2017 Share Posted December 1, 2017 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 https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36011 Share on other sites More sharing options...
createdby 50 Posted December 1, 2017 Author Share Posted December 1, 2017 (edited) 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<bool>(@"
local achievementID = 10668;
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;")" /> <QuestsSorted Action="Pulse" NameClass="Stormheim1" /> <QuestsSorted Action="EndIf" NameClass="wManager.Wow.Helpers.Lua.LuaDoString<bool>(@"
local achievementID = 10668;
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;")" /> area is Aggrammar's Vault what can i do thanks for your help Edited December 2, 2017 by createdby Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36039 Share on other sites More sharing options...
createdby 50 Posted December 3, 2017 Author Share Posted December 3, 2017 same with aszuna <QuestsSorted Action="If" NameClass="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;")" /> <QuestsSorted Action="Pulse" NameClass="Aszuna1" /> <QuestsSorted Action="EndIf" NameClass="wManager.Wow.Helpers.Lua.LuaDoString<bool>(@"
local achievementID = 10668;
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;")" /> Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36100 Share on other sites More sharing options...
Droidz 2742 Posted December 4, 2017 Share Posted December 4, 2017 In "EndIf" step you don't need to put code. In "If" step start your code by: ! ( https://docs.microsoft.com/fr-fr/dotnet/csharp/language-reference/operators/logical-negation-operator ) Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36152 Share on other sites More sharing options...
createdby 50 Posted December 4, 2017 Author Share Posted December 4, 2017 (edited) i have it really because of a sign Edited December 4, 2017 by createdby Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36169 Share on other sites More sharing options...
Droidz 2742 Posted December 4, 2017 Share Posted December 4, 2017 Add "!" before "wManager.Wow.Helpers.Lua.LuaDoString<bool>..." Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36173 Share on other sites More sharing options...
createdby 50 Posted December 4, 2017 Author Share Posted December 4, 2017 has worked Thank you for your patience Droidz 1 Link to comment https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-36174 Share on other sites More sharing options...
TheSmokie 242 Posted December 7, 2020 Share Posted December 7, 2020 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 https://wrobot.eu/forums/topic/7829-condition-for-achievement/#findComment-60803 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now