Ребята помогите. Не работает вот это:
function ZehirFlev1 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 1 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 320);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev1" );
function ZehirFlev3 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 3 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 600);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev3" );
function ZehirFlev5 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 5 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 750);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev5" );
function ZehirFlev7 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 7 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 950);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev7" );
function ZehirFlev10 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 10 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 400);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev10" );
function ZehirFlev12 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 12 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 700);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev12" );
function ZehirFlev14 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 14 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 820);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev14" );
function ZehirFlev16 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 16 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev16" );
function ZehirFlev18 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 18 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 350);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev18" );
function ZehirFlev20 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 20 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 830);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev20" );
function ZehirFlev22 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 22 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 400);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev22" );
function ZehirFlev25 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 25 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev25" );
function ZehirFlev28 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 28 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 525);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev28" );
function ZehirFlev30 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 30 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev30" );
function ZehirFlev33 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 33 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 650);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev33" );
function ZehirFlev35 (hero)
if IsHeroAlive("Zehir") == not nil and GetHeroLevel ("Zehir") >= 35 then
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
sleep(5);
ChangeHeroStat("Zehir", STAT_EXPERIENCE, 900);
end;
end;
Trigger(NEW_DAY_TRIGGER, "ZehirFlev35" );
До этого писал специализацию через проверку стат опыта(
GetHeroStat), но она работала, когда у героя именно столько опыта, а не выше, что мне как раз и нужно.