ага, спс это работает.
А можно ли сделать случайный выбор заклинания? Сейчас поясню:
function Start()
hero = GetAttackerHero ()
cast = random (5)
if cast == 0 then
UnitCastGlobalSpell(hero, 54)
elseif cast == 1 then
UnitCastGlobalSpell(hero, 24)
elseif cast == 2 then
UnitCastGlobalSpell(hero, 25)
elseif cast == 3 then
UnitCastGlobalSpell(hero, 28)
elseif cast == 4 then
UnitCastGlobalSpell(hero, 29)
elseif cast == 5 then
UnitCastGlobalSpell(hero, 23)
end
end
?