Since we have boats, it is now possible to raid river shipping. This does not mean that shipping is not safe; most likely, it's still easier to move goods by river despite this.
The sea is naturally a lawless place, but I put it forth that both pirates and shippers can benifit from a compromise. It is impossible to transfer goods from boat to boat, and I am unsure what happens to a boat with a dead captain. In order to raid a boat, then, the pirate must convince the victim to dock and then drop off the goods. The victim must then trust the pirate not to simply kill him. I suggest that the laws be formalized thusly:
1: A Pirate must not kill a Shipper that has surrendered, and must give all Shippers a chance to do so.
2: A surrendered Shipper must go to shore and grant the pirate half of his goods.
3: Cities and towns are neutral to the sea, and, unless they state otherwise, are safe ground for fleeing Shippers and Pirates alike. Neither may fight nor steal from the other in coastal waters.
4: Pirates that violate these laws will be guilty in both the law of the land and the law of the sea, and may be hunted and killed by all.
5: Shippers that refuse to pay a Pirate they have surrendered to are at the mercy of the Pirate- something not known for being very existent.
In this way, Shippers will be assured that they will be able to survive Pirate attacks, and Pirates will be ensured co-operation and some measure of safety; and further, violent pirate that violate these laws will have to deal, not only with Shipper and Landlubber retaliation, but also with other Pirates, who loose out on loot when a Shipper is killed and thus stops trading. That is, it is wise of pirates to only take half of the goods and let the Shipper go free, because a live shipper that made a little bit of money is much more likely to make several trips than a dead and broke one. And, as even a two-patcher knows, half of four ships' worth of treasure is more than one whole ship's worth.
As a secondary but universal law, I propose this:
0: All must help a drowner of any affiliation, except in war.
...
Arrrrr.