There is a StartCombat function that triggers a function at the end of the battle. This function passes the hero and the result of the battle for that hero. How can I add more values to the parameters being passed?
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
endThen, you can avoid passing control to another function and continue executing the current one.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4