Example #1
0
 public void OnExecute()
 {
     if (FocusWTarget == null &&
         Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
         Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
     {
         return;
     }
     if (FocusWTarget.IsValidTarget(Variables._Player.GetAutoAttackRange()) &&
         Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
         Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
     {
         TargetSelector.GetPriority(FocusWTarget);
     }
     else
     {
         TargetSelector.GetPriority(
             TargetSelector.GetTarget(Variables._Player.AttackRange, DamageType.Physical));
     }
 }
Example #2
0
        public static void Game_OnUpdate(EventArgs args)
        {
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Clear:
                JungleClear2();
                break;
            }

            if (SubMenu["QSS"]["use"].Cast <KeyBind>().CurrentValue)
            {
                for (int i = 0; i < buffs.Length; i++)
                {
                    if (myHero.HasBuffOfType(buffs[i]) && SubMenu["QSS"][buffs[i].ToString()].Cast <CheckBox>().CurrentValue&& myHero.CountEnemiesInRange(800) > 0)
                    {
                        var delay = SubMenu["QSS"]["delay"].Cast <Slider>().CurrentValue;
                        if (Item.CanUseItem(3140))
                        {
                            Core.DelayAction(() => { Item.UseItem(3140); }, delay);
                        }
                        else if (Item.CanUseItem(3139))
                        {
                            Core.DelayAction(() => { Item.UseItem(3139); }, delay);
                        }
                    }
                }
            }


            if (SubMenu["Misc"]["focusW"].Cast <CheckBox>().CurrentValue)
            {
                if (FocusWTarget == null && orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo ||
                    orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed)
                {
                    return;
                }
                if (FocusWTarget.IsValidTarget(myHero.GetAutoAttackRange()) && !FocusWTarget.IsDead && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                    orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
                {
                    TargetSelector2.GetPriority(FocusWTarget);
                    Console.WriteLine("Focus W");
                }
                else
                {
                    TargetSelector2.GetPriority(
                        TargetSelector2.GetTarget(myHero.AttackRange, TargetSelector2.DamageType.Physical));
                }
            }

            AIHeroClient bestEnemy = null;

            foreach (var target in EntityManager.Heroes.Enemies.Where(target => target.IsValidTarget(E.Range)))
            {
                if (target == null)
                {
                    return;
                }

                if (bestEnemy == null)
                {
                    bestEnemy = target;
                }

                else if (myHero.Distance4(target.Position) < myHero.Distance4(bestEnemy.Position))
                {
                    bestEnemy = target;
                }

                if (SubMenu["Combo"]["castE"].Cast <KeyBind>().CurrentValue&& bestEnemy != null)
                {
                    E.CastOnUnit(bestEnemy);
                }
            }
        }