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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [ZM] Updated bo2_zm_bots

[ZM] Updated bo2_zm_bots

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
62 Posts 16 Posters 8.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vandal59undefined vandal59

    BySc link

    ByScundefined Offline
    ByScundefined Offline
    BySc
    wrote on last edited by
    #17

    @bocanegra59 edited first post you can find gihub link.

    1 Reply Last reply
    0
    • Maximizer Blakeundefined Maximizer Blake

      Can you add bots grief mode?

      ByScundefined Offline
      ByScundefined Offline
      BySc
      wrote on last edited by
      #18

      Maximizer Blake I never played but i will look at.

      C2PLAZM-J007 said in [ZM] Updated bo2_zm_bots:

      we need it for t5, i can spawn bots in t5 but need more work

      GhostRider0125 said in [ZM] Updated bo2_zm_bots:

      damn how did i miss this gem?! This is an amazing feet! 👏

      Can you make a version that bots only start with jug but they have to buy the other perks and if they down they lose them all except they keep jug

      and no auto ammunition they either they train until get max ammo or buy another gun😁🙏

      i can disable auto ammo, and already function for buying perks just need to change small thing.

      vandal59undefined 1 Reply Last reply
      1
      • ByScundefined BySc

        Resxt Because when i try to load raw version of the script it gives error "Failed to load custom script" maybe because i am using older version of the game r2905 for offline.
        I dont have reputation for posting links because of this reason i removed "." from github

        cyrex crimsundefined Offline
        cyrex crimsundefined Offline
        cyrex crims
        wrote on last edited by
        #19

        BySc you make it very hard how i can compile it can you give me link of gsc tool ?

        1 Reply Last reply
        1
        • ByScundefined Offline
          ByScundefined Offline
          BySc
          wrote on last edited by
          #20

          You dont need to compile you can just copy script the folder we dont need compile now.

          cyrex crimsundefined 1 Reply Last reply
          1
          • ByScundefined Offline
            ByScundefined Offline
            BySc
            wrote on last edited by
            #21

            Updated code bot now buy weapons for ammo replenished

            1 Reply Last reply
            1
            • GhostRider0125undefined Offline
              GhostRider0125undefined Offline
              GhostRider0125
              wrote on last edited by
              #22

              Nice😆👌

              1 Reply Last reply
              0
              • RlKk01undefined Offline
                RlKk01undefined Offline
                RlKk01
                wrote on last edited by
                #23

                Is there anyway to mix this script:

                bot_buy_box()
                {
                if(self maps\mp\zombies_zm_laststand::player_is_in_laststand())
                return;

                if(!isDefined(level.chests) || level.chests.size == 0)
                    return;
                    
                current_box = level.chests[level.chest_index];
                if(!isDefined(current_box))
                    return;
                
                dist = Distance(current_box.origin, self.origin);
                    
                // Only try to use box if we have enough points and aren't too far
                if(self.score >= 1900 && dist < 150)
                {
                    // Check if box is available
                    if(!is_true(current_box._box_open) && !is_true(current_box._box_opened_by_fire_sale) && !flag("moving_chest_now"))
                    {
                        if(FindPath(self.origin, current_box.origin, undefined, 0, 1))
                        {
                            // Move to box if not already there
                            if(dist > 75)
                            {
                                self AddGoal(current_box.origin, 50, 2, "boxBuy");
                                return;
                            }
                            
                            // Use the box when close enough
                            self maps\mp\zombies\_zm_score::minus_to_player_score(950);
                            current_box notify("trigger", self);
                            
                            // Wait for weapon to appear and box to fully open
                            wait 4;
                            
                            // Try to grab weapon multiple times to ensure it's picked up
                            for(i = 0; i < 3; i++)
                            {
                                if(is_true(current_box._box_open))
                                {
                                    current_box notify("trigger", self);
                                    self UseButtonPressed();
                                    wait 0.5;
                                    
                                    // Check if weapon was actually taken
                                    if(!is_true(current_box._box_open))
                                        return;
                                }
                                wait 0.5;
                            }
                        }
                    }
                }
                
                // Clean up any remaining box goal
                if(self hasgoal("boxBuy"))
                    self cancelgoal("boxBuy");
                

                }

                With this one:

                // Improved weapon selection logic
                bot_should_take_weapon(boxWeapon, currentWeapon)
                {
                if(!isDefined(boxWeapon))
                return false;

                // Check if we already have this weapon
                if(self HasWeapon(boxWeapon))
                    return false;
                    
                // Always take wonder weapons
                if(IsSubStr(boxWeapon, "raygun") || 
                   IsSubStr(boxWeapon, "thunder") || 
                   IsSubStr(boxWeapon, "wave") || 
                   IsSubStr(boxWeapon, "mark2") || 
                   IsSubStr(boxWeapon, "tesla"))
                {
                    return true;
                }
                
                // Define weapon tiers for better decision making
                tier1_weapons = array("raygun_", "thunder", "wave_gun", "mark2", "tesla");
                tier2_weapons = array("galil", "an94", "hamr", "rpd", "lsat", "dsr50");
                tier3_weapons = array("mp5k", "pdw57", "mtar", "mp40", "ak74u", "qcw05");
                tier4_weapons = array("m14", "870mcs", "r870", "olympia", "fnfal");
                
                // Track if current weapon is in specific tier
                currentIsTier1 = false;
                currentIsTier2 = false;
                currentIsTier3 = false;
                
                // Check current weapon tier
                foreach(weapon in tier1_weapons)
                {
                    if(IsSubStr(currentWeapon, weapon))
                    {
                        currentIsTier1 = true;
                        break;
                    }
                }
                
                if(!currentIsTier1)
                {
                    foreach(weapon in tier2_weapons)
                    {
                        if(IsSubStr(currentWeapon, weapon))
                        {
                            currentIsTier2 = true;
                            break;
                        }
                    }
                }
                
                if(!currentIsTier1 && !currentIsTier2)
                {
                    foreach(weapon in tier3_weapons)
                    {
                        if(IsSubStr(currentWeapon, weapon))
                        {
                            currentIsTier3 = true;
                            break;
                        }
                    }
                }
                
                // Don't take bad weapons like snipers or launchers (with small chance for variety)
                if(IsSubStr(boxWeapon, "sniper") || 
                   IsSubStr(boxWeapon, "launcher") || 
                   IsSubStr(boxWeapon, "knife") || 
                   (IsSubStr(boxWeapon, "ballistic") && !IsSubStr(boxWeapon, "ballistic_knife")))
                
                {
                    return (randomfloat(1) < 0.15); // 15% chance
                }
                
                // Check box weapon tier
                boxIsTier2 = false;
                boxIsTier3 = false;
                boxIsTier4 = false;
                
                foreach(weapon in tier2_weapons)
                {
                    if(IsSubStr(boxWeapon, weapon))
                    {
                        boxIsTier2 = true;
                        break;
                    }
                }
                
                if(!boxIsTier2)
                {
                    foreach(weapon in tier3_weapons)
                    {
                        if(IsSubStr(boxWeapon, weapon))
                        {
                            boxIsTier3 = true;
                            break;
                        }
                    }
                }
                
                if(!boxIsTier2 && !boxIsTier3)
                {
                    foreach(weapon in tier4_weapons)
                    {
                        if(IsSubStr(boxWeapon, weapon))
                        {
                            boxIsTier4 = true;
                            break;
                        }
                    }
                }
                
                // Decision logic based on tiers and round number
                if(currentIsTier1)
                {
                    // Already have a wonder weapon, only take another if it's a different one
                    // For example, allow taking thunder gun when already having raygun
                    foreach(weapon in tier1_weapons)
                    {
                        if(IsSubStr(boxWeapon, weapon) && !IsSubStr(currentWeapon, weapon))
                        {
                            // 70% chance to take another wonder weapon
                            return (randomfloat(1) < 0.7);
                        }
                    }
                    return false; // Don't replace wonder weapon with non-wonder weapon
                }
                
                // Have tier 2 weapon already
                if(currentIsTier2)
                {
                    if(boxIsTier2)
                    {
                        // 50% chance to swap between tier 2 weapons for variety
                        return (randomfloat(1) < 0.5);
                    }
                    else if(boxIsTier3 || boxIsTier4)
                    {
                        // Almost never downgrade from tier 2
                        return (randomfloat(1) < 0.1);
                    }
                    // For unclassified weapons, low chance
                    return (randomfloat(1) < 0.2);
                }
                
                // Have tier 3 weapon already
                if(currentIsTier3)
                {
                    if(boxIsTier2)
                    {
                        // Always upgrade to tier 2
                        return true;
                    }
                    else if(boxIsTier3)
                    {
                        // 60% chance to swap between tier 3 for variety
                        return (randomfloat(1) < 0.6);
                    }
                    else if(boxIsTier4)
                    {
                        // Don't downgrade
                        return (randomfloat(1) < 0.15);
                    }
                }
                
                // Round-based logic - in early rounds take most weapons
                if(level.round_number <= 5)
                {
                    return true;
                }
                // Mid rounds - prefer at least tier 3
                else if(level.round_number <= 15)
                {
                    if(boxIsTier2 || boxIsTier3)
                        return true;
                    else
                        return (randomfloat(1) < 0.5); // 50% chance for other weapons
                }
                // Late rounds - generally only take tier 2
                else
                {
                    if(boxIsTier2)
                        return true;
                    else if(boxIsTier3)
                        return (randomfloat(1) < 0.7); // 70% chance for tier 3
                    else
                        return (randomfloat(1) < 0.3); // 30% chance for other weapons
                }
                
                // Default case - 50/50 chance
                return (randomfloat(1) < 0.5);
                

                }

                ByScundefined 1 Reply Last reply
                0
                • RlKk01undefined RlKk01

                  Is there anyway to mix this script:

                  bot_buy_box()
                  {
                  if(self maps\mp\zombies_zm_laststand::player_is_in_laststand())
                  return;

                  if(!isDefined(level.chests) || level.chests.size == 0)
                      return;
                      
                  current_box = level.chests[level.chest_index];
                  if(!isDefined(current_box))
                      return;
                  
                  dist = Distance(current_box.origin, self.origin);
                      
                  // Only try to use box if we have enough points and aren't too far
                  if(self.score >= 1900 && dist < 150)
                  {
                      // Check if box is available
                      if(!is_true(current_box._box_open) && !is_true(current_box._box_opened_by_fire_sale) && !flag("moving_chest_now"))
                      {
                          if(FindPath(self.origin, current_box.origin, undefined, 0, 1))
                          {
                              // Move to box if not already there
                              if(dist > 75)
                              {
                                  self AddGoal(current_box.origin, 50, 2, "boxBuy");
                                  return;
                              }
                              
                              // Use the box when close enough
                              self maps\mp\zombies\_zm_score::minus_to_player_score(950);
                              current_box notify("trigger", self);
                              
                              // Wait for weapon to appear and box to fully open
                              wait 4;
                              
                              // Try to grab weapon multiple times to ensure it's picked up
                              for(i = 0; i < 3; i++)
                              {
                                  if(is_true(current_box._box_open))
                                  {
                                      current_box notify("trigger", self);
                                      self UseButtonPressed();
                                      wait 0.5;
                                      
                                      // Check if weapon was actually taken
                                      if(!is_true(current_box._box_open))
                                          return;
                                  }
                                  wait 0.5;
                              }
                          }
                      }
                  }
                  
                  // Clean up any remaining box goal
                  if(self hasgoal("boxBuy"))
                      self cancelgoal("boxBuy");
                  

                  }

                  With this one:

                  // Improved weapon selection logic
                  bot_should_take_weapon(boxWeapon, currentWeapon)
                  {
                  if(!isDefined(boxWeapon))
                  return false;

                  // Check if we already have this weapon
                  if(self HasWeapon(boxWeapon))
                      return false;
                      
                  // Always take wonder weapons
                  if(IsSubStr(boxWeapon, "raygun") || 
                     IsSubStr(boxWeapon, "thunder") || 
                     IsSubStr(boxWeapon, "wave") || 
                     IsSubStr(boxWeapon, "mark2") || 
                     IsSubStr(boxWeapon, "tesla"))
                  {
                      return true;
                  }
                  
                  // Define weapon tiers for better decision making
                  tier1_weapons = array("raygun_", "thunder", "wave_gun", "mark2", "tesla");
                  tier2_weapons = array("galil", "an94", "hamr", "rpd", "lsat", "dsr50");
                  tier3_weapons = array("mp5k", "pdw57", "mtar", "mp40", "ak74u", "qcw05");
                  tier4_weapons = array("m14", "870mcs", "r870", "olympia", "fnfal");
                  
                  // Track if current weapon is in specific tier
                  currentIsTier1 = false;
                  currentIsTier2 = false;
                  currentIsTier3 = false;
                  
                  // Check current weapon tier
                  foreach(weapon in tier1_weapons)
                  {
                      if(IsSubStr(currentWeapon, weapon))
                      {
                          currentIsTier1 = true;
                          break;
                      }
                  }
                  
                  if(!currentIsTier1)
                  {
                      foreach(weapon in tier2_weapons)
                      {
                          if(IsSubStr(currentWeapon, weapon))
                          {
                              currentIsTier2 = true;
                              break;
                          }
                      }
                  }
                  
                  if(!currentIsTier1 && !currentIsTier2)
                  {
                      foreach(weapon in tier3_weapons)
                      {
                          if(IsSubStr(currentWeapon, weapon))
                          {
                              currentIsTier3 = true;
                              break;
                          }
                      }
                  }
                  
                  // Don't take bad weapons like snipers or launchers (with small chance for variety)
                  if(IsSubStr(boxWeapon, "sniper") || 
                     IsSubStr(boxWeapon, "launcher") || 
                     IsSubStr(boxWeapon, "knife") || 
                     (IsSubStr(boxWeapon, "ballistic") && !IsSubStr(boxWeapon, "ballistic_knife")))
                  
                  {
                      return (randomfloat(1) < 0.15); // 15% chance
                  }
                  
                  // Check box weapon tier
                  boxIsTier2 = false;
                  boxIsTier3 = false;
                  boxIsTier4 = false;
                  
                  foreach(weapon in tier2_weapons)
                  {
                      if(IsSubStr(boxWeapon, weapon))
                      {
                          boxIsTier2 = true;
                          break;
                      }
                  }
                  
                  if(!boxIsTier2)
                  {
                      foreach(weapon in tier3_weapons)
                      {
                          if(IsSubStr(boxWeapon, weapon))
                          {
                              boxIsTier3 = true;
                              break;
                          }
                      }
                  }
                  
                  if(!boxIsTier2 && !boxIsTier3)
                  {
                      foreach(weapon in tier4_weapons)
                      {
                          if(IsSubStr(boxWeapon, weapon))
                          {
                              boxIsTier4 = true;
                              break;
                          }
                      }
                  }
                  
                  // Decision logic based on tiers and round number
                  if(currentIsTier1)
                  {
                      // Already have a wonder weapon, only take another if it's a different one
                      // For example, allow taking thunder gun when already having raygun
                      foreach(weapon in tier1_weapons)
                      {
                          if(IsSubStr(boxWeapon, weapon) && !IsSubStr(currentWeapon, weapon))
                          {
                              // 70% chance to take another wonder weapon
                              return (randomfloat(1) < 0.7);
                          }
                      }
                      return false; // Don't replace wonder weapon with non-wonder weapon
                  }
                  
                  // Have tier 2 weapon already
                  if(currentIsTier2)
                  {
                      if(boxIsTier2)
                      {
                          // 50% chance to swap between tier 2 weapons for variety
                          return (randomfloat(1) < 0.5);
                      }
                      else if(boxIsTier3 || boxIsTier4)
                      {
                          // Almost never downgrade from tier 2
                          return (randomfloat(1) < 0.1);
                      }
                      // For unclassified weapons, low chance
                      return (randomfloat(1) < 0.2);
                  }
                  
                  // Have tier 3 weapon already
                  if(currentIsTier3)
                  {
                      if(boxIsTier2)
                      {
                          // Always upgrade to tier 2
                          return true;
                      }
                      else if(boxIsTier3)
                      {
                          // 60% chance to swap between tier 3 for variety
                          return (randomfloat(1) < 0.6);
                      }
                      else if(boxIsTier4)
                      {
                          // Don't downgrade
                          return (randomfloat(1) < 0.15);
                      }
                  }
                  
                  // Round-based logic - in early rounds take most weapons
                  if(level.round_number <= 5)
                  {
                      return true;
                  }
                  // Mid rounds - prefer at least tier 3
                  else if(level.round_number <= 15)
                  {
                      if(boxIsTier2 || boxIsTier3)
                          return true;
                      else
                          return (randomfloat(1) < 0.5); // 50% chance for other weapons
                  }
                  // Late rounds - generally only take tier 2
                  else
                  {
                      if(boxIsTier2)
                          return true;
                      else if(boxIsTier3)
                          return (randomfloat(1) < 0.7); // 70% chance for tier 3
                      else
                          return (randomfloat(1) < 0.3); // 30% chance for other weapons
                  }
                  
                  // Default case - 50/50 chance
                  return (randomfloat(1) < 0.5);
                  

                  }

                  ByScundefined Offline
                  ByScundefined Offline
                  BySc
                  wrote on last edited by
                  #24

                  RlKk01 I already calling the bot_should_take_weapon in bot_buy_box function do you need something else ?

                  1 Reply Last reply
                  0
                  • RlKk01undefined Offline
                    RlKk01undefined Offline
                    RlKk01
                    wrote on last edited by
                    #25

                    Yeah i know, i tested your actual mod but the function of the box itself for some reason it's bugged for me, i try to buy the box but it won't let me buy it unless a bot open it first.
                    And i have to spend more points like 3000 thousands points just for get a weapon😅.

                    1 Reply Last reply
                    0
                    • RlKk01undefined Offline
                      RlKk01undefined Offline
                      RlKk01
                      wrote on last edited by
                      #26

                      The script that i send to you is the old version of your mod, i did reactivated and it worked perfectly it's just that it lacks of the preferance of the weapons they gets, for example they get the raygun from the box and buy again to get the balistic knives.

                      1 Reply Last reply
                      0
                      • ByScundefined Offline
                        ByScundefined Offline
                        BySc
                        wrote on last edited by
                        #27

                        RlKk01 Updated code again, still have a bug when bots take grenade they still holds as a weapon i will look at later.

                        1 Reply Last reply
                        0
                        • ByScundefined BySc

                          You dont need to compile you can just copy script the folder we dont need compile now.

                          cyrex crimsundefined Offline
                          cyrex crimsundefined Offline
                          cyrex crims
                          wrote on last edited by
                          #28

                          BySc but when i do that i have a lot of point on the first round me and all the bots and can you make another update to the bots because when i go far from them they will teleport to me and they will stay randomly on the walls i dont know why but this thing happened to me when i played origins thank you and please can you make another update please

                          ByScundefined 1 Reply Last reply
                          0
                          • BackdoorHazeundefined Offline
                            BackdoorHazeundefined Offline
                            BackdoorHaze
                            wrote on last edited by
                            #29

                            why do i spawn with a ton of points when i have this enabled?

                            BackdoorHazeundefined 1 Reply Last reply
                            0
                            • BackdoorHazeundefined BackdoorHaze

                              why do i spawn with a ton of points when i have this enabled?

                              BackdoorHazeundefined Offline
                              BackdoorHazeundefined Offline
                              BackdoorHaze
                              wrote on last edited by
                              #30

                              BackdoorHaze in the zm_bo2_bots file it says "init()
                              {
                              level.player_starting_points = 550 * 400;
                              bot_set_skill();" which gives alot of starting points, saying this for anyone else who is confused

                              1 Reply Last reply
                              0
                              • cyrex crimsundefined cyrex crims

                                BySc but when i do that i have a lot of point on the first round me and all the bots and can you make another update to the bots because when i go far from them they will teleport to me and they will stay randomly on the walls i dont know why but this thing happened to me when i played origins thank you and please can you make another update please

                                ByScundefined Offline
                                ByScundefined Offline
                                BySc
                                wrote on last edited by
                                #31

                                cyrex crims said in [ZM] Updated bo2_zm_bots:

                                BySc but when i do that i have a lot of point on the first round me and all the bots and can you make another update to the bots because when i go far from them they will teleport to me and they will stay randomly on the walls i dont know why but this thing happened to me when i played origins thank you and please can you make another update please

                                I will check it

                                BackdoorHaze said in [ZM] Updated bo2_zm_bots:

                                why do i spawn with a ton of points when i have this enabled?

                                I was using for testing i will disable next update

                                1 Reply Last reply
                                0
                                • RlKk01undefined Offline
                                  RlKk01undefined Offline
                                  RlKk01
                                  wrote on last edited by
                                  #32

                                  Would it be possible to create a briefly moment of invulnerability for you and the bots when they teleport?
                                  Either they die or I get killed when it happens.

                                  vandal59undefined ByScundefined 2 Replies Last reply
                                  0
                                  • RlKk01undefined RlKk01

                                    Would it be possible to create a briefly moment of invulnerability for you and the bots when they teleport?
                                    Either they die or I get killed when it happens.

                                    ByScundefined Offline
                                    ByScundefined Offline
                                    BySc
                                    wrote on last edited by
                                    #33

                                    RlKk01 said in [ZM] Updated bo2_zm_bots:

                                    Would it be possible to create a briefly moment of invulnerability for you and the bots when they teleport?
                                    Either they die or I get killed when it happens.

                                    It's a good idea i will check it.

                                    1 Reply Last reply
                                    0
                                    • RlKk01undefined Offline
                                      RlKk01undefined Offline
                                      RlKk01
                                      wrote on last edited by
                                      #34

                                      BySc There is another thing, bots when they have pap weapons and they are close to a wallbuy they buy for example an m14 or an ak74. It bothers a bit when they are in high rounds and change their weapons for much worse ones.
                                      And that's It, the rest of the mod works perfectly.

                                      1 Reply Last reply
                                      0
                                      • StonedSquidzundefined Offline
                                        StonedSquidzundefined Offline
                                        StonedSquidz
                                        wrote on last edited by
                                        #35

                                        Is there anyway I could manually take over the bot for a short period of time, and be able to interact with things? I noticed the bots aren't able to pick up the stones in Origins, and was wondering if i could take over just to pick up the stones for the bots.

                                        ByScundefined 1 Reply Last reply
                                        0
                                        • ByScundefined Offline
                                          ByScundefined Offline
                                          BySc
                                          wrote on last edited by BySc
                                          #36

                                          Updated code 08.05.2025

                                          -- Added invulnerability for 2.5sec
                                          -- Added another if logic for controlling pap weapons i hope this fix lower tier weapon purches.

                                          Update can be found on github. Thanks everyone who is tested mod.

                                          1 Reply Last reply
                                          2
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • Login

                                          • Don't have an account? Register

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