Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to RedHeavenHero
User Avatar
Auto-translated
RedHeavenHero
PlayObjectAnimation('griphon','happy',ONESHOT)--to prevent it from freezing.
For other monsters, you need to click on "..." and in the AnimSet field, select the arena animation for it using the same "...", instead of LOD.
Thank you very much, I figured it out. And do you happen to know how to write the animation for a shot?
User Avatar
Auto-translated
How do I use the SetRegionBlocked script? I want to prevent player 2 from accessing a region. How can I do this?
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
Auto-translated
Ment, that’s exactly what I was doing, but he passed through without any problems, while I couldn’t...
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
Warrior777
Ment, that's what I did, but he passed through without any problems, while I couldn't...
What color is your "second" player? Or are you placing not 2, as Ment writes, but 1.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
User Avatar
Auto-translated
Dyrman, Ment, I've already figured it out. There really was a 1 there.
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
The script is not working:
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?
Мои карты:
Три недели: /topic/at/583154/
Неспокойные земли: /topic/9211/
Неравное Противостояние: /topic/9473/
In reply to Nikitatigr
User Avatar
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: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
Auto-translated
Dyrman
GiveExp() seems to be written incorrectly:
GiveExpToLevel() - and this function gives the amount of experience needed for the next level
P.S. It would be good to mention what the console displays.
The console does indeed complain about GiveExp, as well as Get difficulty and Difficulty Easy, Difficulty Normal, etc.

Added 1 minute ago
GiveExp was taken from the manual. It worked when there were no other scripts.
Мои карты:
Три недели: /topic/at/583154/
Неспокойные земли: /topic/9211/
Неравное Противостояние: /topic/9473/
In reply to Nikitatigr
User Avatar
Auto-translated
Nikitatigr
The console actually throws errors for GiveExp, as well as for Get difficulty and Difficulty Easy, Difficulty Normal, etc.

Added 1 minute ago
GiveExp was taken from the manual. It worked when there were no other scripts.
Try using ChangeHeroStat and entering the difficulty IDs as numbers.
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
Auto-translated
Dyrman
Try using ChangeHeroStat and inputting the difficulty IDs as numbers.
No, seriously. The Nival guys are pulling a fast one. :(
0 - Recruit, 1 - Warrior, 2 - Veteran, 3 - Hero ;)
502 Bad Gateway
__________________________________
nginx/0.8.54
In reply to Warrior777
User Avatar
Auto-translated
Thanks to everyone for your help, the script finally works!
I replaced the difficulty ID with numbers and added experience gain upon hero level up.
Мои карты:
Три недели: /topic/at/583154/
Неспокойные земли: /topic/9211/
Неравное Противостояние: /topic/9473/
User Avatar
Auto-translated
And by the way, this script doesn't work for me!:smile29:
if GetDifficulty () = 0 then
AddHeroCreatures ('Isabell', 2, 100);
AddHeroCreatures ('Isabell', 4, 50);
AddHeroCreatures ('Isabell', 6, 30);
print ('Generated army for hero Изабель: 100 Militia, 50 Archers, 30 Plate Mail, 10 Royal Griffins');
end;
if GetDifficulty () = 1 then
AddHeroCreatures ('Isabell', 2, 150);
AddHeroCreatures ('Isabell', 4, 100);
AddHeroCreatures ('Isabell', 6, 50);
AddHeroCreatures ('Isabell', 8, 10);
print ('Generated army for hero Изабель: 150 Militia, 100 Archers, 50 Plate Mail, 20 Royal Griffins');
end;
if GetDifficulty () = 2 then
AddHeroCreatures ('Isabell', 2, 200);
AddHeroCreatures ('Isabell', 4, 120);
AddHeroCreatures ('Isabell', 6, 70);
AddHeroCreatures ('Isabell', 8, 20);
print ('Generated army for hero Изабель: 200 Militia, 120 Archers, 70 Plate Mail, 30 Royal Griffins');
end;
if GetDifficulty () = 3 then
AddHeroCreatures ('Isabell', 2, 250);
AddHeroCreatures ('Isabell', 4, 150);
AddHeroCreatures ('Isabell', 6, 100);
AddHeroCreatures ('Isabell', 8, 40);
print ('Generated army for hero Изабель: 250 Militia, 150 Archers, 100 Plate Mail, 50 Royal Griffins');
end;
The console is complaining:
(Script) ERROR: 'then' expected;
last token read: `0' at line 10 has string 'DoString script'
Script failed, unknown error

I'm completely fed up! :smile33: What should I do :smile45:
502 Bad Gateway
__________________________________
nginx/0.8.54

Statistics

Welcome our newest member: Emil