Skip to content
User Avatar
#1884
Auto-translated
RedHeavenHero
You can redefine the function itself so that it returns the result of the battle:
local wrapStartCombat = StartCombat
function StartCombat(hero, enemy, stacks, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)
%wrapStartCombat(hero, enemy, stacks, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)
local combat_index = GetLastSavedCombatIndex()
while GetLastSavedCombatIndex() == combat_index do
sleep()
end
local result = IsHeroAlive(hero)
return result
end
Then you don't need to pass control to another function, but continue executing the current one.
Clever. Thanks. Remind me, please, what advantage does using % before a variable give?
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

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

Statistics

Welcome our newest member: artem

Users Online 0 users 1697 guests

The tavern is quiet... be the first to arrive!