Ejemplo n.º 1
0
 public static void Muramana(Obj_AI_Hero target, bool activate, float overrideRange = -1f)
 {
     try
     {
         var hasBuff = ObjectManager.Player.HasBuff("Muramana");
         if ((activate && !hasBuff &&
              (_menu == null ||
               _menu.Item(_menu.Name + ".muramana.combo").GetValue <bool>() &&
               ObjectManager.Player.CountEnemiesInRange(
                   overrideRange > 0 ? overrideRange : Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)) >=
               _menu.Item(_menu.Name + ".muramana.min-enemies-range").GetValue <Slider>().Value&&
               ObjectManager.Player.HealthPercent <=
               _menu.Item(_menu.Name + ".muramana.player-health-below").GetValue <Slider>().Value&&
               ObjectManager.Player.HealthPercent >=
               _menu.Item(_menu.Name + ".muramana.player-health-above").GetValue <Slider>().Value&&
               (target == null ||
                target.HealthPercent <=
                _menu.Item(_menu.Name + ".muramana.target-health-below").GetValue <Slider>().Value&&
                target.HealthPercent >=
                _menu.Item(_menu.Name + ".muramana.target-health-above").GetValue <Slider>().Value))) ||
             !activate && hasBuff)
         {
             var muramana = ItemData.Muramana.GetItem();
             if (muramana.IsOwned(ObjectManager.Player))
             {
                 muramana.Cast();
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Ejemplo n.º 2
0
 private void OnObjAiBaseProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     try
     {
         if (sender.IsMe)
         {
             if (args.SData.Name == "KalistaExpungeWrapper")
             {
                 Orbwalking.ResetAutoAttackTimer();
             }
         }
         if (!sender.IsEnemy || SoulBound.Unit == null || R.Level == 0 ||
             !Menu.Item(Menu.Name + ".ultimate.save").GetValue <bool>())
         {
             return;
         }
         if (args.Target != null && args.Target.NetworkId == SoulBound.Unit.NetworkId &&
             (!(sender is Obj_AI_Hero) || args.SData.IsAutoAttack()))
         {
             SoulBound.Add(
                 SoulBound.Unit.ServerPosition.Distance(sender.ServerPosition) / args.SData.MissileSpeed +
                 Game.Time, (float)sender.GetAutoAttackDamage(SoulBound.Unit));
         }
         else
         {
             var hero = sender as Obj_AI_Hero;
             if (hero != null)
             {
                 var slot = hero.GetSpellSlot(args.SData.Name);
                 if (slot != SpellSlot.Unknown)
                 {
                     var damage = 0f;
                     if (args.Target != null && args.Target.NetworkId == SoulBound.Unit.NetworkId &&
                         slot == hero.GetSpellSlot("SummonerDot"))
                     {
                         damage =
                             (float)hero.GetSummonerSpellDamage(SoulBound.Unit, Damage.SummonerSpell.Ignite);
                     }
                     else if ((slot == SpellSlot.Q || slot == SpellSlot.W || slot == SpellSlot.E ||
                               slot == SpellSlot.R) &&
                              ((args.Target != null && args.Target.NetworkId == SoulBound.Unit.NetworkId) ||
                               args.End.Distance(SoulBound.Unit.ServerPosition, true) <
                               Math.Pow(args.SData.LineWidth, 2)))
                     {
                         damage = (float)hero.GetSpellDamage(SoulBound.Unit, slot);
                     }
                     if (damage > 0)
                     {
                         SoulBound.Add(Game.Time + 2, damage);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Ejemplo n.º 3
0
 protected override void Flee()
 {
     if (Menu.Item(Menu.Name + ".flee.aa").GetValue <bool>())
     {
         Orbwalker.SetAttack(true);
         var dashObjects = GetDashObjects();
         if (dashObjects != null && dashObjects.Any())
         {
             Orbwalking.Orbwalk(dashObjects.First(), Game.CursorPos);
         }
     }
 }
Ejemplo n.º 4
0
 protected override void Killsteal()
 {
     if (Menu.Item(Menu.Name + ".killsteal.q").GetValue <bool>() && Q.IsReady())
     {
         var range    = Menu.Item(Menu.Name + ".killsteal.range").GetValue <bool>();
         var killable =
             GameObjects.EnemyHeroes.FirstOrDefault(
                 e =>
                 e.IsValidTarget(Q.Range) && (!range || !Orbwalking.InAutoAttackRange(e)) &&
                 (QIsKillable(e, 1) || QMaxRangeHit(e) && QIsKillable(e, 2)));
         if (killable != null)
         {
             QLogic(killable, HitChance.High, 100);
         }
     }
 }
Ejemplo n.º 5
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                Orbwalker.SetAttack(!Q.IsCharging);
                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }

                    if (
                        !RLogic(
                            TargetSelector.GetTarget(R), R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        RLogicDuel(
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                    }
                }

                if (UltimateManager.Auto() && R.IsReady())
                {
                    if (
                        !RLogic(
                            TargetSelector.GetTarget(R), R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), "auto"))
                    {
                        RLogicDuel(
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Ejemplo n.º 6
0
 protected override void Harass()
 {
     if (!ManaManager.Check("harass") && !Q.IsCharging)
     {
         return;
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && !Q.IsCharging && E.IsReady())
     {
         var target = TargetSelector.GetTarget(E);
         if (target != null)
         {
             var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.e-stacks").GetValue <Slider>().Value > 0;
             if (Menu.Item(Menu.Name + ".harass.e-always").GetValue <bool>() || stacks ||
                 GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.e-stacks").GetValue <Slider>().Value ||
                 E.IsKillable(target) ||
                 CPrediction.Circle(E, target, E.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
             {
                 ELogic(target, E.GetHitChance("harass"));
             }
         }
     }
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady())
     {
         var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
         if (target != null)
         {
             var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".harass.q-stacks").GetValue <Slider>().Value > 0;
             if (Q.IsCharging || Menu.Item(Menu.Name + ".harass.q-always").GetValue <bool>() ||
                 Menu.Item(Menu.Name + ".harass.q-range").GetValue <bool>() &&
                 !Orbwalking.InAutoAttackRange(target) || stacks ||
                 GetWStacks(target) >= Menu.Item(Menu.Name + ".harass.q-stacks").GetValue <Slider>().Value ||
                 Q.IsKillable(target) ||
                 CPrediction.Line(Q, target, Q.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".harass.q-min").GetValue <Slider>().Value)
             {
                 QLogic(
                     target, Q.GetHitChance("harass"),
                     Menu.Item(Menu.Name + ".harass.q-fast-cast-min").GetValue <Slider>().Value);
             }
         }
     }
 }
Ejemplo n.º 7
0
        public static List <Obj_AI_Base> GetDashObjects(List <Obj_AI_Base> targets)
        {
            try
            {
                var apexPoint = ObjectManager.Player.ServerPosition.To2D() +
                                (ObjectManager.Player.ServerPosition.To2D() - Game.CursorPos.To2D()).Normalized() *
                                Orbwalking.GetRealAutoAttackRange(ObjectManager.Player);

                return
                    (targets.Where(
                         o =>
                         Utils.IsLyingInCone(
                             o.ServerPosition.To2D(), apexPoint, ObjectManager.Player.ServerPosition.To2D(), Math.PI))
                     .OrderBy(o => o.Distance(apexPoint, true))
                     .ToList());
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(null);
        }
Ejemplo n.º 8
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>();
            var r = UltimateManager.Combo();

            if (e && !Q.IsCharging && E.IsReady())
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null)
                {
                    var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value > 0;
                    if (Menu.Item(Menu.Name + ".combo.e-always").GetValue <bool>() || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value ||
                        E.IsKillable(target) ||
                        CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                    {
                        ELogic(target, E.GetHitChance("combo"));
                    }
                }
            }
            if (q && Q.IsReady())
            {
                var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
                if (target != null)
                {
                    var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value > 0;
                    if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-always").GetValue <bool>() ||
                        Menu.Item(Menu.Name + ".combo.q-range").GetValue <bool>() &&
                        !Orbwalking.InAutoAttackRange(target) || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-stacks").GetValue <Slider>().Value ||
                        CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.q-min").GetValue <Slider>().Value || Q.IsKillable(target))
                    {
                        QLogic(
                            target, Q.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".combo.q-fast-cast-min").GetValue <Slider>().Value);
                    }
                }
            }
            if (r && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null)
                {
                    if (
                        !RLogic(
                            target, R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.combo.duel").GetValue <bool>())
                        {
                            RLogicDuel(q, e);
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        private void OnOrbwalkingBeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            try
            {
                var t = args.Target as Obj_AI_Hero;
                if (t != null &&
                    (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
                     Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed))
                {
                    args.Process = Q.Instance.ManaCost > Player.Mana && W.Instance.ManaCost > Player.Mana &&
                                   (E.Instance.ManaCost > Player.Mana || GetPoisonBuffEndTime(t) < E.ArrivalTime(t)) ||
                                   !Q.IsReady() && !E.IsReady();
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    args.Process = Menu.Item(Menu.Name + ".lane-clear.aa").GetValue<bool>();
                    if (args.Process == false)
                    {
                        var m = args.Target as Obj_AI_Minion;
                        if (m != null && (_lastEEndTime < Game.Time || E.IsReady()) ||
                            (GetPoisonBuffEndTime(m) < E.ArrivalTime(m) || E.Instance.ManaCost > Player.Mana) ||
                            !ManaManager.Check("lane-clear"))
                        {
                            args.Process = true;
                        }
                    }
                }

                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit))
                {
                    var m = args.Target as Obj_AI_Minion;
                    if (m != null && E.CanCast(m))
                    {
                        if (E.Instance.ManaCost < Player.Mana)
                        {
                            args.Process = Menu.Item(Menu.Name + ".lasthit.e").GetValue<bool>() ||
                                           (Menu.Item(Menu.Name + ".lasthit.e-poison").GetValue<bool>() &&
                                            GetPoisonBuffEndTime(m) > E.ArrivalTime(m)) && ManaManager.Check("lasthit");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Ejemplo n.º 10
0
        static ItemManager()
        {
            try
            {
                // Speed + Atk Speed
                Youmuu = new CustomItem
                {
                    Name        = "youmuus-ghostblade",
                    DisplayName = Global.Lang.Get("MI_YoumuusGhostblade"),
                    Item        = ItemData.Youmuus_Ghostblade.GetItem(),
                    Flags       = ItemFlags.Offensive | ItemFlags.Flee,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.AttackSpeed | EffectFlags.MovementSpeed,
                    CastType    = CastType.Self,
                    Range       =
                        ObjectManager.Player.IsMelee
                            ? ObjectManager.Player.AttackRange * 3
                            : Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)
                };

                // AOE damage, only melee
                Tiamat = new CustomItem
                {
                    Name        = "tiamat",
                    DisplayName = Global.Lang.Get("MI_Tiamat"),
                    Item        = ItemData.Tiamat_Melee_Only.GetItem(),
                    Flags       = ItemFlags.Offensive,
                    CombatFlags = CombatFlags.Melee,
                    EffectFlags = EffectFlags.Damage,
                    CastType    = CastType.Self,
                    Damage      = Damage.DamageItems.Tiamat,
                    Range       = ItemData.Tiamat_Melee_Only.GetItem().Range
                };

                // AOE damage, only melee
                Hydra = new CustomItem
                {
                    Name        = "hydra",
                    DisplayName = Global.Lang.Get("MI_Hydra"),
                    Item        = ItemData.Ravenous_Hydra_Melee_Only.GetItem(),
                    Flags       = ItemFlags.Offensive,
                    CombatFlags = CombatFlags.Melee,
                    EffectFlags = EffectFlags.Damage,
                    CastType    = CastType.Self,
                    Damage      = Damage.DamageItems.Hydra,
                    Range       = ItemData.Ravenous_Hydra_Melee_Only.GetItem().Range
                };
                // Slow + Damage
                BilgewaterCutlass = new CustomItem
                {
                    Name        = "bilgewater-cutlass",
                    DisplayName = Global.Lang.Get("MI_BilgewaterCutlass"),
                    Item        = ItemData.Bilgewater_Cutlass.GetItem(),
                    Flags       = ItemFlags.Offensive | ItemFlags.Flee,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                    CastType    = CastType.Target,
                    Damage      = Damage.DamageItems.Bilgewater,
                    Range       = ItemData.Bilgewater_Cutlass.GetItem().Range
                };

                // Slow + Damage
                BladeRuinedKing = new CustomItem
                {
                    Name        = "blade-ruined-king",
                    DisplayName = Global.Lang.Get("MI_BladeRuinedKing"),
                    Item        = ItemData.Blade_of_the_Ruined_King.GetItem(),
                    Flags       = ItemFlags.Offensive | ItemFlags.Flee,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                    CastType    = CastType.Target,
                    Damage      = Damage.DamageItems.Botrk,
                    Range       = ItemData.Blade_of_the_Ruined_King.GetItem().Range
                };

                // Damage + Slow
                HextechGunblade = new CustomItem
                {
                    Name        = "hextech-gunblade",
                    DisplayName = Global.Lang.Get("MI_HextechGunblade"),
                    Item        = ItemData.Hextech_Gunblade.GetItem(),
                    Flags       = ItemFlags.Offensive | ItemFlags.Flee,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.Damage | EffectFlags.MovementSlow,
                    CastType    = CastType.Target,
                    Damage      = Damage.DamageItems.Hexgun,
                    Range       = ItemData.Hextech_Gunblade.GetItem().Range
                };

                // Remove stun + heal
                MikaelsCrucible = new CustomItem
                {
                    Name        = "mikaels-crucible",
                    DisplayName = Global.Lang.Get("MI_MikaelsCrucible"),
                    Item        = ItemData.Mikaels_Crucible.GetItem(),
                    Flags       = ItemFlags.Supportive | ItemFlags.Defensive,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.RemoveStun | EffectFlags.Heal,
                    CastType    = CastType.Target,
                    Range       = ItemData.Mikaels_Crucible.GetItem().Range
                };

                // AOE Shield
                LocketIronSolari = new CustomItem
                {
                    Name        = "locket-iron-solari",
                    DisplayName = Global.Lang.Get("MI_LocketIronSolari"),
                    Item        = ItemData.Locket_of_the_Iron_Solari.GetItem(),
                    Flags       = ItemFlags.Supportive | ItemFlags.Defensive,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    EffectFlags = EffectFlags.Shield,
                    CastType    = CastType.Self,
                    Range       = ItemData.Locket_of_the_Iron_Solari.GetItem().Range
                };

                // Place wards
                Sightstone = new CustomItem
                {
                    Name        = "sightstone",
                    DisplayName = Global.Lang.Get("MI_Sightstone"),
                    Item        = ItemData.Sightstone.GetItem(),
                    Flags       = ItemFlags.Supportive,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    CastType    = CastType.Position,
                    Range       = ItemData.Sightstone.GetItem().Range
                };

                // Place wards
                RubySightstone = new CustomItem
                {
                    Name        = "ruby-sightstone",
                    DisplayName = Global.Lang.Get("MI_RubySightstone"),
                    Item        = ItemData.Ruby_Sightstone.GetItem(),
                    Flags       = ItemFlags.Supportive,
                    CombatFlags = CombatFlags.Melee | CombatFlags.Ranged,
                    CastType    = CastType.Position,
                    Range       = ItemData.Ruby_Sightstone.GetItem().Range
                };

                Items = new List <CustomItem>
                {
                    Youmuu,
                    Tiamat,
                    Hydra,
                    BilgewaterCutlass,
                    BladeRuinedKing,
                    HextechGunblade,
                    MikaelsCrucible,
                    LocketIronSolari,
                    Sightstone,
                    RubySightstone
                };

                MaxRange = Items.Max(s => s.Range);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Ejemplo n.º 11
0
        private void OnCorePostUpdate(EventArgs args)
        {
            try
            {
                if (UltimateManager.Flash() && R.IsReady() && SummonerManager.Flash.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.flash.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }
                    var targets =
                        Targets.Where(
                            t =>
                            t.Distance(Player) < R.Range + SummonerManager.Flash.Range && !t.IsDashing() &&
                            (t.IsFacing(Player)
                                    ? (t.Distance(Player))
                                    : (Prediction.GetPrediction(t, R.Delay + 0.3f)
                                       .UnitPosition.Distance(Player.Position))) > R.Range * 1.025f);
                    foreach (var target in targets)
                    {
                        var min      = Menu.Item(Menu.Name + ".ultimate.flash.min").GetValue <Slider>().Value;
                        var flashPos = Player.Position.Extend(target.Position, SummonerManager.Flash.Range);
                        var pred     =
                            Prediction.GetPrediction(
                                new PredictionInput
                        {
                            Aoe              = true,
                            Collision        = false,
                            CollisionObjects = new[] { CollisionableObjects.YasuoWall },
                            From             = flashPos,
                            RangeCheckFrom   = flashPos,
                            Delay            = R.Delay + 0.3f,
                            Range            = R.Range,
                            Speed            = R.Speed,
                            Radius           = R.Width,
                            Type             = R.Type,
                            Unit             = target
                        });
                        if (pred.Hitchance >= R.GetHitChance("combo"))
                        {
                            R.UpdateSourcePosition(flashPos, flashPos);
                            var hits =
                                GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList();
                            if (UltimateManager.Check(
                                    "combo", min, hits,
                                    hero =>
                                    CalcComboDamage(
                                        hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true)))
                            {
                                if (
                                    R.Cast(
                                        Player.Position.Extend(
                                            pred.CastPosition, -(Player.Position.Distance(pred.CastPosition) * 2)), true))
                                {
                                    Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos));
                                }
                            }
                            else if (Menu.Item(Menu.Name + ".ultimate.flash.duel").GetValue <bool>())
                            {
                                if (UltimateManager.Check(
                                        "combo", 1, hits,
                                        hero =>
                                        CalcComboDamage(
                                            hero, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                            Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true)))
                                {
                                    var cDmg = CalcComboDamage(
                                        target, Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                        Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), true);
                                    if (cDmg - 20 >= target.Health)
                                    {
                                        if (
                                            R.Cast(
                                                Player.Position.Extend(
                                                    pred.CastPosition,
                                                    -(Player.Position.Distance(pred.CastPosition) * 2)), true))
                                        {
                                            Utility.DelayAction.Add(300, () => SummonerManager.Flash.Cast(flashPos));
                                        }
                                    }
                                }
                            }
                            R.UpdateSourcePosition();
                        }
                    }
                }

                if (UltimateManager.Assisted() && R.IsReady())
                {
                    if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                    {
                        Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                    }

                    if (
                        !RLogic(
                            R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady()))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.assisted.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                R.GetHitChance("combo"),
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), false);
                        }
                    }
                }

                if (UltimateManager.Auto() && R.IsReady())
                {
                    if (
                        !RLogic(
                            R.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value,
                            Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                            Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                            Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(), "auto"))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.auto.duel").GetValue <bool>())
                        {
                            RLogicDuel(
                                R.GetHitChance("combo"),
                                Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(),
                                Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(),
                                Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady());
                        }
                    }
                }

                if (HeroListManager.Enabled("w-stunned") && W.IsReady())
                {
                    var target = Targets.FirstOrDefault(
                        t => HeroListManager.Check("w-stunned", t) && Utils.IsStunned(t));
                    if (target != null)
                    {
                        Casting.SkillShot(target, W, W.GetHitChance("harass"));
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Ejemplo n.º 12
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady() && ManaManager.Check("combo-q");
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();

            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }

            if (useE)
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null && Rend.HasBuff(target))
                {
                    if (target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        if (
                            GameObjects.EnemyMinions.Any(
                                m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)) && Rend.IsKillable(m, true)))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var minion =
                                GetDashObjects(
                                    GameObjects.EnemyMinions.Where(
                                        m => m.IsValidTarget(Orbwalking.GetRealAutoAttackRange(m)))
                                    .Cast <Obj_AI_Base>()
                                    .ToList())
                                .Find(
                                    m =>
                                    m.Health > Player.GetAutoAttackDamage(m) &&
                                    m.Health < Player.GetAutoAttackDamage(m) + Rend.GetDamage(m, 1));
                            if (minion != null)
                            {
                                Orbwalker.ForceTarget(minion);
                            }
                        }
                    }
                    else if (E.IsInRange(target))
                    {
                        if (Rend.IsKillable(target, false))
                        {
                            E.Cast();
                        }
                        else
                        {
                            var buff = Rend.GetBuff(target);
                            if (buff != null &&
                                buff.Count >= Menu.Item(Menu.Name + ".combo.e-min").GetValue <Slider>().Value)
                            {
                                if (target.Distance(Player) > E.Range * 0.8 || buff.EndTime - Game.Time < 0.3)
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
            }
        }