Thread Tools Display Modes
07-19-16, 02:08 AM   #1
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Questcompletion macro

Hi,

Is there a way to print quest names only by providing quest ID numbers in a macro?

This would solve my space issues, I need to check 9-10 quests at once in a vertical list of quest names colored by completion:

Is that possible to modify this macro to remove manually added quest names and list it vertically?

Code:
/run local t,s={"Terrorfist",39288,"Vengeance",39290,"Deathtalon",39287,"Doomroller",39289},'' for i=1,#t-1,2 do s=s..(IsQuestFlaggedCompleted(t[i+1]) and '\124cffff0000' or '\124cff00ff00')..t[i]..'\124r, ' end print(s:sub(1,-3))
It would be even greater if I could mix it so where I want I could replace the stock quest names with manual text.

Are these options possible without using a macro extender addon?

Thanks in advance.
  Reply With Quote
07-19-16, 09:46 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,308
I haven't tested it yet, but maybe C_TaskQuest.GetQuestTitleByQuestID().
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-19-16, 10:31 AM   #3
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Can this be used in macros? I'm completely newb for macros.

Oh, forgot to mention I'm looking for solution for the Legion api. Not sure if this changes anything.
  Reply With Quote
07-19-16, 10:46 AM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
That function is specifically for "task" quests and won't work for you. It's possible to get a quest name from a quest ID through tooltip scanning, but not in a way that would shorten your macro.
  Reply With Quote
07-19-16, 11:24 AM   #5
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
dam! sad to hear..

Thanks for the replies anyway!


Would you help me on how can I sort the list of quest for the macro above vertically?
  Reply With Quote
07-19-16, 11:30 AM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Voxxel View Post
Would you help me on how can I sort the list of quest for the macro above vertically?
I'm not really sure what you're asking, if you want to output the names on separate lines you can do it like this..
Lua Code:
  1. /run local t={"Terrorfist",39288,"Vengeance",39290,"Deathtalon",39287,"Doomroller",39289}for i=1,#t-1,2 do print((IsQuestFlaggedCompleted(t[i+1]) and '\124cffff0000' or '\124cff00ff00')..t[i])end
It's "sorted" by the order you have them in, so if you want them in a different order, just rearrange the list.
  Reply With Quote
07-19-16, 11:34 AM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,308
You don't need to specify the end as #t-1. It'll stop if the step bumps the integer past the end. For example, for i=1,4,2 do will loop 1 and 3, then stop, because 5 will be greater than 4.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-19-16, 12:27 PM   #8
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Originally Posted by semlar View Post
It's "sorted" by the order you have them in, so if you want them in a different order, just rearrange the list.
Yea, that's what I was looking for, a vertical sorting. Thank you.

You don't need to specify the end as #t-1. It'll stop if the step bumps the integer past the end. For example, for i=1,4,2 do will loop 1 and 3, then stop, because 5 will be greater than 4.
Now this is chinese for me. I don't understand any part of it.
  Reply With Quote
07-19-16, 01:06 PM   #9
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Voxxel View Post
Now this is chinese for me. I don't understand any part of it.
He just means you can replace #t-1 with #t, it doesn't change the functionality but it saves a couple characters in the macro.
  Reply With Quote
07-19-16, 01:14 PM   #10
Voxxel
A Chromatic Dragonspawn
Join Date: Mar 2009
Posts: 193
Cool!

Thank you guys!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Questcompletion 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