Depending on how many you are, you will be outgunned in most cases. Besides the US there aren't many places where you are allowed to have guns, especially as a foreign national. Also, you will be searched in certain nations, depending on which nations flag you have and where you are coming from.
So I don't think that guns are a particularly good idea. Many have done it without and most places where piracy is rampant are well known and should be avoided.