Skip to content

Scripts for beginners.

#244
Auto-translated
}{0TT@6bI4
Okay, try this:

preserve_heroes={"Elleshar", "Linaas", "Gillion", "Diraya", "Itil", "Ossir", "Nadaur"}
function Def( heroName )
PreserveHero=0
for key, name in preserve_heroes do
if name == heroName then local PreserveHero=1
end;
end;
if  PreserveHero==0 then         
StartCombat(heroName, "Metlirn",7,44,24,146,80,148,16,147,48,50,16,48,48,44,24)    
end;
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "def", "Def" );
All heroes still enter the battle.
And there are no messages in the console.