Skip to content
User Avatar
#893
Auto-translated
Battle script: function Start() hero = GetAttackerHero() if GetHeroName("hero") == 'Alaric' then cast = GetGameVar('spell')+0 mana = GetUnitManaPoints(hero) SetUnitManaPoints(hero, 100) if cast == 0 then UnitCastGlobalSpell(hero, 54) elseif cast == 1 then UnitCastGlobalSpell(hero, 221) elseif cast == 2 then UnitCastGlobalSpell(hero, 218) elseif cast == 3 then UnitCastGlobalSpell(hero, 220) elseif cast == 4 then UnitCastGlobalSpell(hero, 219) elseif cast == 5 then UnitCastGlobalSpell(hero, 216) end SetUnitManaPoints(hero, mana) end Script: function rndcast() while 1 do SetGameVar('spell', random(6)) local index = GetLastSavedCombatIndex() while index == GetLastSavedCombatIndex() do sleep(10) end end end startThread(rndcast)

Whatever