View Full Version : Set quest complete via code

05-01-2016, 10:12 AM

I have been looking for an answer to this pretty simple question, how do I complete a quest via code in c++? I have been trying

player->CompleteQuest(quest_id); but it does not work.

05-01-2016, 10:37 AM
Usually there is a command for it. (a GM command)
See how that is coded and use it.

Btw. What does quest completing mean here?
Does it mean that you complete all objectives but dont yet give in the quest?
Does it mean that the the player directly finishes the quest (even if he has not completed objectives) and gets rewards etc?
Something else?

05-01-2016, 10:45 AM
Maybe I explained it wrong, I got a quest where the objective is to kill a creature.
When the player kills the creature it counts the kill but the objective is not complete, the same system can be seen in the Ring of blood questline where the objective is "Brokentoe killed" and then the counter of kills.

My problem is that I do not get the objective complete and therefore can not turn in the quest.

I have been looking for the command but cant find any usefull info, any ideas?

Isnt there like a way to complete a quest via scripts? I suppose player->QuestComplete(id) should be in there somewhere?

05-01-2016, 06:26 PM

Moved thread to correct section. Other -> C++ is a release section. This is a support thread. Read section description next time.

Not sure if your focus should be on using a C++ method to fix something that seems to be an SQL issue (maybe).

05-02-2016, 02:16 AM
examine and cross-reference the Quest id in your quest_template database with Trinity Core quest_template (https://trinitycore.atlassian.net/wiki/display/tc/quest_template)