RedHeavenHero1) лишняя s. Не Stats, а Stat
2) массив — нет, есть функция, которая возвращает список с идами:
_1, _2, _3, _4, _5, _6, _7 = GetHeroCreaturesTypes(hero)
спасибо) Но у меня не работает данный кусок. В консоли пишет что-то типа invalid ID=0 (arg1)
c1, c2, c3, c4, c5, c6, c7=GetHeroCreaturesTypes(heroname);
sleep(1);
if c1~=nil then
c11=GetHeroCreatures(heroname, c1);
else c11=0;
end;
if c2~=nil then
c22=GetHeroCreatures(heroname, c2);
else c22=0;
end;
if c3~=nil then
c33=GetHeroCreatures(heroname, c3);
else c33=0;
end;
if c4~=nil then
c44=GetHeroCreatures(heroname, c4);
else c44=0;
end;
if c5~=nil then
c55=GetHeroCreatures(heroname, c5);
else c55=0;
end;
if c6~=nil then
c66=GetHeroCreatures(heroname, c6);
else c66=0;
end;
if c7~=nil then
c77=GetHeroCreatures(heroname, c7);
else c77=0;
end;
sleep(1);
if c11~=0 then
RemoveHeroCreatures(heroname, c1, intg(c11*0.33));
end;
if c22~=0 then
RemoveHeroCreatures(heroname, c2, intg(c22*0.33));
end;
if c33~=0 then
RemoveHeroCreatures(heroname, c3, intg(c33*0.33));
end;
if c44~=0 then
RemoveHeroCreatures(heroname, c4, intg(c44*0.33));
end;
if c55~=0 then
RemoveHeroCreatures(heroname, c5, intg(c55*0.33));
end;
if c66~=0 then
RemoveHeroCreatures(heroname, c6, intg(c66*0.33));
end;
if c77~=0 then
RemoveHeroCreatures(heroname, c7, intg(c77*0.33));
end;