In the history of indulgences, the "Crusade Indulgence" is known as the first official plenary indulgence. Dan Brown's novel The Da Vinci Code certainly stated several untruths about the teachings of the Catholic Church.
It is only true to admit that some Crusaders did in fact commit some horrendous crimes, but indulgences were instituted by the Church to aid souls to live holy lives. In order to gain an indulgence one has to be in the state of grace. Serious sins must be confessed to a priest in order that one may be able to be restored to a state of grace and be able to receive a plenary indulgence.
The earliest record of a plenary indulgence was Pope Urban II's declaration at the Council of Clermont (1095) that he remitted all penance incurred by crusaders who had confessed their sins in the Sacrament of Penance, considering participation in the crusade equivalent to a complete penance.
Indulgences are not feats of magic and in order to gain any indulgence certain rules must be met. It has been the constant teaching of the Church that mortal sins must be confessed in the Sacrament of Penance. Indulgences have never nor could not ever substitute this fact.
A plenary indulgence means that by the merits of Jesus Christ, the Blessed Virgin Mary and all the saints, the full remission of the temporal punishment due to sacramentally forgiven sins is obtained. The person becomes as if just baptized and would fly immediately to heaven if he died in that instant. A partial indulgence means that a portion of the temporal punishment due to forgiven sin is remitted. Partial indulgences are received either by doing some act to which a partial indulgence is attached (e.g. praying a partially indulgenced prayer), or by the incomplete fulfillment of the conditions attached to a plenary indulgence. - What is an Indulgence?