Glyph of Warding

Abjuration
Level: Acolyte 3; Components: V, S, M; Casting Time: 10 minutes; Range: Touch; Target or Area: Object touched or up to 5 sq. ft./level; Duration: Permanent until discharged (D); Saving Throw: See text; Spell Resistance: Yes (object)
This inscription harms those who enter, pass, or open the warded area or object.
The caster sets the conditions of the ward. Typically, any creature entering the warded area or opening the warded object without speaking a pass phrase (which the caster sets when casting the spell) is subject to the magic it stores. Alternatively or in addition to a pass phrase trigger, glyphs of warding can be set according to physical characteristics or creature type, or species. Glyphs can also be set with respect to allegiance. They cannot be set according to class, Hit Dice, or level. Glyphs respond to invisible creatures normally. Multiple glyphs cannot be cast on the same area. However, they can ward separate compartments of the same object.
The glyph can be placed to conform to any shape up to the limitations of the spell's total square footage. When the spell is completed, the glyph becomes nearly invisible.
Glyphs cannot be affected or bypassed by such means as physical or magical probing, though they can be dispelled. Nonmagical disguises cannot fool a glyph of warding.
Read magic allows a character to identify a glyph of warding with a successful Spellcraft check (DC 13). Identifying the glyph does not discharge it and allows the character to know the basic nature of the glyph (version, type of damage caused, what spell is stored).
Detecting the glyph requires a successful Search check (DC 28), and safely removing it requires a successful Disable Device check (DC 28).
Depending on the version selected, a glyph either blasts the intruder or activates a spell.
Blast Glyph: A blast deals 1d8 points of damage per two caster levels to the intruder and to all within 5 feet of the intruder (maximum 5d8). This damage is acid, cold, fire, electricity, or sonic/concussion (caster's choice, made at time of casting). Those affected can make Reflex saves to take half damage.
Spell Glyph: The caster can store any harmful spell of up to 3rd level that he or she knows. All level-dependent features of the spell are based on the caster's level at the time of casting. If the spell has targets, it targets the intruder. If the spell normally affects an area, the area or effect is centered on the intruder. All saving throws operate as normal, except that the DC is based on the level of the glyph.
Material Component: Purchase DC 15.