예제 #1
0
        protected override void JungleClear()
        {
            if (!ResourceManager.Check("lane-clear") && !ResourceManager.IgnoreJungle("lane-clear"))
            {
                return;
            }

            var useW = Menu.Item(Menu.Name + ".lane-clear.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();
            var useR = Menu.Item(Menu.Name + ".lane-clear.r").GetValue <bool>() && R.IsReady() &&
                       Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount();

            if (useW)
            {
                Casting.FarmSelfAoe(
                    W,
                    MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth),
                    1, Player.AttackRange + Player.BoundingRadius * 1.25f + 20 * W.Level);
            }
            if (useE)
            {
                Casting.Farm(
                    E,
                    MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth),
                    1);
            }
            if (useR)
            {
                Casting.Farm(
                    R,
                    MinionManager.GetMinions(R.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth),
                    1);
            }
        }
예제 #2
0
        protected override void LaneClear()
        {
            if (!ResourceManager.Check("lane-clear"))
            {
                return;
            }

            var useW = Menu.Item(Menu.Name + ".lane-clear.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();
            var useR = Menu.Item(Menu.Name + ".lane-clear.r").GetValue <bool>() && R.IsReady() &&
                       Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount();

            if (useW)
            {
                Casting.FarmSelfAoe(
                    W, MinionManager.GetMinions(W.Range), 1,
                    Player.AttackRange + Player.BoundingRadius * 1.25f + 20 * W.Level);
            }
            if (ShouldUseSpells())
            {
                if (useE)
                {
                    Casting.Farm(
                        E, MinionManager.GetMinions(E.Range),
                        Menu.Item(Menu.Name + ".lane-clear.e-min").GetValue <Slider>().Value);
                }
                if (useR)
                {
                    Casting.Farm(
                        R, MinionManager.GetMinions(R.Range),
                        Menu.Item(Menu.Name + ".lane-clear.r-min").GetValue <Slider>().Value);
                }
            }
        }
예제 #3
0
        private static void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                if (_menu == null || !_menu.Item(_menu.Name + ".enabled").GetValue <bool>())
                {
                    return;
                }

                if (Environment.TickCount - _lastTick >= _interval)
                {
                    _lastTick = Environment.TickCount;

                    if (_menu.Item(_menu.Name + ".fountain").GetValue <bool>() && !ObjectManager.Player.InFountain())
                    {
                        return;
                    }

                    if (ObjectManager.Player.ManaPercent >=
                        _menu.Item(_menu.Name + ".min-mana").GetValue <Slider>().Value)
                    {
                        var tearSlot = ObjectManager.Player.GetSpellSlot("TearsDummySpell");
                        if (tearSlot != SpellSlot.Unknown &&
                            Game.Time > ObjectManager.Player.GetSpell(tearSlot).CooldownExpires&&
                            ObjectManager.Player.CountEnemiesInRange(
                                _menu.Item(_menu.Name + ".min-distance").GetValue <Slider>().Value) <= 0)
                        {
                            var spell =
                                _spells.FirstOrDefault(
                                    s => s.IsReady() && _menu.Item(_menu.Name + "." + s.Slot).GetValue <bool>());
                            if (spell != null)
                            {
                                if (spell.IsSkillshot)
                                {
                                    var target =
                                        GameObjects.EnemyHeroes.Where(e => e.IsValidTarget(spell.Range))
                                        .Concat(MinionManager.GetMinions(spell.Range))
                                        .FirstOrDefault();
                                    if (target != null)
                                    {
                                        spell.Cast(target.Position);
                                    }
                                    else
                                    {
                                        var position = ObjectManager.Player.Position.Extend(
                                            Game.CursorPos, Math.Min(1000, spell.Range * 0.8f + Random.Next(1, 26)));
                                        if (position.IsValid())
                                        {
                                            spell.Cast(position);
                                        }
                                    }
                                }
                                else if (spell.Range > 0f)
                                {
                                    if (spell.Speed.Equals(default(float)))
                                    {
                                        spell.Cast();
                                    }
                                    else
                                    {
                                        var target =
                                            GameObjects.EnemyHeroes.Where(e => e.IsValidTarget(spell.Range))
                                            .Concat(MinionManager.GetMinions(spell.Range))
                                            .FirstOrDefault();
                                        if (target != null)
                                        {
                                            spell.Cast(target);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }