Skip to content
User Avatar
#812
Auto-translated
Nikitatigr
The script doesn't work:
if GetDifficulty() == DIFFICULTY_EASY then
AddObjectCreatures ( "townhero",78,5 );
AddObjectCreatures ( "townhero",142,7 );
GiveExp( "Ferigl",17500 );
end;

if GetDifficulty() == DIFFICULTY_NORMAL then
AddObjectCreatures ( "townhero",78,7 );
AddObjectCreatures ( "townhero",142,7 );
GiveExp ( "Ferigl",12200 );
end;

if GetDifficulty() == DIFFICULTY_HARD then
AddObjectCreatures ( "townhero",78,6 );
AddObjectCreatures ( "townhero",142,6 );
GiveExp( "Ferigl",10000 );
end;

if GetDifficulty() == DIFFICULTY_HEROIC then
AddObjectCreatures ( "townhero",78,4 );
AddObjectCreatures ( "townhero",82,2 );;
GiveExp( "Ferigl",6200 );
end;
Question: what is the error?
GiveExp seems to be written incorrectly (where do you even find these?):
GiveExpToLevel – and this function gives the amount of experience needed for the next level.
And to give a specific amount, you need a function like this: ChangeHeroStat
P.S. It would be good to write what the console displays.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...