Quantcast Formatting help needed - WoWInterface
Thread Tools Display Modes
06-01-15, 06:04 AM   #1
Voxxel
A Flamescale Wyrmkin
Join Date: Mar 2009
Posts: 144
Post Formatting help needed

Hey there,

I have a macro for checking some quests if they're already completed

Code:
/run local t={"quest00",33170,"quest01",33171,"quest02",33172,"quest03",33173,"quest04",33174}for i=1,#t-1,2 do print(t[i],IsQuestFlaggedCompleted(t[i+1])and "\124cffff0000Yes" or "\124cff00ff00No")end
It prints out the quest names + Yes or No (in color codes that shows the completion) aligned underneath each other.
I need to turn this macro to print the result like this:

quest01, quest02, quest03, quest04

.. next to each other not underneath and without the yes/no result. Is it possible somehow?

Thanks for any help!

Last edited by Voxxel : 06-01-15 at 06:24 AM.
  Reply With Quote
06-01-15, 07:02 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,617
Code:
/run local t,s={33170,33171,33172,33173,33174},'' for i=1,#t do s=s..(IsQuestFlaggedCompleted(t[i]) and '\124cffff0000' or '\124cff00ff00')..'quest'..i..'\124r, ' end print(s:sub(1,-3))

Last edited by p3lim : 06-01-15 at 07:07 AM.
  Reply With Quote
06-01-15, 07:18 AM   #3
Voxxel
A Flamescale Wyrmkin
Join Date: Mar 2009
Posts: 144
Oh well, thanks for the fast solution, much appreciated!

I see your macro uses a shared name pre-tag "quest" and then gives a number. I forgot to mention that I need to keep the possibility to set custom names for each quests, I just simplified to q1, q2, q3 etc in the sample macro. Is that possible somehow?

I mean custom names that I can set like "My first quest", etc.

Last edited by Voxxel : 06-01-15 at 07:19 AM. Reason: typo
  Reply With Quote
06-02-15, 01:40 AM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,617
Code:
/run local t,s={[33170]='quest1',[33171]='quest2',[33172]='quest3',[33173]='quest4',[33174]='quest5'},'' for q,n in next,t do s=s..(IsQuestFlaggedCompleted(q) and '\124cffff0000' or '\124cff00ff00')..n..'\124r, ' end print(s:sub(1,-3))
Or if you're really trying to save some space:

Code:
/run local t,s={'quest1',33170,'quest2',33171,'quest3',33172,'quest4',33173,'quest5',33174},'' 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))

Last edited by p3lim : 06-02-15 at 01:43 AM.
  Reply With Quote
06-03-15, 01:46 AM   #5
Voxxel
A Flamescale Wyrmkin
Join Date: Mar 2009
Posts: 144
Thank you very much, kind Sir!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Formatting help needed

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