Exemplo n.º 1
0
        protected override void Combo()
        {
            var single = false;
            var q      = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var e      = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady() &&
                         ResourceManager.Check("combo-e");
            var r = _ultimate.IsActive(UltimateModeType.Combo) && R.IsReady();

            var rTarget = TargetSelector.GetTarget(R);

            if (r)
            {
                if (!RLogic(UltimateModeType.Combo, rTarget))
                {
                    RLogicSingle(UltimateModeType.Combo);
                    single = true;
                }
            }
            if (q)
            {
                Casting.TargetSkill(Q);
            }
            if (e)
            {
                if (GetEHits().Item1 > 0)
                {
                    E.Cast();
                }
            }
            if (rTarget != null && _ultimate.GetDamage(rTarget, UltimateModeType.Combo, single ? 1 : 5) > rTarget.Health)
            {
                ItemManager.UseComboItems(rTarget);
                SummonerManager.UseComboSummoners(rTarget);
            }
        }
Exemplo n.º 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();
                }
            }
        }
 public static bool Check(string uniqueId, Spell spell, Obj_AI_Hero hero)
 {
     try
     {
         if (hero == null || !Enabled(uniqueId))
         {
             return(true);
         }
         var bestTarget = TargetSelector.GetTarget(spell);
         if (bestTarget == null || hero.NetworkId.Equals(bestTarget.NetworkId))
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(false);
 }
Exemplo n.º 4
0
 protected void ItemsSummonersLogic(Obj_AI_Hero ultimateTarget, bool single = true)
 {
     try
     {
         var range = Math.Max(
             600,
             Math.Max(
                 SummonerManager.SummonerSpells.Where(s => s.CastType == CastType.Target).Max(s => s.Range),
                 ItemManager.Items.Where(
                     i => i.EffectFlags.HasFlag(EffectFlags.Damage) && i.Flags.HasFlag(ItemFlags.Offensive))
                 .Max(i => i.Range)));
         if (ultimateTarget == null || Ultimate == null || !ultimateTarget.IsValidTarget(range))
         {
             var target = TargetSelector.GetTarget(range);
             if (target != null)
             {
                 if (ItemManager.CalculateComboDamage(target) + SummonerManager.CalculateComboDamage(target) >
                     target.Health)
                 {
                     ItemManager.UseComboItems(target);
                     SummonerManager.UseComboSummoners(target);
                 }
             }
         }
         else
         {
             if (Ultimate.GetDamage(ultimateTarget, UltimateModeType.Combo, single ? 1 : 5) >
                 ultimateTarget.Health)
             {
                 ItemManager.UseComboItems(ultimateTarget);
                 SummonerManager.UseComboSummoners(ultimateTarget);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Exemplo n.º 5
0
 public static void TargetSkill(Spell spell)
 {
     TargetSkill(TargetSelector.GetTarget(spell), spell);
 }
Exemplo n.º 6
0
 public static void SkillShot(Spell spell, HitChance hitChance, bool boundingRadius = true, bool maxRange = true)
 {
     SkillShot(TargetSelector.GetTarget(spell), spell, hitChance);
 }