Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
#1583
Auto-translated
Take a look in the file archive and the manuals. I think you'll find something there.
 

К А
Стикеры GBF в Telegram
User Avatar
#1584
Auto-translated
Didn't find anything about quests, but thanks anyway.

Added after 19 hours and 13 minutes
Okay, since I couldn't find a manual, maybe someone knows how to create a quest using scripts. A specific hero needs to reach a specific area; there's no reward, the quest is the main thing. And also, if scripts can only be written in map properties, then what's the point of having the script tab in cities and other objects?
In reply to Radionich
User Avatar
#1585
Auto-translated
Radionich
I couldn't find anything about quests, but thanks anyway.

Added after 19 hours and 13 minutes
Okay, since I couldn't find a manual, maybe someone knows how to create a quest using scripts. A specific hero must reach a specific area; there is no reward; the main thing is the quest itself. And also, if scripts can only be written in map properties, then why are there script tabs in cities and other objects?
1) Use the REGION_ENTER_AND_STOP_TRIGGER trigger.
2) These scripts are called in case of a battle with (or against) a given object. (example: the last mission of the last campaign of the original game.)
502 Bad Gateway
__________________________________
nginx/0.8.54
User Avatar
#1587
Auto-translated
Can anyone tell me the IDs for the perks: Cursed Land and Elemental Balance? I've been searching for ages and can't find them.

Whatever
In reply to Heroist
User Avatar
#1588
Auto-translated
Heroist
Can anyone tell me the IDs for the perks: Cursed Land and Elemental Balance? I've been searching for ages and can't find them.
Cursed Land - HERO_SKILL_SOIL_BURN (in scripts RANGER_FEAT_SOIL_BURN = 121)
Elemental Balance - HERO_SKILL_ELEMENTAL_BALANCE (KNIGHT_FEAT_ELEMENTAL_BALANCE = 84)
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1589
Auto-translated
I was looking for them among the Necropolis and Academy factions. What a lack of logic. Thanks!

Whatever
#1590
Auto-translated
Is it possible to change a hero's skills using scripts?
User Avatar
#1592
Auto-translated
Hello! I've started learning about scripts. I want the hero to enter the prophet's hut and receive experience, but only under certain conditions. The condition is that the hero must have a specific artifact. The artifact is the Angel Wings. I'm writing the script: function kamillaF() if HasArtefact("ARANTIR", ARTIFACT_ANGEL_WINGS); then MessageBox("/Maps/SingleMissions/1/NAME.txt"); ChangeHeroStat("ARANTIR", STAT_EXPERIENCE, 12000); Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", nil); else MessageBox("/Maps/SingleMissions/1/HELLO.txt"); end; end; Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", "kamillaF"); The script isn't working for some reason. Why?
User Avatar
#1593
Auto-translated
Try writing the ID number instead of the name, like 30. Although it should work either way.

Added 3 minutes later
Oh, never mind, you don't need to write "artifact" there; it will just result in "ANGEL_WINGS".
Ребят добавляйтесь в друзья в Steam ник CapObvious и в Ubi ник тот же , для удобства так сказать ;)
Поиграем :smile13:
User Avatar
#1594
Auto-translated
The script still doesn't work.
In reply to Вампир-лорд
User Avatar
#1595
Auto-translated
Vampire Lord
Hello! I've started working with scripts. I want the hero to enter the prophet's hut and receive experience, but only under certain conditions. The condition is that the hero must have a specific artifact. The artifact is the Angel Wings. I'm writing the script:
function kamillaF()
if HasArtefact ("ARANTIR", ARTIFACT_ANGEL_WINGS);
then MessageBox ("/Maps/SingleMissions/1/NAME.txt");
ChangeHeroStat ("ARANTIR", STAT_EXPERIENCE, 12000);
Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", nil );
else MessageBox ("/Maps/SingleMissions/1/HELLO.txt");
end;
end;



Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", "kamillaF" );
The script doesn't work for some reason. Why?
function kamillaF()
if HasArtefact("Arantir", 30) then
MessageBox(GetMapDataPath().."NAME.txt")
ChangeHeroStat("Arantir", STAT_EXPERIENCE, 12000)
Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", nil)
else
MessageBox(GetMapDataPath().."HELLO.txt")
end
end

Trigger(OBJECT_TOUCH_TRIGGER, "kamilla", "kamillaF")
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1596
Auto-translated
And then, isn't it necessary?
Ребят добавляйтесь в друзья в Steam ник CapObvious и в Ubi ник тот же , для удобства так сказать ;)
Поиграем :smile13:
In reply to Radionich
User Avatar
#1597
Auto-translated
Radionich
Isn't it necessary then?
Let's open our eyes and take a close look at the end of the second line.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#1598
Auto-translated
How can I separate one script from another?

Statistics

Welcome our newest member: Emil