int SkillCheck(int DC, int nSkill, object oTarget, int bUntrainedAllowed=TRUE)
{
    int nRank = GetSkillRank(nSkill, oTarget);
    SendMessageToPC(GetFirstPC(), "Rank=" + IntToString(nRank));
    // Exit if oTarget doesn't have this skill
    //if (nRank = -1)
    //    return FALSE;
    // Exit if untrained and bUntrainedAllowed == FALSE
    //if ((bUntrainedAllowed == FALSE) &&  (nRank == 0))
    //    return FALSE;
    // Roll!
    int nRoll = d20();
    SendMessageToPC(GetFirstPC(), "Roll=" + IntToString(nRoll));
    if (d20() + nRank >= DC)
        return TRUE;

    return FALSE;
}
