Auto-translated
Let me warn you right away that "random" is already a reserved variable name; it's also the name of a function.
function Armia()
local creatures = {{id1, quantity}, {id2, quantity}, etc}
if GetDate(3)==3 then
creature = creatures[random(length(creatures))+1] -- We take a random creature
local id = creature[1] -- We get its ID
local amount = creature[2] -- And the quantity for this type
CODE that operates with the random ID and quantity
end
end
And would it be possible to implement it this way?
function Armia()
local day=GetDate(3)
if day==3 then (
local id = random (4)
if id=0 then
AddHeroCreatures("Raelag, 1,200)
elseif id=1 then
AddHeroCreatures("Raelag, 2,50)
elseif id=2 then
AddHeroCreatures("Raelag, 3,30)
and so on.
end
;end;
end;
I'm sure there are syntax errors, but I think the meaning of the question is clear