The caster levels for the palemaster are a total of the arcane casting class and half the palemaster levels.
Huh? You said you wanted Mummy Dust to use all of the Pale Master levels...was that a typo?
Assuming it wasn't, you should be able to change this section
int iClassCount = 0; //just making sure that the variable is zero probably unnecessary
int iIndex;
int nDruid = GetLevelByClass(CLASS_TYPE_DRUID);
int nWizard = GetLevelByClass(CLASS_TYPE_WIZARD);
int nSorcerer = GetLevelByClass(CLASS_TYPE_SORCERER);
int nCleric = GetLevelByClass(CLASS_TYPE_CLERIC);
to
int iClassCount = 0; //just making sure that the variable is zero probably unnecessary
int iIndex;
int nDruid = GetLevelByClass(CLASS_TYPE_DRUID);
int nWizard = GetLevelByClass(CLASS_TYPE_WIZARD) + GetLevelByClass(CLASS_TYPE_PALEMASTER);
int nSorcerer = GetLevelByClass(CLASS_TYPE_SORCERER) + GetLevelByClass(CLASS_TYPE_PALEMASTER);
int nCleric = GetLevelByClass(CLASS_TYPE_CLERIC);
Part of my concern here is that spells overlap. If you simply have the script find the highest caster level when you cast Bull's Strength, for example...then it'll assume Bull's Strength was cast as a level 21 Cleric rather than as a level 11 Wizard/Pale Master due to the fact that both spellbooks have Bull's Strength. See the issue?
This isn't a problem for Epic Spells (since they're not class specific) or spells specific to that class (or, more specifically, unique to that "half" or "third" of the character)...but it definitely can be an issue if all you do is check the highest class level.