Beispiel #1
0
        protected override void Harass()
        {
            var q = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady();
            var e = Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && E.IsReady() &&
                    ResourceManager.Check("harass-e");

            if (q)
            {
                var minions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
                foreach (var minion in from minion in minions
                         let damage = Q.GetDamage(minion)
                                      where
                                      minion.HealthPercent <= 75 &&
                                      HealthPrediction.GetHealthPrediction(minion, (int)(Q.Delay * 1000f)) < damage ||
                                      damage > minion.Health * 1.75f
                                      select minion)
                {
                    Casting.TargetSkill(minion, Q);
                    break;
                }
            }
            if (e)
            {
                if (GetEHits().Item1 > 0)
                {
                    E.Cast();
                }
            }
        }
Beispiel #2
0
        protected override void OnPostUpdate()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && !Player.IsWindingUp &&
                Menu.Item(Menu.Name + ".lasthit.q").GetValue <bool>() && Q.IsReady())
            {
                var m =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        e =>
                        e.HealthPercent <= 75 &&
                        (_lastAaMinion == null || e.NetworkId != _lastAaMinion.NetworkId ||
                         Game.Time > _lastAaMinionEndTime) &&
                        HealthPrediction.GetHealthPrediction(e, (int)(Q.Delay * 1000f)) < Q.GetDamage(e));
                if (m != null)
                {
                    Casting.TargetSkill(m, Q);
                }
            }

            if (_ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (_ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }
                var target = TargetSelector.GetTarget(R);
                if (target != null && !RLogic(UltimateModeType.Assisted, target))
                {
                    RLogicSingle(UltimateModeType.Assisted);
                }
            }

            if (_ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null && !RLogic(UltimateModeType.Auto, target))
                {
                    RLogicSingle(UltimateModeType.Auto);
                }
            }

            if (Menu.Item(Menu.Name + ".miscellaneous.e-auto").GetValue <bool>() && E.IsReady() &&
                ResourceManager.Check("auto-e") && !Player.IsRecalling() && !Player.InFountain())
            {
                var buff = GetEBuff();
                if (buff == null || (buff.EndTime - Game.Time) <= Game.Ping / 2000f + 0.5f)
                {
                    E.Cast();
                }
            }
        }
Beispiel #3
0
        protected override void LaneClear()
        {
            var q = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady();
            var e = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady() &&
                    ResourceManager.Check("lane-clear-e");

            if (q)
            {
                Casting.Farm(Q, MinionManager.GetMinions(Q.Range), 1);
            }
            if (e)
            {
                Casting.FarmSelfAoe(
                    E, MinionManager.GetMinions(E.Range),
                    Menu.Item(Menu.Name + ".lane-clear.e-min").GetValue <Slider>().Value);
            }
        }
Beispiel #4
0
        protected override void JungleClear()
        {
            var q = Menu.Item(Menu.Name + ".lane-clear.q").GetValue <bool>() && Q.IsReady();
            var e = Menu.Item(Menu.Name + ".lane-clear.e").GetValue <bool>() && E.IsReady();

            if (q)
            {
                Casting.Farm(
                    Q,
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth),
                    1);
            }
            if (e)
            {
                Casting.FarmSelfAoe(
                    E,
                    MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth),
                    1);
            }
        }
Beispiel #5
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));
            }
        }