public static void CastItems() { CastSliders(); foreach (var item in Itemlist) { // Banner of Command if (item.Id == ItemId.Banner_of_Command && MenuManager.DefensiveItemMenu["Bannercall"].Cast <CheckBox>().CurrentValue && item.CanUseItem()) { var minion = TargetManager.GetMinionTarget(1200, DamageType.Magical, true); if (minion != null && BoCCheck(minion.BaseSkinName) && minion.Health >= minion.MaxHealth * 0.5f) { item.Cast(minion); } } // Bilgewater Cutlass if (item.Id == ItemId.Bilgewater_Cutlass && MenuManager.OffensiveItemMenu["Cutlasscall"].Cast <CheckBox>().CurrentValue && item.CanUseItem()) { var target = TargetManager.GetChampionTarget(550, DamageType.Magical); if (target != null && (target.Health <= Champion.CalculateDamageOnUnit(target, DamageType.Magical, 100) || (!target.IsFacing(Champion) && target.HealthPercent <= 50))) { item.Cast(target); } } // Blade of the Ruined King -- needs test if (item.Id == ItemId.Blade_of_the_Ruined_King && MenuManager.OffensiveItemMenu["Botrkcall"].Cast <CheckBox>().CurrentValue && item.CanUseItem()) { var target = TargetManager.GetChampionTarget(550, DamageType.Physical); if (target != null && (target.Health <= Champion.CalculateDamageOnUnit(target, DamageType.Physical, BotrkCheck(target)) || (!target.IsFacing(Champion) && target.HealthPercent <= 50))) { item.Cast(target); } } // Corruption Potion if (item.Id == (ItemId)2033 && Champion.HealthPercent <= FlaskDark && !Champion.HasBuff("ItemDarkCrystalFlask") && !Champion.IsInShopRange() && item.CanUseItem()) { item.Cast(); } // Diet Poro-Snax if (item.Id == (ItemId)2054 && MenuManager.TrinketItemMenu["Porosnaxcall"].Cast <CheckBox>().CurrentValue && item.CanUseItem()) { item.Cast(); } // Elixir of Iron if (item.Id == ItemId.Elixir_of_Iron && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.ConsumableItemMenu["Ironcall"].Cast <CheckBox>().CurrentValue && !Champion.HasBuff("ElixirOfWrath") && !Champion.HasBuff("ElixirOfSorcery") && Champion.CountAlliesInRange(Champion.GetAutoAttackRange()) >= 1 && item.CanUseItem()) { item.Cast(); } // Elixir of Sorcery if (item.Id == ItemId.Elixir_of_Sorcery && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.ConsumableItemMenu["Sorcerycall"].Cast <CheckBox>().CurrentValue && !Champion.HasBuff("ElixirOfIron") && !Champion.HasBuff("ElixirOfWrath") && Champion.CountEnemiesInRange(Champion.GetAutoAttackRange()) >= 1 && item.CanUseItem()) { var turret = TargetManager.GetTurretTarget(Champion.GetAutoAttackRange()); if (turret != null) { item.Cast(); } } // Elixir of Wrath if (item.Id == ItemId.Elixir_of_Wrath && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.ConsumableItemMenu["Wrathcall"].Cast <CheckBox>().CurrentValue && !Champion.HasBuff("ElixirOfIron") && !Champion.HasBuff("ElixirOfSorcery") && Champion.CountEnemiesInRange(Champion.GetAutoAttackRange()) >= 1 && item.CanUseItem()) { item.Cast(); } // Frost Queen's Claim -- needs test if (item.Id == ItemId.Frost_Queens_Claim && Champion.CountEnemiesInRange(5000) >= 2 && item.CanUseItem()) { var target = TargetManager.GetChampionTarget(5000, DamageType.Magical); if (target != null && ((!target.IsFacing(Champion) && target.HealthPercent <= 50) || (Champion.CountEnemiesInRange(5000) >= 4 && target.IsFacing(Champion)))) { item.Cast(); } } item.Cast(); // Health Potion if (item.Id == ItemId.Health_Potion && Champion.HealthPercent <= HealthPot && !Champion.HasBuff("RegenerationPotion") && !Champion.IsInShopRange() && item.CanUseItem()) { item.Cast(); } // Hextech Sweeper -- needs test /* if (item.Id == ItemId.Hextech_Sweeper * && DefensiveItemMenu["Hextechcall"].Cast<CheckBox>().CurrentValue * && target != null && target.HasBuffOfType(BuffType.Invisibility) * && target.Distance(player) <= 800 * && item.CanUseItem()) * item.Cast(target);*/ // Hextech Sweeper Trinket -- needs test /*if (item.Name == "HextechSweeperTT" * && TrinketItemMenu["HextechTTcall"].Cast<CheckBox>().CurrentValue * && target != null && target.IsStealthed * && target.HasBuffOfType(BuffType.Invisibility) * && target.Distance(player) <= 800 * && item.CanUseItem()) * item.Cast(target.Position);*/ // The Lightbringer -- needs test /*if (item.Id == ItemId.The_Lightbringer * && OffensiveItemMenu["Lightbringercall"].Cast<CheckBox>().CurrentValue * && target != null && target.IsStealthed * && target.Distance(player) <= 800 * && item.CanUseItem()) * item.Cast(target);*/ // Hunter's Potion if (item.Id == (ItemId)2032 && Champion.HealthPercent <= FlaskJungle && !Champion.HasBuff("ItemCrystalFlaskJungle") && !Champion.IsInShopRange() && item.CanUseItem()) { item.Cast(); } // Muramana if (item.Id == (ItemId)3042 && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.OffensiveItemMenu["Muracall"].Cast <CheckBox>().CurrentValue && Champion.ManaPercent >= 3 && Champion.CountEnemiesInRange(Champion.GetAutoAttackRange()) > 0 && item.CanUseItem()) { item.Cast(); } // Oracle's Extract -- needs test /*if (item.Id == ItemId.Oracles_Extract || item.Id == ItemId.Oracles_Extract * && ConsumableItemMenu["Oraclecall"].Cast<CheckBox>().CurrentValue * && !player.HasBuff("OracleExtractSight") * && target != null && target.IsStealthed * && item.CanUseItem()) * item.Cast(player);*/ // Poro-Snax if (item.Id == (ItemId)2052 && MenuManager.TrinketItemMenu["Porosnaxcall"].Cast <CheckBox>().CurrentValue && item.CanUseItem()) { item.Cast(); } // Regeneration Potion if (item.Id == (ItemId)2031 && Champion.HealthPercent <= Flask && !Champion.HasBuff("ItemCrystalFlask") && !Champion.IsInShopRange() && item.CanUseItem()) { item.Cast(); } // Seraph's Embrace if ((item.Id == (ItemId)3040 || item.Id == (ItemId)3048) && Champion.HealthPercent <= Seraphs && Champion.ManaPercent > 20 && item.CanUseItem()) { item.Cast(); } // Total Biscuit of Rejuvenation if (item.Id == (ItemId)2010 && Champion.HealthPercent <= Biscuit && !Champion.HasBuff("ItemMiniRegenPotion") && !Champion.IsInShopRange() && item.CanUseItem()) { item.Cast(); } // Youmuu's Ghostblade if (item.Id == ItemId.Youmuus_Ghostblade && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.OffensiveItemMenu["Youmuucall"].Cast <CheckBox>().CurrentValue && Champion.CountEnemiesInRange(Champion.GetAutoAttackRange()) >= 1 && item.CanUseItem()) { item.Cast(); } } }
public static void CastSummonerSpells() { // Calculate Spell Damage CalculateSummonerSpells(); // BARRIER if (Barrier != null && !Barrier.IsOnCooldown) { // Needs Damage Calculator to calculate } // CLARITY if (Clarity != null && !Clarity.IsOnCooldown) { // Targets var ally = TargetManager.GetChampionTarget(Clarity.Range, DamageType.Magical, true); // Restore self if (MenuManager.SummonerSpellMenu["clarityself"].Cast <Slider>().CurrentValue > 0 && (Champion.ManaPercent <= MenuManager.SummonerSpellMenu["clarityself"].Cast <Slider>().CurrentValue)) { Clarity.Cast(); } // Restore ally if (ally != null && MenuManager.SummonerSpellMenu["clarityally"].Cast <Slider>().CurrentValue > 0 && ally.ManaPercent <= MenuManager.SummonerSpellMenu["clarityally"].Cast <Slider>().CurrentValue) { Clarity.Cast(); } } // CLEANSE if (Cleanse != null && !Cleanse.IsOnCooldown && ((Champion.HasBuffOfType(BuffType.Blind) && MenuManager.SummonerSpellMenu["Cblind"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Charm) && MenuManager.SummonerSpellMenu["Ccharm"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Fear) && MenuManager.SummonerSpellMenu["Cfear"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Flee) && MenuManager.SummonerSpellMenu["Cflee"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Polymorph) && MenuManager.SummonerSpellMenu["Cpolymorph"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Silence) && MenuManager.SummonerSpellMenu["Csilence"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Sleep) && MenuManager.SummonerSpellMenu["Csleep"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Slow) && MenuManager.SummonerSpellMenu["Cslow"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Snare) && MenuManager.SummonerSpellMenu["Csnare"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Stun) && MenuManager.SummonerSpellMenu["Cstun"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuffOfType(BuffType.Taunt) && MenuManager.SummonerSpellMenu["Ctaunt"].Cast <CheckBox>().CurrentValue) | (Champion.HasBuff("summonerexhaust") && MenuManager.SummonerSpellMenu["Cexhaust"].Cast <CheckBox>().CurrentValue) || (Champion.HasBuff("summonerdot") && Champion.Health <= 50 + 20 * Champion.Level && MenuManager.SummonerSpellMenu["Cignite"].Cast <CheckBox>().CurrentValue))) { Cleanse.Cast(); } // EXHAUST if (Exhaust != null && !Exhaust.IsOnCooldown) { // Targets var target = TargetManager.GetChampionTarget(Exhaust.Range, DamageType.Magical); var ally = TargetManager.GetChampionTarget(Exhaust.Range, DamageType.Magical, true); // Exhaust for self if (target != null && Champion.HealthPercent <= MenuManager.SummonerSpellMenu["exhaustself"].Cast <Slider>().CurrentValue && target.IsAttackingPlayer) { Exhaust.Cast(target); } // Exhaust for ally if (target != null && ally != null && ally.HealthPercent <= MenuManager.SummonerSpellMenu["exhaustally"].Cast <Slider>().CurrentValue && target.IsFacing(ally)) { Exhaust.Cast(target); } } // GARRISON if (Garrison != null && !Garrison.IsOnCooldown) { // Need Object name for CP before I can finish coding } // HEAL if (Heal != null && !Heal.IsOnCooldown) { // Targets var ally = TargetManager.GetChampionTarget(Heal.Range, DamageType.Magical); // Heal self if (MenuManager.SummonerSpellMenu["healself"].Cast <Slider>().CurrentValue > 0 && (Champion.HealthPercent <= MenuManager.SummonerSpellMenu["healself"].Cast <Slider>().CurrentValue) && !Champion.HasBuff("summonerheal")) { Heal.Cast(); } // Heal ally if (ally != null && MenuManager.SummonerSpellMenu["healally"].Cast <Slider>().CurrentValue > 0 && ally.HealthPercent <= MenuManager.SummonerSpellMenu["healally"].Cast <Slider>().CurrentValue && !ally.HasBuff("summonerheal")) { Heal.Cast(); } } // IGNITE if (Ignite != null && !Ignite.IsOnCooldown && MenuManager.SummonerSpellMenu["ignite"].Cast <Slider>().CurrentValue > 0) { var target = TargetManager.GetChampionTarget(Ignite.Range, DamageType.True); if (target != null && target.Health <= MenuManager.SummonerSpellMenu["ignite"].Cast <Slider>().CurrentValue) { Ignite.Cast(target); } } // MARK if (Mark != null && !Mark.IsOnCooldown && MenuManager.SummonerSpellMenu["mark"].Cast <CheckBox>().CurrentValue && Mark.Name != "snowballfollowupcast") { var ks = TargetManager.GetChampionTarget(Mark.Range, DamageType.True, false, Markdamage); if (ks != null) { Mark.Cast(ks); } else { var target = TargetManager.GetChampionTarget(Mark.Range, DamageType.True, false, Markdamage); if (target != null) { Mark.Cast(target); } } } // PORO THROW if (Porothrow != null && !Porothrow.IsOnCooldown && MenuManager.SummonerSpellMenu["porothrow"].Cast <CheckBox>().CurrentValue && Porothrow.Name != "porothrowfollowupcast") { var ks = TargetManager.GetChampionTarget(Porothrow.Range, DamageType.True, false, Porothrowdamage); if (ks != null) { Porothrow.Cast(ks); } else { var target = TargetManager.GetChampionTarget(Porothrow.Range, DamageType.True, false, Porothrowdamage); if (target != null) { Porothrow.Cast(target); } } } // SMITE if (Smite != null && !Smite.IsOnCooldown && MenuManager.SummonerSpellMenu["smite"].Cast <CheckBox>().CurrentValue) { var kstarget = TargetManager.GetChampionTarget(Smite.Range, DamageType.True, false, Smitedamage); if (kstarget != null && Smitename == SmiteName.Chilling && MenuManager.SummonerSpellMenu["smitechill"].Cast <CheckBox>().CurrentValue) { Smite.Cast(kstarget); } var target = TargetManager.GetChampionTarget(Champion.GetAutoAttackRange(), DamageType.True); if (target != null && Smitename == SmiteName.Challenging && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && MenuManager.SummonerSpellMenu["smiteduel"].Cast <CheckBox>().CurrentValue) { Smite.Cast(target); } var ksminion = TargetManager.GetMinionTarget(Smite.Range, DamageType.True, false, true, Smitedamage); if (ksminion != null) { switch (target.Name) { case "SRU_Blue": if (MenuManager.SummonerSpellMenu["smiteblue"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Red": if (MenuManager.SummonerSpellMenu["smitered"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Murkwolf": if (MenuManager.SummonerSpellMenu["smitemurk"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Razorbeak": if (MenuManager.SummonerSpellMenu["smiteraptor"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Krug": if (MenuManager.SummonerSpellMenu["smitekrug"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Gromp": if (MenuManager.SummonerSpellMenu["smitegromp"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "Sru_Crab": if (MenuManager.SummonerSpellMenu["smitecrab"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Dragon": if (MenuManager.SummonerSpellMenu["smitedragon"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_RiftHerald": if (MenuManager.SummonerSpellMenu["smiteherald"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "SRU_Baron": if (MenuManager.SummonerSpellMenu["smitenashor"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "TT_NWolf": if (MenuManager.SummonerSpellMenu["smitewolf"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "TT_NGolem": if (MenuManager.SummonerSpellMenu["smitegolem"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "TT_NWraith": if (MenuManager.SummonerSpellMenu["smitewraith"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; case "TT_Spiderboss": if (MenuManager.SummonerSpellMenu["smitespider"].Cast <CheckBox>().CurrentValue) { Smite.Cast(ksminion); } break; } } } }