Here is the latest build I have worked on for a very durable mage.If anyone has already built something similar to this, no copying was intentional. I built it from a standpoint of immunities and caster level. Without further waiting, here it is; the Demonic Elemental.
Race: Human Alignment: Neutral (this is a pvp orientated build so no smiting, plus elementals are neutral)
Stats: STR 10 - 10 DEX 14 - 17 (AotS bonus) CON 14 - 17 (AotS bonus) INT 16 - 26 (all normal stat gains shown below) WIS 12 - 12 CHA 10 - 10
Here are the end results for character capability. Pros: Respectable max hps of 320 (minimum of 200) My build had 291 without rerolling for max. Despite being only a level 20 wizard has a caster level of 39. Immune to sneak attacks, critical hits, lightning, stuns, poison, sleep and paralysis. All lightning spells have an additional +3 on spell penetration rolls, as well as +3 on DC checks Has Darkvision. Fire and cold resist of 20. Fiendish Glare can give -2 on attacks, damage, and saves on failed will save of 20. Glare of the pit does 16d6 damage once per day. With epic lore focus, is capable of 7 epic spells per day, also with epic spellcraft focus and some gloves of epic spellcraft, has a +101 on rolls to learn and cast epic spells. That's high enough to learn every epic spell in the PRC. Damage reduction of 20/+1. +2 Natural Armor. Pixie familiar can handle most locks and traps.
Cons: Takes double damage from acid spells (fortunately has spell elemental immunity for that). Even though decent hps for a mage, they are still low in general. Can summon a vrock, but it's only 15th level. AB is only +20 making touch and ranged touch attacks potentially tougher.
All in all I think this is a very solid spellcaster. Every piece of information given above was with the character completley naked.