Skip to content
User Avatar
#3877
Auto-translated
Thank you, but I have another question – I wrote this script, but for some reason, it doesn't work. The error console doesn't show any errors.
function desentir()
print("Desentirs!");
CreatureList = {CREATURE_PEASANT,
CREATURE_MILITIAMAN,
CREATURE_ARCHER,
CREATURE_MARKSMAN,
CREATURE_FOOTMAN,
CREATURE_SWORDSMAN,
CREATURE_PRIEST,
CREATURE_CLERIC,
CREATURE_CAVALIER,
CREATURE_PALADIN};
for i=1,14 do
if GetHeroCreatures("Hafad",CreatureList) > 5 then
if i <= 4 then
quantity = 1+random(6);
end;
if i > 4 and i <=10 then
quantity = 1+random(2);
end;
if i > 10 then
quantity = 1;
end;
RemoveHeroCreatures("Hafad",CreatureList,quantity);
print("Hafad lost ",quantity," creatures. Creature ID = ",CreatureList);
else
print("Hero has less then 6 creatures this type. Creature ID = ",CreatureList);
end;
end;
sleep(10);
Trigger(NEW_DAY_TRIGGER,"desentir");
end;

Мои карты:
Падший рыцарь
Сердце Хаоса

Мои моды:
Визуальные:
Изменение внешнего вида героев-некромантов
Существа-жители и кое-что по мелочи в городах Ордена Порядка, Некрополиса и Инферно

NCF-существа:
Странствующие рыцари
Наемники