A building of at least 700 square feet ground-foot print can be consecrated by a cleric of Level 7 or higher as a temple to the cleric's god.   He must cast Commune Spell first, for permission from the god, then casts a bless (or Bane if he's evil) spell on the properly cleaned building.
 Any person can pray at the temple once per month for a divine intervention.  This can only be in reference to the god's area of interest, and takes the form of a 1 in 12 chance for the god to allow the person to cast one appropriate spell of level 6 or less to help solve the problem.
 
 Any initiate of the god can pray at a temple once per week for a divine intervention.  This can only be in reference to the god's area of interest, and takes the form of a 1 in 6 chance for the god to allow the initiate to cast one appropriate spell to help solve the problem.
 
 A cleric of a god can pray at a temple once per day for the god to restore all used spell slots for the day.  There is a 1 in 6 chance of the prayer being granted.
 
 Healing potions made at a temple gain a 10% reduction in ingredient costs and 1 day less in manufacture time.
 
A smaller building or even an outdoor altar, statue or cairn of stones may be consecrated as a shrine in a similar fashion by a 4th level cleric.  The cleric casts Speak with Animals on an animal sacred to the god in question to see if there is some divine objection, and if not, casts a bless spell on the shrine.
 Any person can pray at the temple once per 2 months for a divine intervention.  This can only be in reference to the god's area of interest, and takes the form of a 1 in 20 chance for the god to allow the person to cast one appropriate spell of level 2 or less to help solve the problem.
 
 An initiate of the god can pray at the shrine once per month for a divine intervention.  This can only be in reference to the god's area of interest, and takes the form of a 1 in 6 chance for the god to allow the initiate to cast one appropriate spell of level 4 or lower to help solve the problem.
 
 A cleric of the god can pray at a shrine once per week for the god to retore all used spell slots for the day of level 4 or lower spells.   There is a 1 in 8 chance of the prayer being granted.