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 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! |
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)) |
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. |
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)) 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)) |
Thank you very much, kind Sir!
|
All times are GMT -6. The time now is 09:19 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI