void main() { object oPC = GetLastUsedBy(); int nSwimBonus = 0; int nSwimCheck = 0; int nSwimResult = 0; //0=failure, 1=success nSwimBonus = nSwimBonus + (GetAbilityModifier(ABILITY_STRENGTH, oPC) * 2); nSwimBonus = nSwimBonus + (GetAbilityModifier(ABILITY_CONSTITUTION, oPC) * 2); nSwimBonus = nSwimBonus + GetAbilityModifier(ABILITY_DEXTERITY, oPC); nSwimCheck = nSwimBonus + d10(1); if (nSwimCheck>9) { nSwimResult = 1; } //SendMessageToPC(oPC, "Your result is " + IntToString(nSwimCheck)); SetLocalInt(OBJECT_SELF, "SWIM_BONUS", nSwimBonus); SetLocalInt(OBJECT_SELF, "SWIM_RESULT", nSwimResult); ActionStartConversation(oPC, "", TRUE); }