November 26, 20178 yr 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
November 26, 20178 yr Hello, you need to use lua https://wow.gamepedia.com/World_of_Warcraft_API#Achievement_Functions
November 26, 20178 yr 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
November 26, 20178 yr Author 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
November 27, 20178 yr No it is an sample code, this script will output in wow chat achievement states. What do you want to check exactly?
November 27, 20178 yr Author 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, 20178 yr by createdby
November 30, 20178 yr Author 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, 20178 yr by createdby
December 1, 20178 yr 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
December 1, 20178 yr Author 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, 20178 yr by createdby
December 3, 20178 yr Author 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;")" />
December 4, 20178 yr 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 )
December 4, 20178 yr Author i have it really because of a sign Edited December 4, 20178 yr by createdby
December 7, 20205 yr 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; }
Create an account or sign in to comment