there is a class ability that gives a lesser form of mircle. (my build of 'Shenron - the wish-granting dragon...oracle' uses it).
it's the 10th level ability of the 'Exalted' prestige class. you could try and use that as a sample for the spell.
(then again having a spell mimic the top tier power of a prestige class might diminish that prestige class, why did i waste 10 levels going exalted if any schmuck with 8th level spells can do the same thing?)