Trap the Soul(Player's Handbook v.3.5, p. 295)
Conjuration (Summoning) [Ectomancy]
Level: Sorcerer 8, Wizard 8, Sha'ir 8, Death Master 8, Treachery (DCS) 8, Gluttony (SpC) 9, Lust 9, Inquisition (DF) 9,
Components: V, S, M, AF, (see text)
Casting Time: 1 standard action or see text
Range: Close (25 ft. + 5 ft./2 levels)
Target: One creature
Duration: Permanent; see text
Saving Throw: See text
Spell Resistance: Yes; see text
Trap the soul forces a creature's life force (and its material body) into a gem.
The gem holds the trapped entity indefinitely or until the gem is broken and the life force is released, which allows the material body to reform. If the trapped creature is a powerful creature from another plane (which could mean a character trapped by an inhabitant of another plane when the character is not on the Material Plane), it can be required to perform a service immediately upon being freed. Otherwise, the creature can go free once the gem imprisoning it is broken.
Depending on the version selected, the spell can be triggered in one of two ways.
Spell Completion: First, the spell can be completed by speaking its final word as a standard action as if you were casting a regular spell at the subject. This allows spell resistance (if any) and a Will save to avoid the effect. If the creature's name is spoken as well, any spell resistance is ignored and the save DC increases by 2. If the save or spell resistance is successful, the gem shatters.
Trigger Object: The second method is far more insidious, for it tricks the subject into accepting a trigger object inscribed with the final spell word, automatically placing the creature's soul in the trap. To use this method, both the creature's name and the trigger word must be inscribed on the trigger object when the gem is enspelled. A sympathy spell can also be placed on the trigger object. As soon as the subject picks up or accepts the trigger object, its life force is automatically transferred to the gem without the benefit of spell resistance or a save.
Material Component: Before the actual casting of trap the soul, you must procure a gem of at least 1,000 gp value for every Hit Die possessed by the creature to be trapped (for example, it requires a gem of 10,000 gp value to trap a 10 HD creature). If the gem is not valuable enough, it shatters when the entrapment is attempted. (While creatures have no concept of level or Hit Dice as such, the value of the gem needed to trap an individual can be researched. Remember that this value can change over time as creatures gain more Hit Dice).
Focus (Trigger Object Only): If the trigger object method is used, a special trigger object, prepared as described above, is needed.