Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Server Hosting Support
  3. How to play with bots ?

How to play with bots ?

Scheduled Pinned Locked Moved BO1 Server Hosting Support
5 Posts 3 Posters 486 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Daishinkan96undefined Offline
    Daishinkan96undefined Offline
    Daishinkan96
    wrote on last edited by
    #1

    Hello,

    I tried several commands to make the bots appears in my server but nothing works.

    I have tried this :

    seta scr_bot_difficulty "normal"
    seta scr_bots_managed_all "19"
    seta scr_bots_managed_spawn "19"

    and this :

    set scr_bot_difficulty "normal"
    set scr_bots_managed_all "19"
    set scr_bots_managed_spawn "19"

    Can i have some help please ? Thanks a lot.

    Quikksterundefined 1 Reply Last reply
    0
    • Resxtundefined Offline
      Resxtundefined Offline
      Resxt Plutonium Staff
      wrote on last edited by
      #2

      Put the maps folder of Bot Warfare in %localappdata%\Plutonium\storage\t5 then set the dvar bots_manage_fill to 12 or whatever
      https://github.com/ineedbots/bo1_bot_warfare/releases

      1 Reply Last reply
      0
      • Quikksterundefined Offline
        Quikksterundefined Offline
        Quikkster
        replied to Daishinkan96 on last edited by
        #3

        Daishinkan96 Like Resxt said, take the maps folder from bot warfare but I have an addon for you to try with it, this goes in %localappdata%\Plutonium\storage\t5\scripts\mp

        #include maps\mp\_utility;
        #include common_scripts\utility;
        #include maps\mp\gametypes\_hud_util;
        
        init()
        {
            thread manageBots();
            level thread onPlayerConnect();
        
        }
        
        onPlayerConnect()
        {
            for(;;)
            {
                level waittill("connected", player);
        
                if(!player is_bot())
        	{
        		//kick a bot everytime a real player joins the server
                	player kickBot();
                }
            }
        }
        
        
        manageBots()
        {
            level endon("game_ended");
        
            print(va("*****Manage Bots FFA Func Started*****"));
            
            CHECK_INTERVAL = 2;
            BOT_MAX = 12;
            BOT_MIN = 2;
            PLAYERS_LIMIT = 16;
            
            for(;;){    
                botsCount = countBots();
            
                if( (level.players.size > PLAYERS_LIMIT && botsCount > BOT_MIN) || botsCount > BOT_MAX)
                kickBot2();
                else if( (level.players.size < PLAYERS_LIMIT && botsCount < BOT_MAX) || botsCount < BOT_MIN)
                setdvar("bots_manage_add", 1);
        
                wait CHECK_INTERVAL;
            }
        }
        
        countBots(){
            botsCount = 0;
        
            for ( i = 0; i < level.players.size; i++ ) {
                if(level.players[i] is_bot())
                    botsCount++;
            }
        
            return botsCount;
        }
        
        
        kickBot()
        {
            players = level.players;
            for ( i = 0; i < players.size; i++ )
            {
                player = players[i];
                if(player is_bot())
                {
                kick(player getEntityNumber(),"EXE_PLAYERKICKED");
                break;
                }
            }
            wait .5;
        }
        
        kickBot2(){
            players = level.players;
            for ( i = 0; i < players.size; i++ )
            {
                player = players[i];
                if(player is_bot() && !player isHost())
                    return kick(player getEntityNumber());
            }
        }
        
        
        Resxtundefined 1 Reply Last reply
        0
        • Resxtundefined Offline
          Resxtundefined Offline
          Resxt Plutonium Staff
          replied to Quikkster on last edited by
          #4

          Quikkster you should explain what it does, not everyone can read scripts.

          Also it looks like something you could do with bots_manage_fill "12" and bots_manage_fill_kick "1"
          https://github.com/ineedbots/bo1_bot_warfare#dvars

          Quikksterundefined 1 Reply Last reply
          0
          • Quikksterundefined Offline
            Quikksterundefined Offline
            Quikkster
            replied to Resxt on last edited by
            #5

            Resxt true true

            1 Reply Last reply
            0

            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Donate