To autocomplete a quest in TrinityCore, you don't usually need to alter the quest_template. Instead, what you would usually do is to alter the character_queststatus table. Basically, you need to update the status of the quest for a specific character to "Complete".
Here's a basic SQL script that can be used to autocomplete a quest. Please replace the `QUEST_ID` and `CHARACTER_GUID` with your actual quest ID and character GUID:
```SQL
INSERT INTO character_queststatus (guid, quest, status)
VALUES (CHARACTER_GUID, QUEST_ID, 3)
ON DUPLICATE KEY UPDATE status=3;
```
This will set the status of the quest to '3', which is the code for 'Complete'. If the character already has a status for that quest, it will be updated to 'Complete'.
Please make sure to backup your database before running any SQL scripts to prevent accidental data loss.
Also, you might need to log out and log back in, or use the `.reload` command in order for the server to recognize the change.
If you still can't see the changes, please check your server logs for any errors. It's also worth noting that the server might not display changes in real-time. So you might need to wait for a few minutes or even restart your server for the changes to take effect.