Example #1
0
        /// <summary>
        ///     On Clear
        /// </summary>
        private void Clear()
        {
            var basename = BaseName + "Clear.";

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>())
            {
                if (_manaManager.CheckClearQ())
                {
                    if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ.Minon.LastHit").GetValue <bool>())
                    {
                        foreach (var target in
                                 Minions.GetEnemyMinions2(Q.Range).Where(x => (x.Health < Q.GetDamage(x)) && (x.Health > 30)).OrderBy(hp => hp.Health))
                        {
                            if (!StaticObjects.Player.Spellbook.IsAutoAttacking && (StaticObjects.Player.GetAutoAttackDamage(target) < target.Health + 25) && (StaticObjects.Player.Distance(target) < StaticObjects.Player.AttackRange))
                            {
                                continue;
                            }

                            Q.Cast(target);
                            return;
                        }
                    }

                    if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ.OnJungle").GetValue <bool>())
                    {
                        foreach (var target in MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral).Where(x => x.IsValidTarget(Q.Range)).OrderBy(hp => hp.Health))
                        {
                            Q.Cast(target);
                            return;
                        }
                    }
                }
            }
        }
Example #2
0
        private void Clear()
        {
            var basename = BaseName + "Clear.";

            var validMinions = Minions.GetEnemyMinions2(W.Range);

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseW").GetValue <bool>())
            {
                if (_manaManager.CheckClearW())
                {
                    var pos = W.GetLineFarmLocation(validMinions);
                    _minonsHit = pos.MinionsHit;
                    if (pos.MinionsHit >= StaticObjects.ProjectMenu.Item($"{basename}.UseW.Minions").GetValue <Slider>().Value)
                    {
                        W.Cast(pos.Position);
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>())
            {
                if (_manaManager.CheckClearQ())
                {
                    var aaMinons = validMinions.Where(x => x.Distance(StaticObjects.Player) < StaticObjects.Player.AttackRange);

                    if (aaMinons.Count() >= StaticObjects.ProjectMenu.Item($"{basename}.UseQ.Minions").GetValue <Slider>().Value)
                    {
                        Q.Cast();
                    }
                }
            }
        }
Example #3
0
        /// <summary>
        ///     Automated events.
        /// </summary>
        /// <param name="args">
        ///     The <see cref="EventArgs" /> instance containing the event data.
        /// </param>
        private void AutoEvents(EventArgs args)
        {
            if (!Handler.CheckAutoEvents())
            {
                return;
            }

            if (!_tearFull)
            {
                if (!StaticObjects.Player.IsRecalling())
                {
                    var basename = BaseName + "Misc.";

                    if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ.TearStack").GetValue <bool>() && (_manaManager.ManaPercent >= StaticObjects.ProjectMenu.Item($"{basename}.UseQ.TearStack.MinMana").GetValue <Slider>().Value))
                    {
                        if (Items.HasItem(ItemData.Tear_of_the_Goddess.Id) || Items.HasItem(ItemData.Manamune.Id))
                        {
                            if ((Minions.GetEnemyMinions2(1500).Count < 1) && (Functions.Objects.Heroes.GetEnemies(1500).Count < 1) && (MinionManager.GetMinions(1500, MinionTypes.All, MinionTeam.Neutral).Count < 1))
                            {
                                Q.Cast(Game.CursorPos);
                            }
                        }
                    }
                }
            }
            Handler.UseAutoEvent();
        }