Skip to content
#3054
Auto-translated
Gerter
UpgradeTownBuilding(town_name, building_id)

regarding adding creatures for recruitment – there is a function for this: SetObjectDwellingCreatures(town_name, creature_id, number)
I wrote the following script (it doesn't work):
local a=0;
function Armia()
local day=GetDate(3);
if day == 0
then a=a+1;
end;
end;

Trigger(NEW_DAY_TRIGGER, "Armia");

function zoloto()
if prewOwner == PLAYER_NOON and newOwner == PLAYER_NAME
then SetObjectDwellingCreatures('houseInferno', 16, 35*a);
SetObjectDwellingCreatures('houseInferno', 18, 34*a);
SetObjectDwellingCreatures('houseInferno', 20, 18*a);
SetObjectDwellingCreatures('houseInferno', 22, 10*a);
SetObjectDwellingCreatures('houseInferno', 24, 7*a);
SetObjectDwellingCreatures('houseInferno', 26, 4*a);
SetObjectDwellingCreatures('houseInferno', 28, 2*a);

end;
end;

Trigger( OBJECT_CAPTURE_TRIGGER, 'houseInferno', "zoloto")

What could be the error? Please advise

Statistics

Welcome our newest member: leyu