public static void UseItems(List <Obj_AI_Base> enemies, bool ks) { #region Item Initialization InventorySlot QSS = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Quick Silver Sash")) ? Vi.GetItem(ItemId.Quicksilver_Sash) : null, MercurialsScimitar = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Mercurials Scimitar")) ? Vi.GetItem(ItemId.Mercurial_Scimitar) : null, RavenousHydra = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Ravenous Hydra")) ? Vi.GetItem(ItemId.Ravenous_Hydra) : null, TitanicHydra = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Titanic Hydra")) ? Vi.GetItem(ItemId.Titanic_Hydra) : null, Tiamat = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Tiamat")) ? Vi.GetItem(ItemId.Tiamat) : null, Youmuus = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Youmuus")) ? Vi.GetItem(ItemId.Youmuus_Ghostblade) : null, BOTRK = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Blade of the Ruined King")) ? Vi.GetItem(ItemId.Blade_of_the_Ruined_King) : null, BilgewaterCutlass = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Bilgewater Cutlass")) ? Vi.GetItem(ItemId.Bilgewater_Cutlass) : null, HextechGunblade = (MenuHandler.GetCheckboxValue(MenuHandler.Items, "Use Hextech Gunblade")) ? Vi.GetItem(ItemId.Hextech_Gunblade) : null; #endregion #region QSS if (!hasDoneActionThisTick && QSS.MeetsCriteria() && Vi.CanCancleCC()) { hasDoneActionThisTick = QSS.Cast(); } #endregion #region Mercurials Scimitar if (!hasDoneActionThisTick && MercurialsScimitar.MeetsCriteria() && Vi.CanCancleCC()) { hasDoneActionThisTick = MercurialsScimitar.Cast(); } #endregion #region Ravenous Hydra if (!hasDoneActionThisTick && RavenousHydra.MeetsCriteria() && Vi.IsAutoCanceling(enemies) && enemies.Where(a => a.IsInRange(Vi, 400)).FirstOrDefault() != null && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Ravenous_Hydra)).FirstOrDefault() != null)) { hasDoneActionThisTick = RavenousHydra.Cast(); } #endregion #region Titanic Hydra if (!hasDoneActionThisTick && TitanicHydra.MeetsCriteria() && enemies.Where(a => a.IsInRange(Vi, Vi.GetAutoAttackRange())).FirstOrDefault() != null && Vi.IsAutoCanceling(enemies) && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Titanic_Hydra)).FirstOrDefault() != null)) { hasDoneActionThisTick = TitanicHydra.Cast(); } #endregion #region Tiamat if (!hasDoneActionThisTick && Tiamat.MeetsCriteria() && Vi.IsAutoCanceling(enemies) && enemies.Where(a => a.IsInRange(Vi, 400)).FirstOrDefault() != null && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Tiamat)).FirstOrDefault() != null)) { hasDoneActionThisTick = Tiamat.Cast(); } #endregion #region Youmuus if (!hasDoneActionThisTick && Youmuus.MeetsCriteria() && Vi.CountEnemyHeroesInRangeWithPrediction((int)Vi.GetAutoAttackRange(), 0) >= 1) { hasDoneActionThisTick = Youmuus.Cast(); } #endregion //all targeted spells that must be used on champions must be called after this enemies = enemies.Where(a => a.Type == GameObjectType.AIHeroClient).ToList(); var target = enemies.OrderBy(a => a.Health).FirstOrDefault(); #region Hextech Gunblade if (!hasDoneActionThisTick && target != null && HextechGunblade.MeetsCriteria() && enemies.Where(a => a.IsInRange(Vi, 700)).FirstOrDefault() != null && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Hextech_Gunblade)).FirstOrDefault() != null)) { hasDoneActionThisTick = HextechGunblade.Cast(target); } #endregion #region BOTRK if (!hasDoneActionThisTick && target != null && BOTRK.MeetsCriteria() && enemies.Where(a => a.IsInRange(Vi, 550)).FirstOrDefault() != null && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Blade_of_the_Ruined_King)).FirstOrDefault() != null)) { hasDoneActionThisTick = BOTRK.Cast(target); } #endregion #region Bilgewater Cutlass if (!hasDoneActionThisTick && target != null && BilgewaterCutlass.MeetsCriteria() && enemies.Where(a => a.IsInRange(Vi, 550)).FirstOrDefault() != null && (!ks || enemies.Where(a => a.MeetsCriteria() && a.Health <= DamageLibrary.GetItemDamage(Vi, a, ItemId.Bilgewater_Cutlass)).FirstOrDefault() != null)) { hasDoneActionThisTick = BilgewaterCutlass.Cast(target); } #endregion }
public static void Combo() { Menu menu = MenuHandler.Combo; List <Obj_AI_Base> enemies = EntityManager.Heroes.Enemies.ToList().ToObj_AI_BaseList(); if (TargetSelector.SelectedTarget != null && TargetSelector.SelectedTarget.MeetsCriteria() && TargetSelector.SelectedTarget.IsInRange(Rengar, 1200)) { enemies = new List <Obj_AI_Base>() { TargetSelector.SelectedTarget } } ; int QHitNumber = 0; Vector3 QPos = Program.Q.GetBestConeAndLinearCastPosition(Program.Q2, enemies, Rengar.Position, out QHitNumber); int EHitNumber = 0; Vector3 EPos = Program.E.GetBestLinearPredictionPos(enemies, Rengar.Position, out EHitNumber); if (QPos != Vector3.Zero && QHitNumber >= 1 && Rengar.IsAutoCanceling(enemies)) { if (menu.GetCheckboxValue("Use Q") && Rengar.Ferocity() < 4) { CastQ(QPos); } if (menu.GetCheckboxValue("Use Empowered Q") && Rengar.Ferocity() == 4) { CastQ(QPos); } } if (menu.GetCheckboxValue("Use W") && Rengar.Ferocity() < 4) { if (menu.GetCheckboxValue("Use W for damage") && enemies.Where(a => a.IsInRange(Rengar, Program.W.Range)).Count() >= 1) { CastW(); } if (menu.GetCheckboxValue("Use W for fourth ferocity stack") && Rengar.Ferocity() == 3 && enemies.Where(a => a.IsInRange(Rengar, Program.W.Range)).Count() >= 1) { CastW(); } if (Rengar.GreyShieldPercent() >= 1 && menu.GetSliderValue("Use W at % black health") <= Rengar.GreyShieldPercent()) { CastW(); } } if (menu.GetCheckboxValue("Use Empowered W") && Rengar.Ferocity() == 4) { if (menu.GetCheckboxValue("Use Empowered W for damage") && enemies.Where(a => a.IsInRange(Rengar, Program.W.Range)).Count() >= 1) { CastW(); } if (menu.GetCheckboxValue("Use Empowered W to Stop CC") && Rengar.CanCancleCC()) { CastW(); } if (Rengar.GreyShieldPercent() >= 1 && menu.GetSliderValue("Use Empowered W at % black health") <= Rengar.GreyShieldPercent()) { CastW(); } } if (menu.GetCheckboxValue("Use E") && Rengar.Ferocity() < 4 && Rengar.IsAutoCanceling(enemies) && EHitNumber >= 1) { CastE(EPos); } if (menu.GetCheckboxValue("Use Empowered E") && Rengar.IsAutoCanceling(enemies) && Rengar.Ferocity() == 4 && EHitNumber >= 1) { CastE(EPos); } if (menu.GetCheckboxValue("Use Items")) { UseItems(enemies, false); } if (menu.GetCheckboxValue("Use Smite")) { UseSmite(enemies, false); } if (menu.GetCheckboxValue("Use Ignite")) { UseIgnite(enemies, true); } }