Skill roll based on highest skill in party
What is the most efficient way to roll a skill check from a conversation that automatically uses the skill level of the party member with the highest skill?
For example the player has 2 henchmen. Henchman A has a much higher Persuade skill than either the PC or Henchman B. From a conversation, the skill level of Henchman A is used during a skill check, as opposed to either PC or Henchman B.
Any guidance would be much appreciated!
Thank you!
For example the player has 2 henchmen. Henchman A has a much higher Persuade skill than either the PC or Henchman B. From a conversation, the skill level of Henchman A is used during a skill check, as opposed to either PC or Henchman B.
Any guidance would be much appreciated!
Thank you!
0
Comments
int StartingConditional() { int nDC = 15; object oPC = GetPCSpeaker(); int nSkill = GetSkillRank(SKILL_DISCIPLINE, oPC); SendMessageToPC(oPC, GetName(oPC) + "'s Skill Rank: " + IntToString(nSkill)); int nSkillHen; int nHen = 1; object oHen = GetHenchman(oPC, nHen); while (oHen != OBJECT_INVALID) { nSkillHen = GetSkillRank(SKILL_DISCIPLINE, oHen); SendMessageToPC(oPC, GetName(oHen) + "'s Skill Rank: " + IntToString(nSkillHen)); if (nSkillHen > nSkill) { nSkill = nSkillHen; } nHen = nHen + 1; oHen = GetHenchman(oPC, nHen); } SendMessageToPC(oPC, "Best Skill Rank: " + IntToString(nSkill)); int nSkillRoll = d20(); int nSkillCheck = nSkillRoll + nSkill; SendMessageToPC(oPC, IntToString(nSkillRoll) + " + " + IntToString(nSkill) + " = " + IntToString(nSkillCheck) + " vs DC " + IntToString(nDC)); if (nSkillCheck >= nDC) { SendMessageToPC(oPC, "Success"); return TRUE; } else { SendMessageToPC(oPC, "Failure"); } return FALSE; }