Skip to content
User Avatar
#4
Auto-translated
Could the name be changed as well? It essentially needs to be created from scratch, just to avoid the hassle of copying all the information from the old hero. When I created characters for myself, I didn't have any problems.

Added 8 minutes later
And the function also needs to include a check for accuracy:
setCount = 0;

function setInfo(object, hero)
    setCount = setCount+1;
    heroname = hero;
    sleep(5);
    if IsHeroAlive(heroname) ~= true then
        return;
    end;

    if setCount == 1 then
        MessageBox(GetMapDataPath()..'count1from8.txt');
    elseif setCount == 2 then
        MessageBox(GetMapDataPath()..'count2from8.txt');
    elseif setCount == 3 then
        MessageBox(GetMapDataPath()..'count3from8.txt');
    elseif setCount == 4 then
        MessageBox(GetMapDataPath()..'count4from8.txt');
    elseif setCount == 5 then
        MessageBox(GetMapDataPath()..'count5from8.txt');
    elseif setCount == 6 then
        MessageBox(GetMapDataPath()..'count6from8.txt');
    elseif setCount == 7 then
        MessageBox(GetMapDataPath()..'count7from8.txt');
    elseif setCount == 8 then
        MessageBox(GetMapDataPath()..'count8from8.txt');
        GiveArtefact("heroname", artifact1Id);
        GiveArtefact("heroname", artifact2Id);
        ChangeHeroStat("heroname", STAT, count);
    end;
end;

Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard1', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard2', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard3', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard4', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard5', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard6', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard7', 'setInfo');
Trigger(OBJECT_TOUCH_TRIGGER, 'dragonGuard8', 'setInfo');
Карты для Heroes V: Повелители орды:
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация

Statistics

Welcome our newest member: leyu