Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Happy New Year to everyone! While working on the specialization "hero learns Dark Magic spells as they level up," I encountered a problem: if the hero is hired in a tavern instead of being chosen at the start, their specialization won't work. Perhaps something needs to be added to the code?
function IsoldaS()
local hero="Isolda"
local lvl=GetHeroLevel("Isolda")
if lvl == 3 then
TeachHeroSpell(hero, 12)
elseif lvl == 5 then
TeachHeroSpell(hero, 11)
elseif lvl == 8 then
TeachHeroSpell(hero, 15)
elseif lvl == 10 then
TeachHeroSpell(hero, 14)
elseif lvl == 15 then
TeachHeroSpell(hero, 13)
elseif lvl == 18 then
TeachHeroSpell(hero, 17)
elseif lvl == 20 then
TeachHeroSpell(hero, 18)
elseif lvl == 23 then
TeachHeroSpell(hero, 212)
elseif lvl == 25 then
TeachHeroSpell(hero, 210)
elseif lvl == 28 then
TeachHeroSpell(hero, 215)
elseif lvl == 30 then
TeachHeroSpell(hero, 214)
elseif lvl == 33 then
TeachHeroSpell(hero, 211)
elseif lvl == 35 then
TeachHeroSpell(hero, 213)
elseif lvl == 38 then
TeachHeroSpell(hero, 21)
elseif lvl == 40 then
TeachHeroSpell(hero, 20)
end
end
Trigger(HERO_LEVELUP_TRIGGER, "Isolda", "IsoldaS")