Skip to content
#1889
Auto-translated
Perhaps it can be done like this. I just don't remember exactly what the second argument in GetSavedCombatArmyHero means.
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 1 do
		if GetLastSavedCombatIndex() ~= combat_index then
			if GetSavedCombatArmyHero(combat_index, 0) ~= hero and GetSavedCombatArmyHero(combat_index, 1) ~= hero then
				combat_index = GetLastSavedCombatIndex()
			else
				break
			end
		end
		sleep()
	end
	local result = IsHeroAlive(hero)
	return result
end

Statistics

Welcome our newest member: dodoD0D0