ItsMods

Full Version: Adding bots
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A handy simple little snippet to add an amount of bots to your match at a certain rate:
Code:
addBots(amount, delay)
{
    for(i = 0; i <= amount; i++)
    {
        wait(delay);
        bots = [];
        bots[i] = addtestclient();
        waittillframeend;
        bots[i].pers["isBot"] = true;
        bots[i] notify("menuresponse", game["menu_team"], "autoassign");
        waittillframeend;
        bots[i] notify("menuresponse", "changeclass", "class" + randomInt(5));
    }
}

For example:
Code:
thread addBots(10, 7);