public static void ComboLogic() { var PacketCast = SkyLv_Taric.Menu.Item("Taric.UsePacketCast").GetValue <bool>(); var useQ = SkyLv_Taric.Menu.Item("Taric.UseQCombo").GetValue <bool>(); var useW = SkyLv_Taric.Menu.Item("Taric.UseWCombo").GetValue <bool>(); var useE = SkyLv_Taric.Menu.Item("Taric.UseECombo").GetValue <bool>(); var MinimumStackSelfQCombo = SkyLv_Taric.Menu.Item("Taric.MinimumStackSelfQCombo").GetValue <Slider>().Value; var MinimumHpPercentSelfQCombo = SkyLv_Taric.Menu.Item("Taric.MinimumHpPercentSelfQCombo").GetValue <Slider>().Value; if (SkyLv_Taric.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); if (target.IsValidTarget(E.Range)) { if (useE && E.IsReady() && (!CustomLib.HavePassiveAA() || !SkyLv_Taric.Menu.Item("Taric.UseTaricAAPassiveCombo").GetValue <bool>() || Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(Player))) { if (Player.Distance(target) < E.Range) { E.CastIfHitchanceEquals(target, HitChance.VeryHigh, PacketCast); return; } } if (target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player))) { if (!SkyLv_Taric.Menu.Item("Taric.UseWIncomingDamageCombo").GetValue <bool>() && useW && W.IsReady() && (!CustomLib.HavePassiveAA() || !SkyLv_Taric.Menu.Item("Taric.UseTaricAAPassiveCombo").GetValue <bool>()) && (!E.IsReady() || !useE)) { W.Cast(Player, PacketCast); return; } if (useQ && Q.IsReady() && Q.Instance.Ammo >= MinimumStackSelfQCombo && Player.HealthPercent <= MinimumHpPercentSelfQCombo && (!CustomLib.HavePassiveAA() || !SkyLv_Taric.Menu.Item("Taric.UseTaricAAPassiveCombo").GetValue <bool>()) && (!E.IsReady() || !useE) && (Player.HealthPercent < 100 || (!W.IsReady() || !useW))) { Q.Cast(Player, PacketCast); return; } } } #region Ally E if (SkyLv_Taric.Menu.Item("Taric.UseEFromAlly").GetValue <bool>() && E.IsReady() && Player.Mana >= E.ManaCost) { foreach (var AllyHeroE in ObjectManager.Get <AIHeroClient>().Where(a => !a.IsMe && !a.IsDead && a.Team == ObjectManager.Player.Team && Player.Distance(a) < 1600 && (a.HasBuff("TaricWAllyBuff") || a.HasBuff("TaricW")))) { var Allytarget = ObjectManager.Get <AIHeroClient>().Where(t => !t.IsDead && t.Team != ObjectManager.Player.Team && AllyHeroE.Distance(t) < E.Range).FirstOrDefault(); if (Allytarget.IsValidTarget()) { if (SkyLv_Taric.Menu.Item(AllyHeroE.ChampionName + "AllyCCEComboFromAlly", true).GetValue <bool>() && (AllyHeroE.IsCharmed || AllyHeroE.IsStunned || AllyHeroE.IsRooted || AllyHeroE.Spellbook.IsAutoAttacking)) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } if (SkyLv_Taric.Menu.Item(AllyHeroE.ChampionName + "TargetCCEComboFromAlly", true).GetValue <bool>() && (Allytarget.IsCharmed || Allytarget.IsStunned || Allytarget.IsRooted || Allytarget.Spellbook.IsAutoAttacking)) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } if (SkyLv_Taric.Menu.Item(AllyHeroE.ChampionName + "AlwaysComboFromAlly", true).GetValue <bool>()) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } } } } #endregion #region UseQAlly if (SkyLv_Taric.Menu.Item("Taric.UseQAlly").GetValue <bool>() && SkyLv_Taric.Menu.Item("Taric.UseQAllyMode").GetValue <StringList>().SelectedIndex == 0) { if (Q.IsReady() && Player.Mana >= Q.ManaCost) { foreach (var AllyHeroQ in HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead && Player.Distance(x) < Q.Range && Q.Instance.Ammo >= SkyLv_Taric.Menu.Item(x.ChampionName + "MinimumStacksQAlly").GetValue <Slider>().Value&& x.HealthPercent <= SkyLv_Taric.Menu.Item(x.ChampionName + "MinimumHpQAlly").GetValue <Slider>().Value)) { if (AllyHeroQ.IsValidTarget()) { Q.Cast(PacketCast); return; } } } } #endregion #region UseWAlly if (SkyLv_Taric.Menu.Item("Taric.UseWAlly").GetValue <bool>() && SkyLv_Taric.Menu.Item("Taric.UseWAllyMode").GetValue <StringList>().SelectedIndex == 0) { if (W.IsReady() && Player.Mana >= W.ManaCost) { var AllyHeroW = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead && Player.Distance(x) <= W.Range && !SkyLv_Taric.Menu.Item(x.ChampionName + "IncomingDamageWAlly", true).GetValue <bool>() && x.HealthPercent <= SkyLv_Taric.Menu.Item(x.ChampionName + "MinimumHpWAlly").GetValue <Slider>().Value).MinOrDefault(t => t.HealthPercent); if (AllyHeroW.IsValidTarget()) { W.Cast(AllyHeroW, PacketCast); return; } } } #endregion } }
public static void ComboLogic() { var PacketCast = getCheckBoxItem(SkyLv_Taric.Misc, "Taric.UsePacketCast"); var useQ = getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseQCombo"); var useW = getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseWCombo"); var useE = getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseECombo"); var MinimumStackSelfQCombo = getSliderItem(SkyLv_Taric.Combo, "Taric.MinimumStackSelfQCombo"); var MinimumHpPercentSelfQCombo = getSliderItem(SkyLv_Taric.Combo, "Taric.MinimumHpPercentSelfQCombo"); if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { var target = TargetSelector.GetTarget(E.Range, DamageType.Physical); if (target.IsValidTarget(E.Range)) { if (useE && E.IsReady() && (!CustomLib.HavePassiveAA() || !getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseTaricAAPassiveCombo") || Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(Player))) { if (Player.Distance(target) < E.Range) { E.CastIfHitchanceEquals(target, HitChance.VeryHigh, PacketCast); return; } } if (target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player))) { if (!getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseWIncomingDamageCombo") && useW && W.IsReady() && (!CustomLib.HavePassiveAA() || !getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseTaricAAPassiveCombo")) && (!E.IsReady() || !useE)) { W.Cast(Player, PacketCast); return; } if (useQ && Q.IsReady() && Q.Instance.Ammo >= MinimumStackSelfQCombo && Player.HealthPercent <= MinimumHpPercentSelfQCombo && (!CustomLib.HavePassiveAA() || !getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseTaricAAPassiveCombo")) && (!E.IsReady() || !useE) && (Player.HealthPercent < 100 || (!W.IsReady() || !useW))) { Q.Cast(Player, PacketCast); return; } } } #region Ally E if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseEFromAlly") && E.IsReady() && Player.Mana >= E.ManaCost) { foreach (var AllyHeroE in ObjectManager.Get <AIHeroClient>().Where(a => !a.IsMe && !a.IsDead && a.Team == ObjectManager.Player.Team && Player.Distance(a) < 1600 && (a.HasBuff("TaricWAllyBuff") || a.HasBuff("TaricW")))) { var Allytarget = ObjectManager.Get <AIHeroClient>().Where(t => !t.IsDead && t.Team != ObjectManager.Player.Team && AllyHeroE.Distance(t) < E.Range).FirstOrDefault(); if (Allytarget.IsValidTarget()) { if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHeroE.NetworkId + "AllyCCEComboFromAlly") && (AllyHeroE.IsCharmed || AllyHeroE.IsStunned || AllyHeroE.IsRooted || !AllyHeroE.CanAttack)) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHeroE.NetworkId + "TargetCCEComboFromAlly") && (Allytarget.IsCharmed || Allytarget.IsStunned || Allytarget.IsRooted || !Allytarget.CanAttack)) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } if (getCheckBoxItem(SkyLv_Taric.Combo, AllyHeroE.NetworkId + "AlwaysComboFromAlly")) { E.Cast(Allytarget.ServerPosition, PacketCast); return; } } } } #endregion #region UseQAlly if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseQAlly") && getBoxItem(SkyLv_Taric.Combo, "Taric.UseQAllyMode") == 0) { if (Q.IsReady() && Player.Mana >= Q.ManaCost) { foreach (var AllyHeroQ in HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead && Player.Distance(x) < Q.Range && Q.Instance.Ammo >= getSliderItem(SkyLv_Taric.Combo, x.NetworkId + "MinimumStacksQAlly") && x.HealthPercent <= getSliderItem(SkyLv_Taric.Combo, x.NetworkId + "MinimumHpQAlly"))) { if (AllyHeroQ.IsValidTarget()) { Q.Cast(PacketCast); return; } } } } #endregion #region UseWAlly if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseWAlly") && getBoxItem(SkyLv_Taric.Combo, "Taric.UseWAllyMode") == 0) { if (W.IsReady() && Player.Mana >= W.ManaCost) { var AllyHeroW = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead && Player.Distance(x) <= W.Range && !getCheckBoxItem(SkyLv_Taric.Combo, x.NetworkId + "IncomingDamageWAlly") && x.HealthPercent <= getSliderItem(SkyLv_Taric.Combo, x.NetworkId + "MinimumHpWAlly")).MinOrDefault(t => t.HealthPercent); if (AllyHeroW.IsValidTarget()) { W.Cast(AllyHeroW, PacketCast); return; } } } #endregion } }