Using commands in quests

Could I use a gm command in a completion of a quest? For example after you complete the quest the command ‘learn all recipes blacksmith’ is cast on you. I’ve found the code in cs_learn.cpp. Is there a way to attach it to a quest?

There is a command to complete a quest.

Not sure what you are asking about on ‘learn all’ for quest(s)?

Well what I’m wondering is if I can use a GM command to use on a player through a quest or gossip NPC. I know you can with C++ but I’m not sure how.

I guess this should of gone in the code request section… .sorry lol.

GM-Commands are implemented in c++ becouse the core is.

So you only need to look what the Command is doing and do it on quest complete or Gossip.