There is no way to make the bird just "stop" so you can go about the rest of a visit with your friends/family without the bird bothering you. You're talking a months-years long process to simply reduce the undesired behaviors he's exhibiting. The best "short term" solution would be to ask the owner if they mind putting him up in his cage so you can have a break. Long term, it sounds like this bird would benefit from socialization exercises and some better training. That is all on the owners though and a long term, continual process.
P.S. If my bird was harassing or attacking a guest, I wouldn't need to be asked to put him in his cage, even though he typically enjoys free reign of the house. It seems like common sense not to allow animals to misbehave or act out when guests are over, especially guests who are uncomfortable with them. I feel this way in dog homes where the owners allow their dogs to jump all over me. Hate it. Please don't think all parrot owners are so rude as to allow that kind of thing to continue!