When Ripley decided to break in my new carpet and painted wall with a big spray last fall I took everyone's advice here and tried Feliway. I bought the Feliway Comfort Zone plug in (lasts for 30 days) and I also used the Feliway Spray. It helped and stopped spraying. You can buy it at most pet stores online or brick and mortar. I got mine at PetsMart. It's not cheap but it's a lot cheaper than replacing carpet, etc.

I know some other people here on the boards have had to use medication to calm their cats and help them stop spraying. I hope your friend doesn't have to go that far but if it is needed sometimes you just have to.

Best of luck to her!