You can do this based on a custom method. Add this at the bottom of bot.cpp:
Code:
uint8 Bot::GetMaxBots(uint8 level) {
if (level >= 1 && level <= 9)
return 1;
else if (level >= 10 && level <= 19)
return 2;
else if (level >= 20 && level <= 29)
return 3;
else if (level >= 30 && level <= 39)
return 4;
else if (level >= 40 && level <= 64)
return 5;
else if (level >= 65)
return 71;
}
Add this in bot.h:
Code:
uint8 GetMaxBots(uint8 level);
And change this line:
Code:
if(spawnedBotCount >= RuleI(Bots, SpawnBotCount) && !c->GetGM())
To this:
Code:
if(spawnedBotCount >= GetMaxBots(c->GetLevel()) && !c->GetGM())