Could I make a custom function to check the SR of a target vs the caster to get a succeed / fail result?
When I say hook into I mean bypass standard code or even hardcode if possible...
And if so, could you tell me how I should calculate standard SR?
====================
EDITED
I worked something up real fast to give you something to go on, a custom function (multiple are already made)
int SpellResisted(object oCaster, object oTarget, int nSpellID)
{
int iResist = FALSE;
//This is another custom function to return the true level of the caster
//This check returns all qualifying class levels
int nCL = GetCombinedCasterLevel(oCaster);
int nTSR = GetSpellResistance(oTarget);
int nSpellLevel;
int nSR;
//Check the level of the spell (Another Custom Function, but will need help with this one!)
nSpellLevel = GetSpellLevel(nSpellID);
nSR = nCL + 10 + nSpellLevel;
if(nTSR > nSR)
{
iResist = TRUE;
}
return iResist;
}
I need help coming up with a function to check the level of the spell (being cast), if you can help there that would be a huge help!
Modifié par _Guile, 26 août 2011 - 03:55 .