Use a table:
Code:
/run for k, v in pairs({ Galleon = 32098, Sha = 32099, Nalak = 32518, Oondasta = 32519}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
There's even room for COLORS!
Also, use IsQuestFlaggedCompleted(qID) instead of GetQuestsCompleted()[qID] to check single quests.