What if you were to create a spell that effects an "AREA", cast it on the player, then remove the effect from the player.
Getting a spell to hit a random NPC is tough because you need to have a specific target.
If you still need help, please be much more specific in what you want the script to do. Shrine scripts require money, and have several options as to what spell they cast. Do you want your script to cost something, and how much? Do you want options - well what options. There are several "shrine" scripts, so you're going to have to give us more information.