In 2 Samuel 10, the King of Ammon dies and is replaced by his son, who then sends a message to King David asking for peace and friendship. David, being the dutiful king and diplomat, sends an envoy to Ammon to negotiate in good faith. Unfortunately, the Ammonites aren't too keen on the idea of making peace and instead proceed to humiliate David's envoy. Not one to be taken lightly, David sends his own army to Ammon, and they proceed to kick ass and take names. After a swift victory, David's forces bring the Ammonites to heel and the two nations reach an agreement. So, the lesson here is that if you want peace, be nice to people. Otherwise, King David will come after you, and you won't like the results.