Nosferatuepic 2 Posted October 3, 2018 Share Posted October 3, 2018 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 Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/ Share on other sites More sharing options...
FNV316 65 Posted October 3, 2018 Share Posted October 3, 2018 Use quest name instead of id: http://classic-wow.wikia.com/wiki/API_GetQuestLogTitle Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48207 Share on other sites More sharing options...
Nosferatuepic 2 Posted October 3, 2018 Author Share Posted October 3, 2018 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 Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48208 Share on other sites More sharing options...
Zan 99 Posted October 3, 2018 Share Posted October 3, 2018 Try quotes around the name? Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48210 Share on other sites More sharing options...
Nosferatuepic 2 Posted October 3, 2018 Author Share Posted October 3, 2018 18 minutes ago, Zan said: Try quotes around the name? I could not understand what he means Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48211 Share on other sites More sharing options...
Zan 99 Posted October 3, 2018 Share Posted October 3, 2018 "The Absent Minded Prospector" and change all questid to questname to avoid confusion. Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48222 Share on other sites More sharing options...
Nosferatuepic 2 Posted October 3, 2018 Author Share Posted October 3, 2018 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 Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48223 Share on other sites More sharing options...
Nosferatuepic 2 Posted October 3, 2018 Author Share Posted October 3, 2018 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? Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48224 Share on other sites More sharing options...
Ordush 185 Posted October 3, 2018 Share Posted October 3, 2018 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. Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48226 Share on other sites More sharing options...
FNV316 65 Posted October 3, 2018 Share Posted October 3, 2018 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 Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48228 Share on other sites More sharing options...
Andoido 75 Posted October 4, 2018 Share Posted October 4, 2018 var logId = Quest.GetLogIdByQuestId(1234); if (logId > 0) { Lua.LuaDoString("SelectQuestLogEntry(" + logId + "); SetAbandonQuest(); AbandonQuest(); "); } This should work flawlessly.. just enter your ID. Nosferatuepic 1 Link to comment https://wrobot.eu/forums/topic/10203-abandon-quest-by-id/#findComment-48249 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