Even if you say yes to sex but your decision was influenced by drugs or alcohol, this is still rape. Know your own desires and limits. Before you go upstairs with that guy, find out what his intentions are. Your non-verbal actions send a message, too. Although no one has the right to rape you no matter what you wear or how you act, it does not mean it will not happen.
Safety is increased by awareness.
Use the buddy system. Go to parties in a group and keep an eye on each other. Make sure at least one of you stays sober even if no one has to drive. Trust your intuitions. If something feels wrong, it probably is.