Пример #1
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(1200, DamageType.Physical, Player.Instance.Position);

            if (target != null && target.IsValidTarget() && !target.IsInvulnerable)
            {
                if (check(combo, "CQ") && DemSpells.Q.IsReady() && myhero.CountEnemiesInRange(1200) >= 1 && !QBuff())
                {
                    DemSpells.Q.Cast();
                    return;
                }

                if (check(combo, "CE") && DemSpells.E.IsReady() && myhero.CountEnemiesInRange(DemSpells.E.Range) > 1)
                {
                    foreach (var enemy in EntityManager.Heroes.Enemies.Where(x => !x.IsDead && x.IsValidTarget(DemSpells.E.Range))
                             .OrderByDescending(x => TargetSelector.GetPriority(x)))
                    {
                        if (check(combo, "CE" + enemy.ChampionName))
                        {
                            DemSpells.E.Cast(enemy);
                            return;
                        }
                    }
                }

                if (check(combo, "CR") && DemSpells.R.IsReady() && myhero.CountEnemiesInRange(DemSpells.R.Range) >= slider(combo, "CRMINE") &&
                    !myhero.IsFleeing && DemSpells.R.Cast())
                {
                    return;
                }
            }
        }
Пример #2
0
        static Amumu()
        {
            Q = new Spell.Skillshot(SpellSlot.Q, DamageType.Magical)
            {
                AllowedCollisionCount = 0,
            };

            W = new Spell.Active(SpellSlot.W, 300, DamageType.Magical);

            E = new Spell.Active(SpellSlot.E, 350, DamageType.Magical);

            R = new Spell.Active(SpellSlot.R, 550, DamageType.Magical)
            {
                CastDelay = 350,
            };

            DamageIndicator.DamageDelegate = HandleDamageIndicator;

            Obj_AI_Base.OnBasicAttack += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (!(sender is Obj_AI_Turret) || !(args.Target is AIHeroClient) || !sender.IsAlly || !args.Target.IsEnemy || sender == null || !R.IsReady() || !MenuValue.General.AutoR)
                {
                    return;
                }
                var attacker = sender as Obj_AI_Turret;
                var target   = args.Target as AIHeroClient;
                if (attacker != null && target != null)
                {
                    if (target.IsValidTarget(R.Range) && (TargetSelector.GetPriority(target) >= 4 || target.Health < sender.GetAutoAttackDamage(target, true) * 2 + RDamage(target)))
                    {
                        R.Cast();
                    }
                }
            };
        }
Пример #3
0
        private static void Load()
        {
            Program.TargetSelectorMenu.AddSubMenu(new Menu("刺客模式", "MenuAssassin"));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinActive", "启用").SetValue(true));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("Ax", ""));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinSelectOption", "集: ").SetValue(new StringList(new[] { "单选项", "多选项" })));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("Ax", ""));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinSetClick", "点击添加/删除").SetValue(true));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinReset", "重置列表").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));

            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddSubMenu(new Menu("绘制:", "Draw"));

            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawSearch", "搜索范围").SetValue(new Circle(true, Color.GreenYellow)));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawActive", "活跃的敌人").SetValue(new Circle(true, Color.GreenYellow)));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawNearest", "最近的敌人").SetValue(new Circle(true, Color.DarkSeaGreen)));


            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddSubMenu(new Menu("刺杀名单:", "AssassinMode"));
            foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                Program.TargetSelectorMenu.SubMenu("MenuAssassin")
                .SubMenu("AssassinMode")
                .AddItem(
                    new MenuItem("Assassin" + enemy.ChampionName, enemy.ChampionName).SetValue(
                        TargetSelector.GetPriority(enemy) > 3));
            }
            Program.TargetSelectorMenu.SubMenu("MenuAssassin")
            .AddItem(new MenuItem("AssassinSearchRange", "搜索范围")).SetValue(new Slider(1000, 2000));

            Game.OnGameUpdate += OnGameUpdate;
            Drawing.OnDraw    += Drawing_OnDraw;
            Game.OnWndProc    += Game_OnWndProc;
        }
Пример #4
0
        private static void Load()
        {
            Program.TargetSelectorMenu.AddSubMenu(new Menu("Assassin Manager", "MenuAssassin"));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinActive", "Active").SetValue(true));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("Ax", ""));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinSelectOption", "Set: ").SetValue(new StringList(new[] { "Single Select", "Multi Select" })));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("Ax", ""));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinSetClick", "Add/Remove with Right-Click").SetValue(true));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinReset", "Reset List").SetValue(new KeyBind("L".ToCharArray()[0], KeyBindType.Press)));

            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddSubMenu(new Menu("Draw:", "Draw"));

            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawSearch", "Search Range").SetValue(new Circle(true, Color.Gray)));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawActive", "Active Enemy").SetValue(new Circle(true, Color.GreenYellow)));
            Program.TargetSelectorMenu.SubMenu("MenuAssassin").SubMenu("Draw").AddItem(new MenuItem("DrawNearest", "Nearest Enemy").SetValue(new Circle(true, Color.DarkSeaGreen)));


            Program.TargetSelectorMenu.SubMenu("MenuAssassin").AddSubMenu(new Menu("Assassin List:", "AssassinMode"));
            foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                Program.TargetSelectorMenu.SubMenu("MenuAssassin")
                .SubMenu("AssassinMode")
                .AddItem(
                    new MenuItem("Assassin" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(
                        TargetSelector.GetPriority(enemy) > 3));
            }
            Program.TargetSelectorMenu.SubMenu("MenuAssassin")
            .AddItem(new MenuItem("AssassinSearchRange", "Search Range")).SetValue(new Slider(1000, 2000));

            Game.OnGameUpdate += OnGameUpdate;
            Drawing.OnDraw    += Drawing_OnDraw;
            Game.OnWndProc    += Game_OnWndProc;
        }
Пример #5
0
        private static AIHeroClient GetTargetNearMouse(float distance)
        {
            AIHeroClient bestTarget = null;
            var          bestRatio  = 0f;
            var          target     = TargetSelector.SelectedTarget;

            if (target.IsValidTarget() && Common.ValidUlt(target) &&
                (Game.CursorPos.Distance(target.ServerPosition) < distance && Player.Instance.Distance(target) < R.Range))
            {
                return(TargetSelector.SelectedTarget);
            }

            foreach (var hero in EntityManager.Heroes.Enemies)
            {
                if (!hero.IsValidTarget(R.Range) || !Common.ValidUlt(hero) || Game.CursorPos.Distance(hero.ServerPosition) > distance)
                {
                    continue;
                }

                var damage = Player.Instance.CalculateDamageOnUnit(hero, DamageType.Magical, 100);
                var ratio  = damage / (1 + hero.Health) * TargetSelector.GetPriority(hero);

                if (ratio > bestRatio)
                {
                    bestRatio  = ratio;
                    bestTarget = hero;
                }
            }

            return(bestTarget);
        }
Пример #6
0
        public void OnExecute()
        {
            var target = HeroManager.Enemies.Find(en => en.IsValidTarget(ObjectManager.Player.AttackRange + 65f + 65f) && en.Has2WStacks());

            if (target != null)
            {
                TargetSelector.SetTarget(target);
                Variables.Orbwalker.ForceTarget(target);
            }

            if (Game.Time < 25 * 60 * 1000)
            {
                var ADC =
                    HeroManager.Enemies.Where(m => TargetSelector.GetPriority(m) > 4 && m.IsValidTarget()).OrderBy(m => m.TotalAttackDamage).FirstOrDefault();

                if (ADC != null && Orbwalking.InAutoAttackRange(ADC))
                {
                    TargetSelector.SetTarget(target);
                    Variables.Orbwalker.ForceTarget(target);
                }
                else
                {
                    TargetSelector.SetTarget(null);
                    Variables.Orbwalker.ForceTarget(Variables.Orbwalker.GetTarget() as Obj_AI_Base);
                }
            }
        }
Пример #7
0
        protected override Obj_AI_Hero SelectTarget()
        {
            var  target       = base.SelectTarget();
            var  valid        = target.IsValidTarget();
            bool invulnerable = false;

            if (valid)
            {
                invulnerable = TargetSelector.IsInvulnerable(target, TargetSelector.DamageType.Magical);
            }

            if (!valid || target.IsBehindWindWall() || invulnerable)
            {
                var newTarget = HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(TargetRange) && !enemy.IsBehindWindWall() && !TargetSelector.IsInvulnerable(enemy, TargetSelector.DamageType.Magical)).MaxOrDefault(TargetSelector.GetPriority);
                if (newTarget != null)
                {
                    target = newTarget;
                }
            }

            if (EnablePoisonTargetSelection && target.IsValidTarget() && !target.IsPoisoned())
            {
                var newTarget = HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(TargetRange) && !enemy.IsBehindWindWall() && enemy.IsPoisoned() && !TargetSelector.IsInvulnerable(enemy, TargetSelector.DamageType.Magical)).MaxOrDefault(TargetSelector.GetPriority);
                if (newTarget != null && TargetSelector.GetPriority(target) - TargetSelector.GetPriority(newTarget) < 0.5f)
                {
                    return(newTarget);
                }
            }
            return(target);
        }
Пример #8
0
        public void OnExecute()
        {
            var target = TargetSelector.GetTarget(Variables.Spells[SpellSlot.R].Range, TargetSelector.DamageType.Magical);

            if (target.IsValidTarget() &&
                TargetSelector.GetPriority(target) > 1)
            {
                if (target.Health + 5 < Variables.Spells[SpellSlot.R].GetDamage(target))
                {
                    Variables.Spells[SpellSlot.R].Cast(target);
                }
                else
                {
                    var nearlyKillableTarget = DZTargetHelper.GetNearlyKillableTarget(Variables.Spells[SpellSlot.R],
                                                                                      new[] { SpellSlot.Q }, TargetSelector.DamageType.Magical);
                    if (nearlyKillableTarget.IsValidTarget(Variables.Spells[SpellSlot.Q].Range) &&
                        nearlyKillableTarget.IsValidTarget(Variables.Spells[SpellSlot.R].Range) &&
                        TargetSelector.GetPriority(target) > 1)
                    {
                        var QPrediction = Variables.Spells[SpellSlot.Q].GetPrediction(nearlyKillableTarget);

                        if (QPrediction.Hitchance >= HitChance.High)
                        {
                            Variables.Spells[SpellSlot.Q].Cast(QPrediction.CastPosition);
                            Variables.Spells[SpellSlot.R].Cast(nearlyKillableTarget);
                        }
                    }
                }
            }
        }
Пример #9
0
 /// <summary>
 ///     Sets the priority.
 /// </summary>
 private void SetPriority()
 {
     foreach (var enemy in this.AffectedEnemies)
     {
         this.Priority += (int)TargetSelector.GetPriority(enemy);
     }
 }
Пример #10
0
        internal static void Init()
        {
            try
            {
                menu = Utility.Load.menu.AddSubMenu("ThreshLantern");
                if (!EntityManager.Heroes.Allies.Any(a => !a.IsMe && a.Hero == Champion.Thresh))
                {
                    menu.AddGroupLabel("There is no Thresh in your Team");
                    return;
                }

                menu.AddGroupLabel("Auto ThreshLantern");
                menu.CreateCheckBox("enable", "Enable");
                menu.CreateCheckBox("auto", "Auto Pick Lantern");
                menu.CreateCheckBox("safe", "Enable Safety Checks");
                menu.CreateCheckBox("orb", "Try to walk to Lantern");
                menu.CreateSlider("hp", "Pick Thresh Lantern Under {0}% HP", TargetSelector.GetPriority(Player.Instance) * 15);
                menu.CreateKeyBind("key", "Pick Lantern HotKey", false, KeyBind.BindTypes.HoldActive, 'A');

                Game.OnTick += Game_OnTick;
                Orbwalker.OverrideOrbwalkPosition = OverrideOrbwalkPosition;
            }
            catch (Exception ex)
            {
                Logger.Send("Error At KappaUtility.Brain.Utility.Misc.Lantern.PickLantern.Init", ex, Logger.LogLevel.Error);
            }
        }
Пример #11
0
 private static void AutoLogic()
 {
     if (Blits["misc"].Cast <CheckBox>().CurrentValue)
     {
         var max = EntityManager.Heroes.Enemies.Max(t => TargetSelector.GetPriority(t));
         foreach (
             var enemy in
             EntityManager.Heroes.Enemies.Where(
                 e =>
                 e.IsValidTarget(Q.Range) &&
                 !Blits["grabs" + e.ChampionName.ToLower()].Cast <CheckBox>().CurrentValue)
             .Where(enemy => TargetSelector.GetPriority(enemy) == max))
         {
             QLogic(enemy);
         }
     }
     if (Blits["misc"].Cast <CheckBox>().CurrentValue)
     {
         var enemy = EntityManager.Heroes.Enemies.Find(e => !Blits["grabs" + e.ChampionName.ToLower()].Cast <CheckBox>().CurrentValue&& e.IsValidTarget(Q.Range) &&
                                                       (Q.GetPrediction(e).HitChance == HitChance.Dashing || Q.GetPrediction(e).HitChance == HitChance.Immobile));
         if (enemy != null)
         {
             QLogic(enemy);
         }
     }
     if (Blits["misc"].Cast <CheckBox>().CurrentValue)
     {
         var enemy = EntityManager.Heroes.Enemies.Find(e => e.IsValidTarget(R.Range) && Blitz.GetSpellDamage(e, SpellSlot.R) >= Prediction.Health.GetPrediction(e, R.CastDelay));
         if (enemy != null)
         {
             R.Cast();
         }
     }
 }
Пример #12
0
        private void CastR(Obj_AI_Base rTarget)
        {
            var getChamps = (from champ in ObjectManager.Get <Obj_AI_Hero>() where champ.IsValidTarget(maxRangeR) && rTarget.Name != champ.Name select champ).ToList();

            maxCount  = -1;
            bestChamp = null;

            foreach (var enemy in getChamps)
            {
                var getMoarChamps = (from champ in ObjectManager.Get <Obj_AI_Hero>() where champ.IsValidTarget(maxRangeR) select champ).ToList();
                var count         = 0;
                foreach (var champs in getMoarChamps)
                {
                    count = (int)TargetSelector.GetPriority(enemy);
                }
                if (maxCount < count || maxCount == -1)
                {
                    maxCount  = count;
                    bestChamp = enemy;
                }
            }

            if (bestChamp == null)
            {
                castR2(rTarget.Position, Prediction.GetPrediction(rTarget, 2f).CastPosition);
            }

            if (bestChamp != null)
            {
                castR2(R.GetPrediction(rTarget).CastPosition, R.GetPrediction(bestChamp).CastPosition);
            }
        }
Пример #13
0
        private static Obj_AI_Hero GetTargetNearMouse(float distance)
        {
            Obj_AI_Hero bestTarget = null;
            var         bestRatio  = 0f;

            if (TargetSelector.SelectedTarget.IsValidTarget() && !TargetSelector.IsInvulnerable(TargetSelector.SelectedTarget, TargetSelector.DamageType.Magical, true) &&
                (Game.CursorPos.Distance(TargetSelector.SelectedTarget.ServerPosition) < distance && ObjectManager.Player.Distance(TargetSelector.SelectedTarget) < R.Range))
            {
                return(TargetSelector.SelectedTarget);
            }

            foreach (var hero in ObjectManager.Get <Obj_AI_Hero>())
            {
                if (!hero.IsValidTarget(R.Range) || TargetSelector.IsInvulnerable(hero, TargetSelector.DamageType.Magical, true) || Game.CursorPos.Distance(hero.ServerPosition) > distance)
                {
                    continue;
                }

                var damage = (float)ObjectManager.Player.CalcDamage(hero, Damage.DamageType.Magical, 100);
                var ratio  = damage / (1 + hero.Health) * TargetSelector.GetPriority(hero);

                if (ratio > bestRatio)
                {
                    bestRatio  = ratio;
                    bestTarget = hero;
                }
            }

            return(bestTarget);
        }
Пример #14
0
        private static void OnGameUpdate(EventArgs args)
        {
            if (!Player.HasBuff("RengarR", true))
            {
                LXOrbwalker.SetAttack(true);
            }

            #region Cast E to mouse

            var useE = Config.Item("KeysE").GetValue <KeyBind>();
            if (useE.Active && E.IsReady())
            {
                var     ForceE = Config.Item("ForceEC").GetValue <bool>();
                Vector3 SearchPosition;

                if (Player.Distance(Game.CursorPos) < E.Range - 200f)
                {
                    SearchPosition = Game.CursorPos;
                }
                else
                {
                    SearchPosition = Player.Position +
                                     Vector3.Normalize(Game.CursorPos - Player.Position) * (E.Range - 200f);
                }

                var Target =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(hero => hero.IsValidTarget(E.Range) && hero.Distance(SearchPosition) < 200f)
                    .OrderByDescending(hero => TargetSelector.GetPriority(hero))
                    .First();
                if (Target.IsValid &&
                    (!Target.HasBuff("RengarEFinalMAX", true) && !Target.HasBuff("rengareslow") &&
                     LastETick + 1500 < Environment.TickCount || ForceE))
                {
                    E.Cast(Target, UsePackets);
                }
            }

            #endregion

            // Current Mode
            switch (ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                doCombo();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                doFarm();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                doHarass();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                doLastHit();
                break;
            }
        }
Пример #15
0
        private static void HandleW()
        {
            var HealthPercent = 30f;

            if (ObjectManager.Player.IsRecalling() || ObjectManager.Player.InShop() || !Variables.Spells[SpellSlot.W].IsReady())
            {
                return;
            }

            if (ObjectManager.Player.HealthPercent <= HealthPercent)
            {
                var castPosition = ObjectManager.Player.ServerPosition.Extend(Game.CursorPos, ObjectManager.Player.BoundingRadius * 1.3f);
                Variables.Spells[SpellSlot.W].Cast(castPosition);
                return;
            }

            var LHAlly = HeroManager.Allies
                         .Where(ally => ally.IsValidTarget(Variables.Spells[SpellSlot.W].Range, false) &&
                                ally.HealthPercent <= HealthPercent &&
                                TargetSelector.GetPriority(ally) > 3)
                         .OrderBy(ally => ally.Health)
                         .FirstOrDefault();

            if (LHAlly != null)
            {
                var movementPrediction = Prediction.GetPrediction(LHAlly, 0.35f);
                Variables.Spells[SpellSlot.W].Cast(movementPrediction.UnitPosition);
            }
        }
Пример #16
0
        void CastR(int minhit = 1)
        {
            UltMode ultmode = GetUltMode();

            IOrderedEnumerable <AIHeroClient> ordered = null;


            if (ultmode == UltMode.Health)
            {
                ordered = KnockedUp.OrderBy(x => x.Health).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenByDescending(x => x.CountEnemiesInRange(350));
            }

            if (ultmode == UltMode.Priority)
            {
                ordered = KnockedUp.OrderByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health).ThenByDescending(x => x.CountEnemiesInRange(350));
            }

            if (ultmode == UltMode.EnemiesHit)
            {
                ordered = KnockedUp.OrderByDescending(x => x.CountEnemiesInRange(350)).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health);
            }

            if (GetBool("Combo.UltOnlyKillable", YasuoMenu.ComboM))
            {
                var killable = ordered.FirstOrDefault(x => !x.isBlackListed() && x.Health <= Yasuo.GetSpellDamage(x, SpellSlot.R) && x.HealthPercent >= GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || ShouldDive(x)));
                if (killable != null && (!killable.IsInRange(Spells[Q].Range) || !isHealthy))
                {
                    Spells[R].CastOnUnit(killable);
                    return;
                }
                return;
            }

            if ((GetBool("Combo.OnlyifMin", YasuoMenu.ComboM) && ordered.Count() < minhit) || (ordered.Count() == 1 && ordered.FirstOrDefault().HealthPercent < GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM)))
            {
                return;
            }

            if (GetBool("Combo.RPriority", YasuoMenu.ComboM))
            {
                var best = ordered.Find(x => !x.isBlackListed() && TargetSelector.GetPriority(x).Equals(2.5f) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !x.Position.LSTo2D().PointUnderEnemyTurret()));
                if (best != null && Yasuo.HealthPercent / best.HealthPercent <= 1)
                {
                    Spells[R].CastOnUnit(best);
                    return;
                }
            }

            if (ordered.Count() >= minhit)
            {
                var best2 = ordered.FirstOrDefault(x => !x.isBlackListed() && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || ShouldDive(x)));
                if (best2 != null)
                {
                    Spells[R].CastOnUnit(best2);
                }
                return;
            }
        }
Пример #17
0
        private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Unit.IsMe)
            {
                switch (MenuProvider.Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                    if (_w.IsReadyPerfectly())
                    {
                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (Orbwalking.InAutoAttackRange(args.Target))
                            {
                                _w.Cast();
                            }
                        }
                    }
                    break;
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Making new AutoAttack Target for Passive (LoveTap)"))
                {
                    if (args.Target.Type == GameObjectType.obj_AI_Hero)
                    {
                        if (args.Target.Health + args.Target.PhysicalShield >
                            ObjectManager.Player.GetAutoAttackDamage(args.Target as Obj_AI_Base, true) * 2)
                        {
                            if (args.Target.NetworkId == _loveTapTargetNetworkId)
                            {
                                var newTarget =
                                    HeroManager.Enemies.Where(
                                        x =>
                                        x.IsValidTarget() && Orbwalking.InAutoAttackRange(x) &&
                                        x.NetworkId != _loveTapTargetNetworkId)
                                    .OrderByDescending(x => TargetSelector.GetPriority(x))
                                    .FirstOrDefault();

                                if (newTarget != null)
                                {
                                    args.Process = false;
                                    MenuProvider.Orbwalker.ForceTarget(newTarget);
                                }
                                else
                                {
                                    MenuProvider.Orbwalker.ForceTarget(null);
                                }
                            }
                        }
                    }
                }
                else
                {
                    MenuProvider.Orbwalker.ForceTarget(null);
                }
            }
        }
Пример #18
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (MenuProvider.Champion.Drawings.DrawQrange.Active && _q.IsReadyPerfectly())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, _q.Range,
                                             MenuProvider.Champion.Drawings.DrawQrange.Color);
                }

                if (MenuProvider.Champion.Drawings.DrawRrange.Active && _r.IsReadyPerfectly())
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, _r.Range,
                                             MenuProvider.Champion.Drawings.DrawRrange.Color);
                }

                var drawQTargetMark = MenuProvider.Champion.Drawings.GetCircleValue("Draw Q Target Mark");
                if (drawQTargetMark.Active)
                {
                    if (_q.IsReadyPerfectly())
                    {
                        var target =
                            HeroManager.Enemies.Where(
                                x =>
                                x.IsValidTarget(_q.Range) && _q.GetPrediction(x).Hitchance >= _q.MinHitChance &&
                                MenuProvider.MenuInstance.Item("Combo.Q Targets." + x.ChampionName, true)
                                .GetValue <bool>())
                            .OrderByDescending(x => TargetSelector.GetPriority(x))
                            .FirstOrDefault();
                        if (target != null)
                        {
                            Render.Circle.DrawCircle(target.Position, 70, drawQTargetMark.Color, 3, false);
                        }
                    }
                }

                var drawWhitelistedTargetMark =
                    MenuProvider.Champion.Drawings.GetCircleValue("Draw Whitelisted Target Mark");
                if (drawWhitelistedTargetMark.Active)
                {
                    if (_q.IsReadyPerfectly())
                    {
                        foreach (
                            var target in
                            HeroManager.Enemies.Where(
                                x =>
                                x.IsValidTarget() &&
                                MenuProvider.MenuInstance.Item("Combo.Q Targets." + x.ChampionName, true)
                                .GetValue <bool>()))
                        {
                            Render.Circle.DrawCircle(target.Position, 30, drawWhitelistedTargetMark.Color, 5, false);
                        }
                    }
                }
            }
        }
Пример #19
0
        private AIHeroClient getQssTarget()
        {
            var instances = this.getBuffInstances();

            if (instances == null || !instances.Any())
            {
                return(null);
            }

            return(instances.OrderByDescending(x => x.Data.DangerLevel * TargetSelector.GetPriority(x.Owner)).FirstOrDefault(x => this.Item.IsInRange(x.Owner))?.Owner);
        }
Пример #20
0
 /// <summary>
 ///     Gets the target.
 /// </summary>
 /// <returns></returns>
 public AIHeroClient GetTarget()
 {
     return(Config.Instance["CustomTargeting"]
                ? HeroManager.Enemies.Where(x => x.IsValidTarget(this.Q.Range) && x.IsPoisoned())
            .OrderByDescending(
                x =>
                this.Player.CalcDamage(x, Damage.DamageType.Magical, 100) / (1 + x.Health)
                * TargetSelector.GetPriority(x))
            .FirstOrDefault()
            ?? TargetSelector.GetTarget(this.Q.Range, TargetSelector.DamageType.Magical)
                : TargetSelector.GetTarget(this.Q.Range, TargetSelector.DamageType.Magical));
 }
Пример #21
0
        public void CastOnBestTarget(Obj_AI_Hero primary, bool nonhero = false)
        {
            if (TargetSelector.GetPriority(primary) >= 2)
            {
                UseSpellOn(primary);
            }

            else if (LowTarget != null)
            {
                UseSpellOn(LowTarget);
            }
        }
Пример #22
0
        private static void Harass()
        {
            var target = TargetSelector.GetTarget(1200, DamageType.Physical, Player.Instance.Position);

            if (target != null && target.IsValid && !target.IsInvulnerable)
            {
                if (check(harass, "HQ") && DemSpells.Q.CanCast(target))
                {
                    if (check(harass, "HQSTUN") && !IsBlazed(target))
                    {
                        return;
                    }

                    var qpred = DemSpells.Q.GetPrediction(target);

                    if (qpred.HitChancePercent >= slider(pred, "QPred") && DemSpells.Q.Cast(qpred.CastPosition))
                    {
                        return;
                    }
                }

                if (check(harass, "HW") && DemSpells.W.IsReady() && myhero.CountEnemiesInRange(DemSpells.W.Range) >= slider(harass, "HWMIN"))
                {
                    var Enemies = EntityManager.Heroes.Enemies.Where(x => !x.IsDead && x.IsValid && DemSpells.W.CanCast(x));

                    if (Enemies != null)
                    {
                        var AoePred = Prediction.Position.GetPredictionAoe(Enemies.ToArray <Obj_AI_Base>(), WData);

                        foreach (var Result in AoePred)
                        {
                            if (Result.CollisionObjects.Count() >= slider(harass, "HWMIN") && DemSpells.W.Cast(Result.CastPosition))
                            {
                                return;
                            }
                        }
                    }
                }

                if (check(harass, "HE") && DemSpells.E.IsReady())
                {
                    foreach (var enemy in EntityManager.Heroes.Enemies.Where(x => !x.IsDead && x.IsValid && DemSpells.E.CanCast(x))
                             .OrderByDescending(x => TargetSelector.GetPriority(x)))
                    {
                        if (check(harass, "HE" + enemy.ChampionName))
                        {
                            DemSpells.E.Cast(enemy);
                        }
                    }
                }
            }
        }
Пример #23
0
        public static bool CastR(int minTargets, bool prioriy = false)
        {
            if (GetHits(R).Item1 >= minTargets || prioriy && GetHits(R)
                .Item2.Any(
                    hero =>
                    (int)TargetSelector.GetPriority(hero) >= Config["Combo"].GetValue <MenuSlider>("UseRImportant").Value))
            {
                R.Cast(Player.Position, true);
                return(true);
            }

            return(false);
        }
Пример #24
0
        private static void Combo()
        {
            var t = TargetSelector.GetTarget(Spells[SpellSlot.Q].Range, TargetSelector.DamageType.Magical);

            if (t == null)
            {
                return;
            }

            Configs.Orbwalker.SetAttack(!Configs.CassioConfig.Item("apollo.cassio.misc.orb").GetValue <bool>()); //todo check

            CastUlti(t);

            if (Instances.UseSpell(SpellSlot.Q) && Environment.TickCount > Last.Q + Instances.Delay(SpellSlot.Q))
            {
                Spells[SpellSlot.Q].CastIfHitchanceEquals(t, Instances.HitChance(SpellSlot.Q), PacketCast);
            }


            if (Instances.UseSpell(SpellSlot.W) && Environment.TickCount > Last.W + Instances.Delay(SpellSlot.W))
            {
                Spells[SpellSlot.W].CastIfHitchanceEquals(t, Instances.HitChance(SpellSlot.W), PacketCast);
            }

            var buffEndTime = Instances.GetPoisonBuffEndTime(t);

            if (Instances.UseSpell(SpellSlot.E) && Environment.TickCount > Last.E + Instances.Delay(SpellSlot.E) && buffEndTime > (Game.Time + Spells[SpellSlot.E].Delay))
            {
                if (t.HasBuffOfType(BuffType.Poison))
                {
                    Spells[SpellSlot.E].Cast(t, PacketCast);
                }
                if (Player.GetSpellDamage(t, SpellSlot.Q) > t.Health && !Spells[SpellSlot.Q].IsReady() &&
                    !Spells[SpellSlot.W].IsReady() && Configs.CassioConfig.Item("apollo.cassio.e.kill").GetValue <bool>())
                {
                    Spells[SpellSlot.E].Cast(t, PacketCast);
                }
                else
                {
                    var tar =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(
                            h =>
                            h.IsEnemy && h.IsValidTarget(Spells[SpellSlot.E].Range) &&
                            h.HasBuffOfType(BuffType.Poison))
                        .OrderBy(h => TargetSelector.GetPriority(h));

                    Spells[SpellSlot.E].Cast(tar.First(), PacketCast);
                }
            }
        }
Пример #25
0
        private static void Load()
        {
            Program.Config.AddSubMenu(new Menu("�̿�ģʽ", "MenuAssassin"));
            Program.Config.SubMenu("MenuAssassin").AddItem(new MenuItem("AssassinActive", "����").SetValue(true));

            foreach (
                var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                Program.Config.SubMenu("MenuAssassin")

                .AddItem(
                    new MenuItem("Assassin" + enemy.ChampionName, enemy.ChampionName).SetValue(
                        TargetSelector.GetPriority(enemy) > 3));
            }


            Program.Config.SubMenu("MenuAssassin")
            .AddItem(
                new MenuItem("AssassinSelectOption", "��: ").SetValue(
                    new StringList(new[] { "��ѡ��", "��ѡ��" })));
            Program.Config.SubMenu("MenuAssassin")
            .AddItem(new MenuItem("AssassinSetClick", "���/ɾ�����").SetValue(true));
            Program.Config.SubMenu("MenuAssassin")
            .AddItem(
                new MenuItem("AssassinReset", "�����б�").SetValue(new KeyBind("T".ToCharArray()[0],
                                                                              KeyBindType.Press)));

            Program.Config.SubMenu("MenuAssassin").AddSubMenu(new Menu("����:", "Draw"));

            Program.Config.SubMenu("MenuAssassin")
            .SubMenu("Draw")
            .AddItem(new MenuItem("DrawSearch", "������Χ").SetValue(new Circle(true, Color.GreenYellow)));
            Program.Config.SubMenu("MenuAssassin")
            .SubMenu("Draw")
            .AddItem(new MenuItem("DrawActive", "��Ծ�ĵ���").SetValue(new Circle(true, Color.GreenYellow)));
            Program.Config.SubMenu("MenuAssassin")
            .SubMenu("Draw")
            .AddItem(new MenuItem("DrawNearest", "����ĵ���").SetValue(new Circle(true, Color.DarkSeaGreen)));
            Program.Config.SubMenu("MenuAssassin")
            .SubMenu("Draw")
            .AddItem(new MenuItem("DrawStatus", "��ʾ״̬").SetValue(true));



            Program.Config.SubMenu("MenuAssassin")
            .AddItem(new MenuItem("AssassinSearchRange", "������Χ")).SetValue(new Slider(1000, 2000));

            Game.OnGameUpdate += OnGameUpdate;
            Drawing.OnDraw    += Drawing_OnDraw;
            Game.OnWndProc    += Game_OnWndProc;
        }
Пример #26
0
        private static void Load()
        {
            _textBold = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                Weight          = FontWeight.Bold,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });
            _text = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            assMenu = Zed.Menu.AddSubMenu("暗杀列表", "MenuAssassin");

            assMenu.Add("AssassinActive", new CheckBox("开启"));
            assMenu.Add("AssassinSearchRange", new Slider(" 搜索范围", 1400, 1400, 2000));
            assMenu.Add("AssassinSelectOption", new ComboBox(" 设置:", 0, "单选目标", "多选目标"));

            assMenu.AddGroupLabel("敌人 :");
            foreach (
                var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                assMenu.Add("Assassin" + enemy.ChampionName,
                            new CheckBox(" " + enemy.ChampionName, TargetSelector.GetPriority(enemy) > 3));
            }

            assMenu.AddGroupLabel("其他 :");
            assMenu.Add("AssassinSetClick", new CheckBox(" 点击目标 添加/移除"));
            assMenu.Add("AssassinReset", new KeyBind(" 重置清单", false, KeyBind.BindTypes.HoldActive, 'T'));

            assMenu.AddGroupLabel("线圈 :");
            assMenu.Add("DrawSearch", new CheckBox("搜索范围"));
            assMenu.Add("DrawActive", new CheckBox("激活的目标"));
            assMenu.Add("DrawNearest", new CheckBox("最近的敌人"));
            assMenu.Add("DrawStatus", new CheckBox("屏幕显示状态"));

            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnWndProc += Game_OnWndProc;
        }
Пример #27
0
        private static void Load()
        {
            _textBold = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                Weight          = FontWeight.Bold,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });
            _text = new Font(
                Drawing.Direct3DDevice,
                new FontDescription
            {
                FaceName        = "Tahoma",
                Height          = 13,
                OutputPrecision = FontPrecision.Default,
                Quality         = FontQuality.ClearType
            });

            assMenu = Zed.Menu.AddSubMenu(":: Deathmark Priority Targets", "MenuAssassin");

            assMenu.Add("AssassinActive", new CheckBox("Active"));
            assMenu.Add("AssassinSearchRange", new Slider(" Search Range", 1400, 1400, 2000));
            assMenu.Add("AssassinSelectOption", new ComboBox(" Set:", 0, "Single Select", "Multi Select"));

            assMenu.AddGroupLabel("Enemies :");
            foreach (
                var enemy in ObjectManager.Get <AIHeroClient>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
            {
                assMenu.Add("Assassin" + enemy.ChampionName,
                            new CheckBox(" " + enemy.ChampionName, TargetSelector.GetPriority(enemy) > 3));
            }

            assMenu.AddGroupLabel("Other Settings :");
            assMenu.Add("AssassinSetClick", new CheckBox(" Add/Remove with click"));
            assMenu.Add("AssassinReset", new KeyBind(" Reset List", false, KeyBind.BindTypes.HoldActive, 'T'));

            assMenu.AddGroupLabel("Draw :");
            assMenu.Add("DrawSearch", new CheckBox("Search Range"));
            assMenu.Add("DrawActive", new CheckBox("Active Enemy"));
            assMenu.Add("DrawNearest", new CheckBox("Nearest Enemy"));
            assMenu.Add("DrawStatus", new CheckBox("Show status on the screen"));

            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnWndProc += Game_OnWndProc;
        }
Пример #28
0
        private static void Loading_OnComplete(EventArgs args)
        {
            if (Blitz.Hero != Champion.Blitzcrank)
            {
                return;
            }
            Chat.Print("[Addon] [Champion] [Blitzcrank", System.Drawing.Color.OrangeRed);

            Bli   = MainMenu.AddMenu("BlitzCrank", "BlitzCrank");
            Blits = Bli.AddSubMenu("Settings");
            Blits.AddGroupLabel("Combo");
            Blits.Add("Qc", new CheckBox("Q [Combo]"));
            Blits.Add("Wc", new CheckBox("W [Combo]"));
            Blits.Add("Ec", new CheckBox("E [Combo]"));
            Blits.Add("Rc", new CheckBox("R [Combo]"));
            Blits.AddSeparator();
            Blits.AddLabel("[Q] Settings");
            Blits.Add("Pre", new ComboBox("Prediction", 1, "To3D", "Logic [Q]"));
            Blits.AddLabel("Not use Grap");
            foreach (var hero in EntityManager.Heroes.Enemies)
            {
                Blits.Add("graps" + hero.ChampionName.ToLower(),
                          TargetSelector.GetPriority(hero) <= 2
                        ? new CheckBox(hero.ChampionName)
                        : new CheckBox(hero.ChampionName, false));
            }
            Blits.AddSeparator();
            Blits.AddLabel("[R] Percent Enemys");
            Blits.Add("rs", new Slider("Percent Enemy [R]", 2, 0, 5));
            Blits.AddSeparator();
            Blits.AddGroupLabel("Modes Basic");
            Blits.Add("misc", new CheckBox("Mode [Misc]"));
            Blits.AddSeparator();
            Blits.AddLabel("Draws [Spells]");
            Blits.Add("drawQ", new CheckBox("Use [Q] Draw"));
            Blits.Add("Qint", new CheckBox("Draw [Q] Int", false));
            Blits.Add("drawR", new CheckBox("Use [R] Draw"));

            Q = new Spell.Skillshot(SpellSlot.Q, 980, SkillShotType.Linear, (int)250f, (int)1800f, (int)70f);
            W = new Spell.Active(SpellSlot.W);
            E = new Spell.Active(SpellSlot.E, 150);
            R = new Spell.Active(SpellSlot.R, 600);

            Drawing.OnDraw                   += Draws_OnComple;
            Game.OnTick                      += GameOnUpdate;
            Spellbook.OnCastSpell            += CasProcesseSpell;
            Interrupter.OnInterruptableSpell += IntPorecsse;
            Gapcloser.OnGapcloser            += OnGapcloser;
            Qpredictions                      = new Geometry.Polygon.Rectangle(Blitz.Position, Blitz.Position, Q.Width);
        }
Пример #29
0
        private static void KsPassive()
        {
            var target =
                HeroManager.Enemies.Where(
                    e =>
                    e.IsInAttackRange() &&
                    HealthPrediction.GetHealthPrediction(e, 500) < player.GetAutoAttackDamage(e, true) &&
                    e.IsValidTarget()).OrderByDescending(e => TargetSelector.GetPriority(e)).FirstOrDefault();

            if (target != null)
            {
                orbwalker.ForceTarget(target);
            }
        }
Пример #30
0
 private void CastW(bool combo)
 {
     foreach (var incDamage in
              Program.IncDamages.IncomingDamagesAlly.Where(i => i.Hero.Distance(player) < W.Range && i.Hero.IsValid)
              .OrderByDescending(i => TargetSelector.GetPriority(i.Hero)))
     {
         if ((incDamage.DamageCount >= config.Item("Wmin", true).GetValue <Slider>().Value ||
              CheckDamageToW(incDamage)) && (combo || (!combo && CheckAutoW())))
         {
             W.Cast(incDamage.Hero, config.Item("packets").GetValue <bool>());
             return;
         }
     }
 }