Past perfect continuous.
1. Tom had been doing his homework, when the lights went out.
2. He had been in a nice car, before car crashed.
3. He had been throwing rocks at her window for five minutes before she finally came out on the balcony and said, “Hey, Romeo.”
4. John was very tired. He had been running.
5. Pilot had been drinking the juice, before the crash airplane.

Past perfect
1. His father was a very good man.
2. My friend was a very good guitarist.
3. My sister loved watching movies.
4. I passed my exams a few years ago.
5. That happened a long time ago.