Skip to content
#2935
Auto-translated
Here is the code:
Ornel=0
Ornel_d=0
--
Gl=0
Gl_d=0
--
Dug=0
Dug_d=0
--
Airi=0
Airi_d=0

Mive=0
Mive_d=0

function DeathHavenHero(hero)
if hero== Ornella then
Ornel_d=1
Ornel=GetDate(DAY)
MakeHeroReturnToTavernAfterDeath(Ornella,0)
print("Gloria is dead")
end
if hero==Glen then
Gl_d=1
Gl=GetDate(DAY)
MakeHeroReturnToTavernAfterDeath(Glen,0)
end
--
if hero=="Orrin" then
Dug_d=1
Dug=GetDate(DAY)
MakeHeroReturnToTavernAfterDeath("Orrin",0)
end

if hero=="Ving" then
Airi_d=1
Airi=GetDate(DAY)
MakeHeroReturnToTavernAfterDeath("Ving",0)
end
if hero=="Maeve" then
Mive_d=1
Mive=GetDate(DAY)
MakeHeroReturnToTavernAfterDeath("Maeve",0)
end
end

Trigger (PLAYER_REMOVE_HERO_TRIGGER, PLAYER_2, "DeathHavenHero")

dayd={8,7,6,5}

function NewDay()
if GetDate(MONTH)==2 and GetDate(WEEK)==2 then
coef={1.5,2,2.5,3}
end
if Ornel_d==1 and GetDate(DAY)-Ornel== dayd[diff] then
MakeHeroReturnToTavernAfterDeath(Ornella,1,1)
Ornel_d=0
print("Gloria is ready")
end

if Gl_d==1 and GetDate(DAY)- Gl== dayd[diff] then
MakeHeroReturnToTavernAfterDeath(Glen,1,1)
Gl_d=0
print("Glen is ready")
end

if Dug_d==1 and GetDate(DAY)- Dug== dayd[diff] then
MakeHeroReturnToTavernAfterDeath("Orrin",1,1)
Dug_d=0
print("Dugald is ready")
end

if Airi_d==1 and GetDate(DAY)- Airi== dayd[diff] then
MakeHeroReturnToTavernAfterDeath("Ving",1,1)
Airi_d=0
print("Airis is ready")
end

if Mive_d==1 and GetDate(DAY)- Mive== dayd[diff] then
MakeHeroReturnToTavernAfterDeath("Maeve",1,1)
Mive_d=0
print("Maeve is ready")
end
end

Trigger(0,"NewDay")

I tried to make it so that heroes would be resurrected in the tavern after some time, but now no hero is resurrected. There are no errors in the console... What is the problem?
Карты: Экспедиция ГрувераНаследие ШантириВременной парадоксПоиски рунной сферыПуть возвращения