func int B_TeachFightTalentPercent(var C_Npc slf,var C_Npc oth,var int talent,var int percent,var int teacherMAX)
{
    // Изучается навык владения одноручным оружием.
    if(talent == NPC_TALENT_1H)
    {
        if (sPerm_Attr_KTS_Hero_talent(talent,percent) == FALSE)
        {
            return FALSE;
        };
    };
    if(talent == NPC_TALENT_2H)
    {
        if(sPerm_Attr_KTS_Hero_2H_STR(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает силы для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
        if(sPerm_Attr_KTS_Hero_2H_DEX(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает ловкости для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
    };
    if(talent == NPC_TALENT_BOW)
    {
        if(sPerm_Attr_KTS_Hero_BOW_DEX(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает ловкости для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
        if(sPerm_Attr_KTS_Hero_BOW_STR(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает силы для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
    };
    if(talent == NPC_TALENT_CROSSBOW)
    {
        if(sPerm_Attr_KTS_Hero_CROSSBOW_STR(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает силы для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
        if(sPerm_Attr_KTS_Hero_CROSSBOW_DEX(percent) == false)
        {
            B_PrintPlayerMiddle(oth,"Не хватает ловкости для дальнейшего обучения");
            B_Say(slf,oth,"$NOLEARNNOPOINTS");
            return FALSE;
        };
    };
    if(oth.lp < cost)
    {
        B_PrintPlayerMiddle(oth,PRINT_NotEnoughLP);
        B_Say(slf,oth,"$NOLEARNNOPOINTS");
        return FALSE;
    };
    if(PremiumTeachersEnabled == TRUE)
    {
        if(!B_GiveInvItems(oth,slf,ItMi_Gold,cost * PremiumTeachersPrice))
        {
            B_PrintPlayerMiddle(oth,Print_NotEnoughGold);
            DIA_Common_WeWillGetToThatLater();
            return FALSE;
        };
    };
   
    var string concatText;
    var int cost;
    var int limitReason;
    limitReason = B_GetTeachLimitReason(oth,talent,percent,teacherMax);
    if(limitReason == TLR_AlreadyMax)
    {
        B_PrintPlayerMiddle(oth,PRINT_NoLearnOverMAX);
        B_Say(slf,oth,"$NOLEARNYOUREBETTER");
        return FALSE;
    }
...