Announcement

Collapse
No announcement yet.

Smart autobalance script!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Smart autobalance script!

    Hi,

    Does anyone knows where to find good "working" smart autobalance script that actually would recognize clan TAG and enagle clan members to:

    1. switch teams even when teams are even
    2. put them automatically into one team MEC/China or USAMC
    3. protect them from auto-balancing


    anyone ?

    thanx a lot!

  • #2
    Re: Smart autobalance script!

    Have you tried searching the forums as they've been posted several time in here.

    Comment


    • #3
      Re: Smart autobalance script!

      Comment


      • #4
        Re: Smart autobalance script!

        I know about all that scripts but I never found "working" script that will put clantag into one desired team (on player connect).

        I found 2 versions of not working script.

        We want to play as team 2 and we always start as team 1.
        And if the autobalance is on clan members cannot jump to team 2.

        Any solution ?

        thanx in advance

        Comment


        • #5
          Re: Smart autobalance script!

          Did you try this script?

          Comment


          • #6
            Re: Smart autobalance script!

            Originally posted by ptegan


            Yes...
            It maybe protects clantag from autobalancing but it doesn't set clantag on player conenct into desired team...

            I even tried this one but it's just not working for me:


            ---
            def onPlayerConnect(p):

            # dont teamswitch alive players, or they will have the wrong teams kit
            if p.isAlive(): return

            # place player on the team with least players
            team1 = 0
            team2 = 0
            for tp in bf2.playerManager.getPlayers():
            if tp != p:
            if tp.getTeam() == 1: team1 += 1
            else: team2 += 1

            team2 = team2 * bf2.serverSettings.getTeamRatioPercent() / 100.0
            if team2 > team1:
            p.setTeam(1)
            else:
            p.setTeam(2)
            #change Team to 1 on Connect if Clanmember
            name=p.getName()
            for clantag in clantags:
            if name.find(clantag)>-1: p.setTeam(1)

            --------------

            not working... If I change to p.setTeam(2)... we always start game as team(1) USAMC. And if there is more MEC/China players we cannot swap to their team.

            Comment


            • #7
              Re: Smart autobalance script!

              How about you just turn off autobalance?


              It would allow you to

              1. switch teams even when teams are even
              2. put them automatically into one team MEC/China or USAMC
              3. protect them from auto-balancing


              wouldn't it?



              I thought that this code

              Code:
              if team2 > team1: 
                              p.setTeam(1) 
                      else: 
                              p.setTeam(2) 
              #change Team to 1 on Connect if Clanmember
              name=p.getName() 
              for clantag in clantags:
               if name.find(clantag)>-1: p.setTeam(1)

              Would assign people to certain sides on connect. Combine it with the code that doesn't switch people in squads and commanders and it should be fine, no?

              Comment


              • #8
                Re: Smart autobalance script!

                Originally posted by ptegan
                How about you just turn off autobalance?


                It would allow you to

                1. switch teams even when teams are even
                2. put them automatically into one team MEC/China or USAMC
                3. protect them from auto-balancing


                wouldn't it?



                I thought that this code

                Code:
                if team2 > team1: 
                                p.setTeam(1) 
                        else: 
                                p.setTeam(2) 
                #change Team to 1 on Connect if Clanmember
                name=p.getName() 
                for clantag in clantags:
                 if name.find(clantag)>-1: p.setTeam(1)

                Would assign people to certain sides on connect. Combine it with the code that doesn't switch people in squads and commanders and it should be fine, no?

                I have that already combined in the whole script but... the answer is no, it doesn't assign to certain side or maybe it does but always to USAMC team. (it doesn't depend if you put p.setTeam(1) or (2))

                And disabling autobalance is nice idea but it's not exactly what I wanted here I need balanced teams.

                Comment


                • #9
                  Re: Smart autobalance script!

                  Yeah, I guess you need balanced teams but you also want to "switch teams even when teams are even" so it's kind of mixed up.

                  How about using BF2CC to manage the autobalance. (you can manually move people if you find a balancing problem).

                  Comment


                  • #10
                    Re: Smart autobalance script!

                    Originally posted by ptegan
                    Yeah, I guess you need balanced teams but you also want to "switch teams even when teams are even" so it's kind of mixed up.

                    How about using BF2CC to manage the autobalance. (you can manually move people if you find a balancing problem).

                    What I want is to force clanmembers (with specific tag or specific nicknames from some txt file) into one team! Always! (all that with autobalance ON!)

                    Am I clear now ?

                    (BF2CC is fine but I cannot jump everytime from game to desktop, kick few players to make more room in team we want to join.... it's a quite pain)

                    Comment


                    • #11
                      Re: Smart autobalance script!

                      Use the new/current version of BF2CC either the daemon (the best) or the rcon only. With the r2con if you click on your team mates a menu will popup. Old version only had warn/kick/ban. New version adds switch player to opposite team they are on after they die.

                      The best method is to let your guys know, NOT to spawn when they get in. Then switch them using BF2CC and it will automatically switch them to the opposite team. I have found it doesn't always work during a game if the team you want to switch them too has even or more players. So best bet is to do it before they spawn.

                      If they get team switch just switch them back.

                      The daemon version you can set a clan tag for it to recognise to give priority to your clan members.

                      The other option is to use modmanager with BF2CC. Add your clan tags to it and upload it to your server. However I haven't used it and I don't think it automatically puts everyone on the same team, however if you switch them then they should stay on the same team.

                      <<R2>>Capt.HKS
                      Founder,Senior Admin, BF2 Ranked Server Admin (Raging Rebels Ranked 1.02

                      Comment


                      • #12
                        Re: Smart autobalance script!

                        Thanks for your reply.

                        I think I managed to protect clantag from autobalancing completely now.

                        So we can select team at the start.
                        I tried yesterday, teams were balanced, we connected and we get the possibility to select team. (This wasn't working before, we were in one or another team.)

                        But still I would like to put clantag into one team (on member connect) by default.

                        Comment

                        Working...
                        X