I assume you are talking via (or adding it to) the onequip event script? Got a snipet of code that can do this you wouldn't mind sharing for this purpose?
Uh, this is a segment of code in an older module that I was using for some special armor that required a certain amount of dexterity to use. Should give you the gist of the idea. Might need a ClearAllActions call to be safer, don't recall, never wound up testing it extensively.
// -------------------------------------------------------------------------
// Shadowwalker Armor code
// Gives higher AC but requires a certain amount of base dexterity
// Base dexterity modifier must be equal to (total AC value/2) -1
// -------------------------------------------------------------------------
string sArmor = GetTag(oItem);
if (GetStringLeft(sArmor, 9) == "arm_pa_sw" || GetStringLeft(sArmor, 9) == "arm_la_sw" || GetStringLeft(sArmor, 9) == "arm_sl_sw")
{
int nDex = ((GetAbilityScore(oPC, ABILITY_DEXTERITY, TRUE))-10)/2;
int nAC = GetItemACValue(oItem);
if (nDex < ((nAC/2) + 1))
{
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("You are not able to make proper use of of this armor.", oPC, FALSE);
}
}