The Final Repository walkthrough

Quick answer: Meet Professor Fig in the Map Chamber, fight through Ranrok’s loyalists and trolls in the Keeper’s Caverns, make your choice about the repository, then beat Ranrok in dragon form.
Show walkthrough (story spoilers)
How to start
The Final Repository is the last main story quest. It unlocks after the quest Wand Mastery and needs level 24. Fast travel to the Map Chamber under Hogwarts and talk to Professor Fig to begin.
Before you go
Stock up on Wiggenweld Potions and any combat potions you like, and bring a mix of spells: at least one red Damage spell, one yellow Control spell and one purple Force spell. The final boss uses colored shields that need all three. There is no going back once you reach the boss.
Into the Keeper’s Caverns
Go through the door in the Map Chamber and walk the long bridge with Fig. A group of Goblin Loyalists attacks on the bridge. Beat them and keep moving while Fig shifts the goblins’ drill out of the way.
Trolls and veils
Next comes a wave of loyalists with two armored trolls. Keep moving, dodge the trolls’ heavy swings and use Ancient Magic finishers on them. Fig blasts open the hazed veil walls that block the way, while you hold off each new wave.
The repository and the choice
After the last wave, a cutscene plays and Fig asks what you intend to do with the magic in the repository. Your answer decides which ending you get. Should you keep the magic contained?
Defeat Ranrok
Ranrok blasts the repository open with Miriam’s wand and turns into a dragon. The fight has three phases, and you must break colored shield orbs before you can hurt him. How to beat Ranrok.
Rewards
The quest gives 260 XP and the Hero of Hogwarts Steam achievement. An ending cutscene and a ceremony in the Great Hall follow, and the season turns to spring. You then wake up at Hogwarts and can keep playing.
What’s next
Finishing the story unlocks two post-game quests, Weasley’s Watchful Eye and The House Cup. What to do after the ending.
