Thread Tools Display Modes
07-17-18, 03:06 AM   #1
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Question 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
The result looks like this:
Code:
OrdLake Not completed
Steam Completed
StuCent Completed
StuSW Not completed
T1G1 Not completed
T1G2 Completed
I'm looking for a way to edit this to remove the manually set name parts and make the macro to print the exact quest names automatically. I don't want to set the quest names into the macro because it takes a lot of space and my goal is to print out as many quests as possible.

Would you please help me to fix this macro for this purpose?
  Reply With Quote
07-17-18, 03:04 PM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
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.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
07-18-18, 01:34 AM   #3
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
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)
  Reply With Quote
07-18-18, 08:22 PM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Unfortunately, I do not. :/
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
07-20-18, 08:20 AM   #5
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
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
1. Not completed
2. Completed
3. Completed
4. Not completed
5. Not completed
6. Completed
  Reply With Quote
07-22-18, 08:51 AM   #6
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
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
I mean how/where to place the title line text into the macro to avoid the duplication of "print" command. This maybe too basic for you, but I still don't get it.

Would you help me please?
  Reply With Quote
07-25-18, 02:15 AM   #7
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
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).
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
07-25-18, 06:26 AM   #8
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
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
With all the quest ids so close numerically you can shrink it even more:
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
  Reply With Quote
07-25-18, 09:49 AM   #9
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Wow! It's just what I needed. Thanks a lot!
  Reply With Quote
07-25-18, 07:47 PM   #10
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
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
  Reply With Quote
07-30-18, 04:07 AM   #11
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Another 6 characters short. Thank you both for your help!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Quest completion list macro

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off