WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Questcompletion macro (https://www.wowinterface.com/forums/showthread.php?t=53924)

Voxxel 07-19-16 02:08 AM

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.

SDPhantom 07-19-16 09:46 AM

I haven't tested it yet, but maybe C_TaskQuest.GetQuestTitleByQuestID().

Voxxel 07-19-16 10:31 AM

Can this be used in macros? I'm completely newb for macros. :confused:

Oh, forgot to mention I'm looking for solution for the Legion api. Not sure if this changes anything.

semlar 07-19-16 10:46 AM

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.

Voxxel 07-19-16 11:24 AM

dam! sad to hear.. :(

Thanks for the replies anyway! :p


Would you help me on how can I sort the list of quest for the macro above vertically?

semlar 07-19-16 11:30 AM

Quote:

Originally Posted by Voxxel (Post 316559)
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.

SDPhantom 07-19-16 11:34 AM

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.

Voxxel 07-19-16 12:27 PM

Quote:

Originally Posted by semlar (Post 316560)
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.

Quote:

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. :rolleyes:

semlar 07-19-16 01:06 PM

Quote:

Originally Posted by Voxxel (Post 316568)
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.

Voxxel 07-19-16 01:14 PM

Cool!

Thank you guys!


All times are GMT -6. The time now is 11:41 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI