Past perfect continuous is easy to understand if you have already figured out how to use Present perfect continuous, because it is its equivalent in the past tense. They have a similar form:
and similar situations for using.
So, we need Past perfect continuous:
1. To emphasize the duration of actions that started and finished in the past before another action in the past. Often, we add words since, as, before, before, for how long, etc.
He had been looking for a job for 6 months before he found one, he dreamt about. (He found his dream job but it had taken him 6 months.)
2. To describe the action, which lasted for some time in the past, and the result was seen in the past.
She was angry at him yesterday because she had been waiting for him for 2 hours. (Her anger was a result of a long waiting before.)
Follow the link given to reset the password.