Skip to content
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

Statistics

Welcome our newest member: artem

Users Online 1 users 1472 guests