Quest completion list macro
hey!
I have a macro to check quest completions and prints them in colored yes/no: Code:
/run local t={"OrdLake",33201,"Steam",33202,"StuCent",33198,"StuSW",33199,"StuW",33200,"T1G1",33216,"T1G2",33217}for i=1,#t-1,2 do print(t[i],IsQuestFlaggedCompleted(t[i+1])and "\124cff00ff00Completed" or "\124cffff0000Not completed")end Code:
OrdLake Not completed Would you please help me to fix this macro for this purpose? |
Unfortunately, the only way to get a quest name from its ID is to set it to a tooltip and then "scrape" the tooltip for the information, ideally storing it in a lookup table so it will only require scraping once. Not something you can really do in a macro, unfortunately.
|
well, that explains the lack of replies :F
Thank you for the information, Torhal! Do you have any other suggestion / idea how can I print the completion of 10-15 quests at once by a macro? (without using superdupermacro-like addons) |
Unfortunately, I do not. :/
|
Ok, I'm going for 1,2,3,4, etc to save space in macro, but it needs a title, could you help inserting a single text print to the first row with the least macro-space wasting, please?
I'm talking about something like this: Code:
TITLE |
Code:
/run print("Title Text"); local t={"1",33201,"2",33202,"3",33198,"4",33199,"5",33200,"6",33216,"7",33217}for i=1,#t-1,2 do print(t[i],IsQuestFlaggedCompleted(t[i+1])and "\124cff00ff00Completed" or "\124cffff0000Not completed")end Would you help me please? |
You cannot run the for loop iteration within the print function, so you need one print at the beginning, as you've done, and another within the loop (that prints whatever the next loop element is).
|
Since you are just using numbers instead of names you can shorten that up a bit more with:
Code:
/run local p,t=print,{33201,33202,33198,33199,33200,33216,33217}p("Title Text")for i=1,#t do p(i,IsQuestFlaggedCompleted(t[i])and"\124cff00ff00Completed"or"\124cffff0000Not completed")end Code:
/run local p,t=print,{3,4,0,1,2,18,19}p("Title Text")for i=1,#t do p(i,IsQuestFlaggedCompleted(33198+t[i])and"\124cff00ff00Completed"or"\124cffff0000Not completed")end |
Wow! It's just what I needed. Thanks a lot! :banana:
|
Perhaps we can continue with the compacting and reduce the character count a few more:
Code:
/run local p,t=print,{3,4,0,1,2,18,19}p("Title Text")for i=1,#t do p(i,"\124cff"..(IsQuestFlaggedCompleted(33198+t[i])and"00ff00"or"ff0000Not ").."Completed")end |
Another 6 characters short. Thank you both for your help!
|
All times are GMT -6. The time now is 08:54 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI