Forbiddance

Forbiddance was an abjuration spell that blocked all extraplanar travel within an area and warded the area against creatures of alignments different from that of the caster.

Effects
This spell had two major effects that operated on a volume up to one 60 ft (18.3 m) cube per level of the caster. The area could take any contiguous shape the caster desired as long as the maximum volume was not exceeded.

The first effect was to block all extraplanar movement into or within the protected area. Creatures could not use teleport, dimension door, plane shift, or any other mode of travel through the Astral or Ethereal Plane to enter, move from one spot to another, nor be summoned into the area. All such attempts simply failed.

Forbiddance also attacked individuals and creatures that crossed the barrier into the protected area based on the difference in alignment with the caster. Creatures of the same alignment suffered no damage. Creatures that differed in either the good/evil or law/chaos aspect of alignment were smitten harshly as they entered the forbidden area. Those that differed in both good/evil and law/chaos were doubly rebuked. At the time of casting, the priest could set an optional password that allowed friendly beings of different alignments to enter the area unharmed as long as they spoke the password as they entered.

The older version of this spell had more stringent requirements but was better at keeping the unwanted out of the affected area. A prerequisite for casting forbiddance was that the area be consecrated, presumably to the same deity that the caster worshiped. Next, more weight was given to the good/evil axis of alignment than the law/chaos axis, and therefore this spell did more damage to the former and less to the latter. And last, when the older version set a password, it was proof against anyone, friend or foe, from entering the protected area for the duration of the spell. This was also true for those who attempted to breach a non-passworded barrier and failed to overcome the magic of this spell.

Forbiddance could not be dispelled by any caster less than the priest's level of experience.

Components
Verbal and somatic components were required, plus rare incense had to be burned and holy water sprinkled about the area. For a password to be set, even more incense had to be used. The estimated cost of incense for a 60 ft (18.3 m) cube was 1,500 gp (only 1,000 gp for the older spell). The extra incense for adding a password cost another 1,000 gp plus 1,000 gp per cube (5,000 gp for the older spell).

The post sundering version of the spell use is a sprinkling of holy water, rare incense, and powdered ruby worth at least 1,000 gp wich is consumed on the last casting the spell for 30 days  wich makes it last in it is dispelled