Well, she needs to be taught manners in an obedience class, and you need to take a proactive approach in being her leader. It's a lot of work owning a dog, but if you have the care and energy to do it, no one will doubt that you can. I mentioned NILF (nothing in life is free)...this is a concept that everything your dog does for you must be earned. If she wants a cookie, she must sit, wait, and be patient...without whining, begging, or jumping. This is something that is taught, it doesn't come naturally for most dogs. So, your relationship and your families relationship with your dog has to start with an understanding that you all must show your dog what you want. If you don't want her to hump legs, stop the activity and redirect her to what you do want...like maybe a sit. Then reward her for sitting...maybe with a pat on the head, a small treat, or some other form of affection. However, this will not come without repetition. You need to spend at a minimum (3) 10 minute sessions a day working on basic commands like sit, down, stay, come, off, and walking on heel. There's no simple answer to your question because you need to develop a relationship with your dog so you're dog can understand better, by your verbal commands and posture, what you want. For now, you may need to remove your dog from humping a leg, or block her alltogether by leashing her to your waist. But I assure you, if you work daily on giving what your dog needs, a simple "off" or standing up will be all you'll need to keep your dog off guests.