Deadman's Contingency

Evocation
Level: Artificer * 4, Bard * 4, Cleric */Oracle * 4, Sorcerer */Wizard * 4, Warlock * 4
Components: V, S, M (a scorpion's tail), F (ivory statuette of you worth 1,500 gp)
Casting Time: 10 minutes or more; see text
Range: personal
Target: you
Duration: up to 1 hour/level plus 1d6 rounds; see text (D)
Saving Throw: -
Spell Resistance: -
  This spell functions as contingency, except as noted above. This spell also only comes into effect after your death and works only with certain spells. The companion spell triggers 1d6 rounds after your death. All decisions made involving the companion spell must be made when deadman's contingency is cast (including messages and recipients for spells like magic mouth or sending). If the spell targets an Object or appears in a certain location, it must target or be centered on your corpse. The following spells can be companion spells for deadman's contingency: animate Dead (animating your corpse as an uncontrolled skeleton or zombie), disintegrate, fireball, gentle repose, magic mouth, major image (with a duration of 3 rounds), permanent image, sending, stinking cloud, and teleport Object.