October 3, 20187 yr hello there, can you help me pls with abandon quest? for Vanilla wow, This code dont work local questId = 12345; for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == questId then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end end
October 3, 20187 yr Use quest name instead of id: http://classic-wow.wikia.com/wiki/API_GetQuestLogTitle
October 3, 20187 yr Author 19 minutes ago, FNV316 said: Use quest name instead of id: http://classic-wow.wikia.com/wiki/API_GetQuestLogTitle dont work: local questId = The Absent Minded Prospector; for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == questId then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end end
October 3, 20187 yr Author 18 minutes ago, Zan said: Try quotes around the name? I could not understand what he means
October 3, 20187 yr "The Absent Minded Prospector" and change all questid to questname to avoid confusion.
October 3, 20187 yr Author 2 hours ago, Mike Mail said: local questId = 12345; <- "12345" Change to your quest id, if you havent already. for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == questId then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); end end This code dont work at vanilla
October 3, 20187 yr Author 1 hour ago, Zan said: "The Absent Minded Prospector" and change all questid to questname to avoid confusion. local questId = The Absent Minded Prospector;for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == The Absent Minded Prospector then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); endend this?
October 3, 20187 yr 13 minutes ago, Nosferatuepic said: local questId = The Absent Minded Prospector;for i=1,GetNumQuestLogEntries() do local _, _, _, _, _, _, _, id = GetQuestLogTitle(i); if id == The Absent Minded Prospector then SelectQuestLogEntry(i); SetAbandonQuest(); AbandonQuest(); endend this? The Absent Minded Prospector needs to be a string.
October 3, 20187 yr 7 hours ago, Nosferatuepic said: dont work That's why I said, use quest name (-> quest title) instead of id. Calling that Lua function returns (in Vanilla) 7 different values, so you need a variable for the very first value. You then check, if the value (string) of the quest title variable is the same (string.match / string.find) as your quest name string. Please read the documentation. There is an example of how to use these variables right at the bottom. http://classic-wow.wikia.com/wiki/API_GetQuestLogTitle#questTag
October 4, 20187 yr var logId = Quest.GetLogIdByQuestId(1234); if (logId > 0) { Lua.LuaDoString("SelectQuestLogEntry(" + logId + "); SetAbandonQuest(); AbandonQuest(); "); } This should work flawlessly.. just enter your ID.
Create an account or sign in to comment