Contingency

6th-level Abjuration

Casting Time
10 minutes
Range
Self
Duration
10 days

Components

V (Verbal) S (Somatic) M (Material)
Material Components: a statuette of yourself carved from ivory and decorated with gems worth 1,500 gp 1500 gp

Description

Choose a spell of 5th level or lower that you can cast, that has a casting time of 1 action, and that can target you. You cast that spellβ€”called the contingent spellβ€”as part of casting contingency, expending spell slots for both. The contingent spell takes effect when a certain circumstance occurs.
Source: SRD 5.1