NPC Auto Complete quest!

Hi. I have an idea that a NPC will list all quest of Player not complete to a gossip, then player click into Gossip, it may require golds to clickable, after that quest are set to complete. I only have idea, but i don’t know start from where :-<

Start by creating a CreatureScript, there are many examples in the source code, e.g https://github.com/TrinityCore/TrinityCore/blob/6.x/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp#L510-L571