void main() { object oPC = GetLastSpeaker(); int nRoll=d20(); int nRank=GetBaseAttackBonus (oPC); int iDexMod = GetAbilityModifier(ABILITY_DEXTERITY,oPC); int iStrMod = GetAbilityModifier(ABILITY_STRENGTH,oPC); if (GetHasFeat(FEAT_WEAPON_FINESSE,oPC) && ( iDexMod > iStrMod ) ) { nRank+=iDexMod; } else { nRank+=iStrMod; } int nResult=nRoll+nRank; string sRoll=IntToString(nRoll); string sRank=IntToString(nRank); string sResult=IntToString(nResult); string sAbility="Attack"; AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0)); AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult)); }