Should it be which one? A. if ${This.CompletedWithNPC.Element[${GiverName}].FirstKey(exists)} { if ${WoWScript[GossipFrame:IsVisible()]} { ;echo Gossip Frame Visible CompleteIndex:Set[1] do { if ${Questgiver.IsComplete[${Me.Quest[${WoWScript["GetGossipActiveQuests()",${CompleteIndex}]}].ID}]} { ;echo Selecting ${WoWScript["GetGossipActiveQuests()",${CompleteIndex}]} WoWScript SelectGossipActiveQuest(${CompleteIndex}) return } } } while ${Me.Quest[${WoWScript["GetGossipActiveQuests()",${CompleteIndex:Inc}]}](exists)} return } B. if ${This.CompletedWithNPC.Element[${GiverName}].FirstKey(exists)} { if ${WoWScript[GossipFrame:IsVisible()]} { ;echo Gossip Frame Visible CompleteIndex:Set[1] do { if ${Questgiver.IsComplete[${Me.Quest[${WoWScript["GetGossipActiveQuests()",${CompleteIndex}]}].ID}]} { ;echo Selecting ${WoWScript["GetGossipActiveQuests()",${CompleteIndex}]} WoWScript SelectGossipActiveQuest(${CompleteIndex}) return } } while ${Me.Quest[${WoWScript["GetGossipActiveQuests()",${CompleteIndex:Inc}]}](exists)} } return } C. Some other order?