- Регистрация
- 17 Мар 2022
- Сообщения
- 7.068
- Реакции
- 3.936
- Баллы
- 562
- Лучшие ответы
- 206



func void dia_vatras_teach_regenhealth() {
var int kosten;
var int money;
ai_output(other, self, "DIA_Vatras_Teach_regen_15_04"); //Научи меня регенерации здоровья.
kosten = 12;
money = 10000;
if (rx_isfullsnc()) {
kosten = 0;
if (hero.attribute[atr_hitpoints_max] /*1*/ < 1000) {
ai_printred(rx_str_snc_noskillreq);
ai_stopprocessinfos(self);
return;
};
};
if (hero.lp < kosten) {
ai_print(print_notenoughlearnpoints);
b_say(self, other, "$NOLEARNNOPOINTS");
ai_stopprocessinfos(self);
return;
};
if (npc_hasitems(hero, itmi_gold) < money) {
ai_print(print_notenoughgold);
ai_output(self, other, "DIA_Vatras_Teach_regen_03_90"); //У тебя не хватает для этого золота! Приходи позже.
ai_stopprocessinfos(self);
return;
};
if ((hero.lp >= kosten) && (npc_hasitems(other, itmi_gold) >= money)) {
hero.lp = hero.lp - kosten;
rankpoints = rankpoints + kosten;
npc_removeinvitems(other, itmi_gold, money);
ai_printbonus("Обучение: Регенерация здоровья, усиленное лечение");
vatras_teachregen = true;
snd_play("LevelUP");
};
info_clearchoices(dia_vatras_canteachmanaregen /*74021*/);
};
;
vatras_teachregen = true;
if (((((((((((vatras_teachregen == true) && (sbmode == true)) && (atr_stamina > 0)) && (hero_hunger >= 1)) && (hero_thirst >= 1)) && (herotrans == false)) && (endgamecredits == false)) && (heroisdead == false)) && (hero.attribute[atr_hitpoints] /*0*/ > 0)) && (hero.attribute[atr_hitpoints] /*0*/ < hero.attribute[atr_hitpoints_max] /*1*/)) && (!poisoned)) {
if (reload_health >= 2) {
if (xardas_knowssactanome) {
health_reglvl = 4 + (hero.attribute[atr_hitpoints_max] /*1*/ / 200);
}
else {
health_reglvl = 4 + (hero.attribute[atr_hitpoints_max] /*1*/ / 90);
};
if (rx_checkhealthpercent(hero, 10) && (!xardas_knowssactanome)) {
health_reglvl = health_reglvl * 4;
};
hpbonus += health_reglvl;
reload_health = false;
}
else {
reload_health += 1;
};
};