コード例 #1
0
        protected override void LaneClear()
        {
            var min  = Menu.Item(Menu.Name + ".lane-clear.min").GetValue <Slider>().Value;
            var useQ = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady() &&
                       (ResourceManager.Check("lane-clear-q") || Q.IsCharging);
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady() &&
                       ResourceManager.Check("lane-clear-e");

            if (useQ)
            {
                var minions = MinionManager.GetMinions(Q.ChargedMaxRange);
                if (Q.IsCharging || minions.Count >= min)
                {
                    if (!Q.IsCharging)
                    {
                        Q.StartCharging();
                        _lastLaneClearQStart = Game.Time;
                    }
                    if (Q.IsCharging && IsFullyCharged())
                    {
                        Casting.Farm(
                            Q, minions,
                            (Game.Time - _lastLaneClearQStart > 3 ? 1 : (minions.Count < min ? minions.Count : min)));
                    }
                }
            }

            if (useE)
            {
                Casting.Farm(E, MinionManager.GetMinions(E.Range + E.Width), min);
            }
        }
コード例 #2
0
        protected override void JungleClear()
        {
            var useQ = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady() &&
                       (ResourceManager.Check("lane-clear-q") || Q.IsCharging ||
                        ResourceManager.IgnoreJungle("lane-clear-q"));
            var useE = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady() &&
                       (ResourceManager.Check("lane-clear-e") || ResourceManager.IgnoreJungle("lane-clear-e"));

            if (useQ)
            {
                var minions = MinionManager.GetMinions(
                    Q.ChargedMaxRange, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (Q.IsCharging || minions.Count >= 1)
                {
                    if (!Q.IsCharging)
                    {
                        Q.StartCharging();
                        _lastLaneClearQStart = Game.Time;
                    }
                    if (Q.IsCharging && IsFullyCharged())
                    {
                        Casting.Farm(Q, minions, 1);
                    }
                }
            }

            if (useE)
            {
                Casting.Farm(
                    E,
                    MinionManager.GetMinions(
                        E.Range + E.Width, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth), 1);
            }
        }
コード例 #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));
            }
        }