Exemplo n.º 1
0
        private void CastQ()
        {
            if (!_menuHandler.GetValue <bool>((Menu)_menu.Item("Laneclear"), "q") || !_spellManager.Q.IsReady())
            {
                return;
            }

            var lowest_minions =
                ObjectManager.MinionsAndMonsters.Enemy.Where(x =>
                                                             x.IsValid() && !x.IsDead && x.IsVisible &&
                                                             x.Health < _spellManager.GetRealDamage(_spellManager.Q, x) && x.Distance3D(ObjectManager.Me) < _spellManager.Q.Range || !x.IsUnderEnemyTurret()
                                                             );

            Obj_AI_Minion lowest = null;

            foreach (Obj_AI_Minion objAiMinion in lowest_minions)
            {
                lowest = lowest == null ? objAiMinion : (lowest.Health > objAiMinion.Health ? objAiMinion : lowest);
            }

            if (lowest != null && lowest.Distance3D(ObjectManager.Me) < _spellManager.Q.Range)
            {
                _spellManager.Q.Cast(lowest.Position);
            }
        }
Exemplo n.º 2
0
        static void DoJungleClear()
        {
            Obj_AI_Minion Mob = null;

            ObjectManager.MinionsAndMonsters.NeutralCamps.ForEach((x) =>
            {
                if (x.IsValidTarget(Q.Data.ChargedMaxRange))
                {
                    if (Mob == null || (x.MaxHealth > Mob.MaxHealth))
                    {
                        Mob = x;
                    }
                }
            });

            if (Q.Ready && Mob != null && (QData.Active || myHero.ManaPercent >= myMenu.Get <MenuSlider>("jcMPQ").CurrentValue) && myMenu.Get <MenuCheckbox>("jcQ").Checked)
            {
                if (!QData.Active)
                {
                    Q.Data.Cast(Game.CursorPosition);
                }
                else if (Mob.Distance3D(myHero) <= Q.Data.Range)
                {
                    myHero.Spellbook.UpdateChargedSpell(Q.Data.Slot, Mob.Position, true);
                }
                return;
            }

            if (W.Ready && Mob != null && Mob.Distance3D(myHero) <= W.Data.Range && myHero.ManaPercent >= myMenu.Get <MenuSlider>("jcMPW").CurrentValue&& myMenu.Get <MenuCheckbox>("jcW").Checked)
            {
                W.Data.Cast(Mob.Position);
                return;
            }

            if (E.Ready && Mob != null && Mob.Distance3D(myHero) <= E.Data.Range && myHero.ManaPercent >= myMenu.Get <MenuSlider>("jcMPE").CurrentValue&& myMenu.Get <MenuCheckbox>("jcE").Checked)
            {
                E.Data.Cast(Mob.Position);
                return;
            }
        }