Example #1
0
        static AutoWalker()
        {
            myNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsAlly);
            enemyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsEnemy);
            enemyLazer = ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(tur => tur.IsEnemy && tur.GetLane() == Lane.Spawn);
            p = ObjectManager.Player;

            if (p.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner1);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner2);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonerhaste")
            {
                Ghost = new Spell.Active(SpellSlot.Summoner1);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonerhaste")
            {
                Ghost = new Spell.Active(SpellSlot.Summoner2);
            }

            target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = true;
            Orbwalker.OnPreAttack += Orbwalker_OnPreAttack;
            Game.OnTick += OnTick;
            if (MainMenu.GetMenu("AB").Get<CheckBox>("debuginfo").CurrentValue)
                Drawing.OnDraw += Drawing_OnDraw;
        }
Example #2
0
        private void SelectMostPushedLane()
        {
            Obj_HQ nMyNexus = ObjectManager.Get <Obj_HQ>().First(hq => hq.IsEnemy);

            Obj_AI_Minion andrzej =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(min => min.Name.Contains("Minion") && min.IsAlly && min.Health > 0)
                .OrderBy(min => min.Distance(nMyNexus))
                .First();

            status = "selected most pushed lane: " + andrzej.GetLane();

            Obj_AI_Base ally =
                ObjectManager.Get <Obj_AI_Turret>()
                .Where(tur => tur.IsAlly && tur.Health > 0 && tur.GetLane() == andrzej.GetLane())
                .OrderBy(tur => tur.Distance(andrzej))
                .FirstOrDefault();

            if (ally == null)
            {
                Console.WriteLine("ally 1");
                ally =
                    ObjectManager.Get <Obj_AI_Turret>()
                    .Where(tur => tur.Health > 0 && tur.IsAlly &&
                           tur.GetLane() == Lane.HQ)
                    .OrderBy(tur => tur.Distance(andrzej))
                    .FirstOrDefault();
            }
            if (ally == null)
            {
                Console.WriteLine("ally 2");
                ally =
                    ObjectManager.Get <Obj_AI_Turret>().FirstOrDefault(tur => tur.IsAlly && tur.GetLane() == Lane.Spawn);
            }

            Obj_AI_Base enemy =
                ObjectManager.Get <Obj_AI_Turret>()
                .Where(tur => tur.IsEnemy && tur.Health > 0 && tur.GetLane() == andrzej.GetLane())
                .OrderBy(tur => tur.Distance(andrzej))
                .FirstOrDefault();

            if (enemy == null)
            {
                Console.WriteLine("enemy 1");
                enemy =
                    ObjectManager.Get <Obj_AI_Turret>()
                    .Where(tur => tur.Health > 0 && tur.IsEnemy &&
                           tur.GetLane() == Lane.HQ)
                    .OrderBy(tur => tur.Distance(andrzej))
                    .FirstOrDefault();
            }
            if (enemy == null)
            {
                Console.WriteLine("enemy 2");
                enemy =
                    ObjectManager.Get <Obj_AI_Turret>().FirstOrDefault(tur => tur.IsEnemy && tur.GetLane() == Lane.Spawn);
            }

            currentLogic.pushLogic.Reset(ally, enemy, andrzej.GetLane());
        }
Example #3
0
        static AutoWalker()
        {
            GameID     = DateTime.Now.Ticks + "" + RandomString(10);
            newPF      = MainMenu.GetMenu("AB").Get <CheckBox>("newPF").CurrentValue;
            NavGraph   = new NavGraph(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EloBuddy\\AutoBuddyPlus"));
            PfNodes    = new List <Vector3>();
            color      = new ColorBGRA(79, 219, 50, 255);
            MyNexus    = ObjectManager.Get <Obj_HQ>().First(n => n.IsAlly);
            EneMyNexus = ObjectManager.Get <Obj_HQ>().First(n => n.IsEnemy);
            EnemyLazer =
                ObjectManager.Get <Obj_AI_Turret>().FirstOrDefault(tur => !tur.IsAlly && tur.GetLane() == Lane.Spawn);
            myHero = ObjectManager.Player;
            initSummonerSpells();

            Target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = false;

            Orbwalker.DisableAttacking = false;
            Game.OnUpdate += Game_OnUpdate;
            Orbwalker.OverrideOrbwalkPosition = () => Target;
            if (Orbwalker.HoldRadius > 130 || Orbwalker.HoldRadius < 80)
            {
                Chat.Print("=================WARNING=================", Color.Red);
                Chat.Print("Your hold radius value in orbwalker isn't optimal for AutoBuddy", Color.Aqua);
                Chat.Print("Please set hold radius through menu=>Orbwalker");
                Chat.Print("Recommended values: Hold radius: 80-130, Delay between movements: 100-250");
            }

            Drawing.OnDraw += Drawing_OnDraw;

            Core.DelayAction(OnEndGame, 20000);
            updateItems();
            oldOrbwalk();
            Game.OnTick += OnTick;
        }
Example #4
0
        static AutoWalker()
        {
            GameID = DateTime.Now.Ticks + ""+RandomString(10);
            newPF = MainMenu.GetMenu("AB").Get<CheckBox>("newPF").CurrentValue;
            NavGraph=new NavGraph(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EloBuddy\\AutoBuddyPlus"));
            PfNodes=new List<Vector3>();
            color = new ColorBGRA(79, 219, 50, 255);
            MyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsAlly);
            EneMyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsEnemy);
            EnemyLazer =
                ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(tur => !tur.IsAlly && tur.GetLane() == Lane.Spawn);
            myHero = ObjectManager.Player;
            initSummonerSpells();

            Target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = false;

            Orbwalker.DisableAttacking = false;
            Game.OnUpdate += Game_OnUpdate;
            Orbwalker.OverrideOrbwalkPosition = () => Target;
            if (Orbwalker.HoldRadius > 130 || Orbwalker.HoldRadius < 80)
            {
                Chat.Print("=================WARNING=================", Color.Red);
                Chat.Print("Your hold radius value in orbwalker isn't optimal for AutoBuddy", Color.Aqua);
                Chat.Print("Please set hold radius through menu=>Orbwalker");
                Chat.Print("Recommended values: Hold radius: 80-130, Delay between movements: 100-250");
            }
            
            Drawing.OnDraw += Drawing_OnDraw;
            
            Core.DelayAction(OnEndGame, 20000);
            updateItems();
            oldOrbwalk();
            Game.OnTick += OnTick;
        }
Example #5
0
        public static void setupARMASimulator()
        {
            GameObject.OnCreate += TowerAttackOnCreate;
            GameObject.OnDelete += onDelete;

            foreach (var tur in ObjectManager.Get <Obj_HQ>())
            {
                if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Chaos)
                {
                    fromNex = tur;
                }
                if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Order)
                {
                    toNex = tur;
                }

                if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Order)
                {
                    fromNex = tur;
                }

                if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Chaos)
                {
                    toNex = tur;
                }
            }

            if (fromNex == null)
            {
                return;
            }
            float sep = fromNex.Position.Distance(toNex.Position) / 40;

            Vector2 lastPos = fromNex.Position.To2D();

            //Setup sectors
            for (int i = 0; i < 40; i++)
            {
                Vector2 end = lastPos.Extend(toNex.Position.To2D(), sep);
                sectors.Add(new Sector(lastPos, end, 750));
                lastPos = end;
            }
            MapControl.setupMapControl();
            AutoLevelChamp.setAutoLevel();
            AutoShopper.init();
            setUpItems();
            setChamp();
            AutoShopper.setBuild(champBuild);
            //checkItems();
            sSpells = new SummonerSpells();
            if (champ != null)
            {
                champ.setUpSpells();
            }

            DeathWalker.CustomRunCS     = (player.IsMelee) ? 250 : 150;
            DeathWalker.CustomMoveDelay = 324;
            DeathWalker.BottingMode     = true;
        }
Example #6
0
        static AutoWalker()
        {
            GameID = DateTime.Now.Ticks + "" + RandomString(10);

            newPF = MainMenu.GetMenu("AB").Get <CheckBox>("newPF").CurrentValue;

            NavGraph = new NavGraph(Path.Combine(SandboxConfig.DataDirectory, "AutoBuddy"));

            PfNodes = new List <Vector3>();

            color = new ColorBGRA(79, 219, 50, 255);

            MyNexus = ObjectManager.Get <Obj_HQ>().First(n => n.IsAlly);

            EneMyNexus = ObjectManager.Get <Obj_HQ>().First(n => n.IsEnemy);

            EnemyLazer = ObjectManager.Get <Obj_AI_Turret>().FirstOrDefault(tur => !tur.IsAlly && tur.GetLane() == Lane.Spawn);

            p = ObjectManager.Player;

            initSummonerSpells();


            Chat.Print("Selecting target position.");

            Target = ObjectManager.Player.Position;

            Chat.Print("Made it through the orbwalker...");

            Orbwalker.DisableMovement = false;

            Orbwalker.DisableAttacking = false;
            Game.OnUpdate += Game_OnUpdate;

            if (!MainMenu.GetMenu("AB").Get <CheckBox>("disableAutoBuddy").CurrentValue)
            {
                Orbwalker.OverrideOrbwalkPosition = () => Target;
            }

            if (Orbwalker.HoldRadius > 130 || Orbwalker.HoldRadius < 80)
            {
                Chat.Print("=================WARNING=================", Color.Red);
                Chat.Print("Your hold radius value in orbwalker isn't optimal for AutoBuddy", Color.Aqua);
                Chat.Print("Please set hold radius through menu=>Orbwalker");
                Chat.Print("Recommended values: Hold radius: 80-130, Delay between movements: 100-250");
            }

            if (MainMenu.GetMenu("AB").Get <CheckBox>("debuginfo").CurrentValue)
            {
                Drawing.OnDraw += Drawing_OnDraw;
            }

            Core.DelayAction(OnEndGame, 20000);
            updateItems();
            oldOrbwalk();
            Game.OnTick    += OnTick;
            Chat.OnMessage += Chat_OnMessage;
            Drawing.OnDraw += Drawing_OnDraw;
        }
Example #7
0
 public ObjectiveBase(Vector2 position, ObjectiveBaseTurret turret1, ObjectiveBaseTurret turret2)
     : base(position)
 {
     Object = ObjectManager.Get<Obj_HQ>().First(tower => Math.Abs(tower.Position.X - position.X) < ObjectiveOuterTurret.EstimatedPositionRange && Math.Abs(tower.Position.Y - position.Y) < ObjectiveOuterTurret.EstimatedPositionRange);
     _turret1 = turret1;
     _turret2 = turret2;
     RequiredObjectives.Add(turret1);
     RequiredObjectives.Add(turret2);
 }
 public ObjectiveBase(Vector2 position, ObjectiveBaseTurret turret1, ObjectiveBaseTurret turret2)
     : base(position)
 {
     Object   = ObjectManager.Get <Obj_HQ>().First(tower => Math.Abs(tower.Position.X - position.X) < ObjectiveOuterTurret.EstimatedPositionRange && Math.Abs(tower.Position.Y - position.Y) < ObjectiveOuterTurret.EstimatedPositionRange);
     _turret1 = turret1;
     _turret2 = turret2;
     RequiredObjectives.Add(turret1);
     RequiredObjectives.Add(turret2);
 }
Example #9
0
        static void Main(string[] args)
        {
            Loading.OnLoadingComplete += delegate
            {
                // Get Ally/Enemy Nexus objs
                AllyNexus  = ObjectManager.Get <Obj_HQ>().First(n => n.IsAlly);
                EnemyNexus = ObjectManager.Get <Obj_HQ>().First(n => n.IsEnemy);

                Core.DelayAction(OnEndGame, 20000);
                Chat.Print("AutoCloseGame: By DevAkumetsu");
            };
        }
Example #10
0
        private static bool isValidAATarget(this Obj_HQ nexus)
        {
            if (nexus.IsDead || nexus.IsAlly)
            {
                return(false);
            }
            var attackrange = Me.AttackRange + Me.BoundingRadius + nexus.BoundingRadius;

            if (!nexus.IsValidTarget(attackrange, true))
            {
                return(false);
            }
            return(true);
        }
Example #11
0
        public static void setupARMASimulator()
        {
            try
            {
                GameObject.OnCreate += TowerAttackOnCreate;
                if (ObjectManager.Player.Hero != EloBuddy.Champion.Corki)
                {
                    GameObject.OnDelete += onDelete;
                }

                foreach (var tur in ObjectManager.Get <Obj_HQ>())
                {
                    if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Chaos)
                    {
                        fromNex = tur;
                    }
                    if (tur.Team == GameObjectTeam.Chaos && player.Team == GameObjectTeam.Order)
                    {
                        toNex = tur;
                    }

                    if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Order)
                    {
                        fromNex = tur;
                    }

                    if (tur.Team == GameObjectTeam.Order && player.Team == GameObjectTeam.Chaos)
                    {
                        toNex = tur;
                    }
                }

                if (fromNex == null)
                {
                    return;
                }
                float sep = fromNex.Position.Distance(toNex.Position) / 40;

                Vector2 lastPos = fromNex.Position.To2D();
                //Setup sectors
                for (int i = 0; i < 40; i++)
                {
                    Vector2 end = lastPos.Extend(toNex.Position.To2D(), sep);
                    sectors.Add(new Sector(lastPos, end, 750));
                    lastPos = end;
                }
                MapControl.setupMapControl();
                AutoLevelChamp.setAutoLevel();
                AutoShopper.init();
                setUpItems();
                setChamp();
                AutoShopper.setBuild(champBuild);

                sSpells = new SummonerSpells();
                if (champ != null)
                {
                    champ.setUpSpells();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
Example #12
0
 /// <summary>
 /// A function used to update HQs
 /// </summary>
 public static void Load()
 {
     AllyHQ  = ObjectHandler.Get <Obj_HQ>().FirstOrDefault(hq => hq.IsAlly);
     EnemyHQ = ObjectHandler.Get <Obj_HQ>().FirstOrDefault(hq => !hq.IsAlly);
 }