public static void Defensive2() { //Zhonyas if (ActiveMenu["Zhonyas2"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if (Zhonyas.IsOwned() && Zhonyas.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.ZyHp2"].Cast <Slider>().CurrentValue) { Zhonyas.Cast(); } } } //Seraph if (ActiveMenu["Seraph2"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if (Seraph.IsOwned() && Seraph.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.SeraphHp2"].Cast <Slider>().CurrentValue) { Seraph.Cast(); } } } //Solari if (ActiveMenu["Solari2"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if (Solari.IsOwned() && Solari.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.SolariHp2"].Cast <Slider>().CurrentValue) { Solari.Cast(); } } } }
private static void Events_OnIncomingDamage(Events.InComingDamageEventArgs args) { try { if (args.Target == null || !args.Target.IsKillable()) { return; } if (args.Target.IsAlly && !args.Target.IsMe && Def.CheckBoxValue("ally")) { if (Solari.ItemReady(Def) && Def.SliderValue(Solari.Id + "hp") >= args.Target.HealthPercent) { Solari.Cast(); return; } } if (args.Target.IsMe) { if (Zhonyas.ItemReady(Def) && Def.SliderValue(Zhonyas.Id + "hp") >= args.Target.HealthPercent) { Zhonyas.Cast(); return; } if (Seraphs.ItemReady(Def) && Def.SliderValue(Seraphs.Id + "hp") >= args.Target.HealthPercent) { Seraphs.Cast(); return; } if (Solari.ItemReady(Def) && Def.SliderValue(Solari.Id + "hp") >= args.Target.HealthPercent) { Solari.Cast(); } } } catch (Exception ex) { Logger.Send("Activator Defence Error At Events_OnIncomingDamage", ex, Logger.LogLevel.Error); } }
static void Game_OnTick(EventArgs args) { var UseFOT = (Auto["AutoFOT"].Cast <CheckBox>().CurrentValue); var UseMikael = (Auto["AutoMikael"].Cast <CheckBox>().CurrentValue); if (Player.IsDead) { return; } if (Player.CountEnemiesInRange(1000) > 0) { foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies) { foreach (AIHeroClient ally in EntityManager.Heroes.Allies) { if (ally.IsFacing(enemy) && ally.HealthPercent <= 30 && Player.Distance(ally) <= 750) { if (UseFOT && FOTMountain.IsReady()) { FOTMountain.Cast(ally); } if (UseMikael && (ally.HasBuffOfType(BuffType.Charm) || ally.HasBuffOfType(BuffType.Fear) || ally.HasBuffOfType(BuffType.Polymorph) || ally.HasBuffOfType(BuffType.Silence) || ally.HasBuffOfType(BuffType.Sleep) || ally.HasBuffOfType(BuffType.Snare) || ally.HasBuffOfType(BuffType.Stun) || ally.HasBuffOfType(BuffType.Taunt) || ally.HasBuffOfType(BuffType.Polymorph)) && Mikael.IsReady()) { Mikael.Cast(ally); } } } } } Target = TargetSelector.GetTarget(700, DamageType.Magical); var useGlory = (Auto["AutoGlory"].Cast <CheckBox>().CurrentValue); var useRanduin = (Auto["AutoRanduin"].Cast <CheckBox>().CurrentValue); var rCount = Combo["rCount"].Cast <Slider>().CurrentValue; if (Target != null) { if (Target.IsValidTarget()) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { var useQ = Combo["ComboUseQ"].Cast <CheckBox>().CurrentValue; var useW = Combo["ComboUseW"].Cast <CheckBox>().CurrentValue; var useE = Combo["ComboUseE"].Cast <CheckBox>().CurrentValue; var useR = Combo["ComboUseR"].Cast <CheckBox>().CurrentValue; var level = 15 * Player.Level; if (QSS.IsReady() && (Player.HasBuffOfType(BuffType.Charm) || Player.HasBuffOfType(BuffType.Blind) || Player.HasBuffOfType(BuffType.Fear) || Player.HasBuffOfType(BuffType.Polymorph) || Player.HasBuffOfType(BuffType.Silence) || Player.HasBuffOfType(BuffType.Sleep) || Player.HasBuffOfType(BuffType.Snare) || Player.HasBuffOfType(BuffType.Stun) || Player.HasBuffOfType(BuffType.Suppression) || Player.HasBuffOfType(BuffType.Taunt))) { QSS.Cast(); } foreach (AIHeroClient ally in EntityManager.Heroes.Allies) { if (EntityManager.Heroes.Enemies.Where(enemy => enemy != Player && enemy.Distance(Player) <= 1000).Count() > 0 && ally.Distance(Player) <= 600 && Solari.IsReady()) { if (ally.HealthPercent < 50) { Solari.Cast(); } } } if (Q.IsReady() && Target.IsValidTarget(Q.Range) && !Player.IsDashing() && useQ) { Q.Cast(Target); } foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies) { foreach (AIHeroClient ally in EntityManager.Heroes.Allies) { if (W.IsReady() && Target.CanCast && useW) { W.Cast(ally); if (E.IsReady() && useE) { E.Cast(Target); } } } } if (EntityManager.Heroes.Allies.Where(ally => ally != Player && ally.Distance(Player) <= 700).Count() > 0 && Glory.IsReady() && useGlory) { Glory.Cast(); if (Q.IsReady() && useQ) { Q.Cast(Target); } } foreach (AIHeroClient enemie in EntityManager.Heroes.Enemies) { if (Combo["rCount"].Cast <Slider>().CurrentValue > 0 && R.IsReady() && EntityManager.Heroes.Enemies.Where(enemy => enemy != Player && enemy.Distance(Player) <= 1200).Count() >= rCount && R.IsReady() && !enemie.IsDead && !enemie.IsZombie && useR) { R.Cast(enemie); } } if (Target.IsValidTarget(Bilgewater.Range) && Bilgewater.IsReady()) { Bilgewater.Cast(Target); } if (useRanduin && Target.IsValidTarget(Randuin.Range) && Randuin.IsReady()) { Randuin.Cast(); } } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { if (Q.IsReady() && Target.IsValidTarget(Q.Range)) { Q.Cast(Target); } } foreach (AIHeroClient allie in EntityManager.Heroes.Allies) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { if (EntityManager.Heroes.Allies.Where(ally => ally != Player && ally.Distance(Player) <= 700).Count() > 0) { W.Cast(allie); } } } } } return; }
private void Survival() { if (Player.HealthPercent < 60 && (Seraph.IsReady() || Zhonya.IsReady() || CanUse(barrier))) { var dmg = OktwCommon.GetIncomingDamage(Player, 1); var enemys = Player.CountEnemiesInRange(800); if (dmg > 0 || enemys > 0) { if (CanUse(barrier) && getCheckBoxItem("Barrier")) { var value = 95 + Player.Level * 20; if (dmg > value && Player.HealthPercent < 50) { Player.Spellbook.CastSpell(barrier, Player); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Player.Spellbook.CastSpell(barrier, Player); } else if (Player.Health - dmg < Player.Level * 10) { Seraph.Cast(); } } if (Seraph.IsReady() && getCheckBoxItem("Seraph")) { var value = Player.Mana * 0.2 + 150; if (dmg > value && Player.HealthPercent < 50) { Seraph.Cast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Seraph.Cast(); } else if (Player.Health - dmg < Player.Level * 10) { Seraph.Cast(); } } if (Zhonya.IsReady() && getCheckBoxItem("Zhonya")) { if (dmg > Player.Level * 35) { Zhonya.Cast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Zhonya.Cast(); } else if (Player.Health - dmg < Player.Level * 10) { Zhonya.Cast(); } } } } if (!Solari.IsReady() && !FaceOfTheMountain.IsReady() && !CanUse(heal)) { return; } foreach ( var ally in Program.Allies.Where( ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 50 && Player.Distance(ally.ServerPosition) < 700)) { var dmg = OktwCommon.GetIncomingDamage(ally, 1); var enemys = ally.CountEnemiesInRange(700); if (dmg == 0 && enemys == 0) { continue; } if (CanUse(heal) && getCheckBoxItem("Heal")) { if (!getCheckBoxItem("AllyHeal") && !ally.IsMe) { return; } if (ally.Health - dmg < enemys * ally.Level * 15) { Player.Spellbook.CastSpell(heal, ally); } else if (ally.Health - dmg < ally.Level * 10) { Player.Spellbook.CastSpell(heal, ally); } } if (getCheckBoxItem("Solari") && Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range) { var value = 75 + 15 * Player.Level; if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < enemys * ally.Level * 15) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } if (getCheckBoxItem("FaceOfTheMountain") && FaceOfTheMountain.IsReady() && Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range) { var value = 0.1 * Player.MaxHealth; if (dmg > value && Player.HealthPercent < 50) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < enemys * ally.Level * 15) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < ally.Level * 10) { FaceOfTheMountain.Cast(ally); } } } }
private void Survival() { if (Player.HealthPercent < 60 && (Seraph.IsReady || ZhonyaReady() || CanUse(Barrier))) { var dmg = OktwCommon.GetIncomingDamage(Player, 1); var enemys = Player.CountEnemyHeroesInRange(800); if (dmg > 0 || enemys > 0) { if (CanUse(Barrier) && Config["activator"]["summoner"].GetValue <MenuBool>("Barrier").Value) { var value = 95 + Player.Level * 20; if (dmg > value && Player.HealthPercent < 50) { Player.Spellbook.CastSpell(Barrier, Player); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Player.Spellbook.CastSpell(Barrier, Player); } else if (Player.Health - dmg < Player.Level * 10) { Player.Spellbook.CastSpell(Barrier, Player); } } if (Seraph.IsReady && Config["activator"]["defensives"].GetValue <MenuBool>("Seraph").Value) { var value = 150 + Player.Mana * 0.15; if (dmg > value && Player.HealthPercent < 50) { Seraph.Cast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Seraph.Cast(); } else if (Player.Health - dmg < Player.Level * 10) { Seraph.Cast(); } } if (ZhonyaReady() && Config["activator"]["defensives"]["zhonya"].GetValue <MenuBool>("Zhonya").Value) { if (dmg > Player.Level * 35) { ZhonyaTryCast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { ZhonyaTryCast(); } else if (Player.Health - dmg < Player.Level * 10) { ZhonyaTryCast(); } } } } if (!Solari.IsReady && !CanUse(Heal)) { return; } foreach (var ally in GameObjects.AllyHeroes.Where(a => a.IsValidTarget(700, false) && a.HealthPercent < 50)) { var dmg = OktwCommon.GetIncomingDamage(ally, 1); var enemys = ally.CountEnemyHeroesInRange(700); if (dmg == 0 && enemys == 0) { continue; } if (CanUse(Heal) && Config["activator"]["summoner"]["heal"].GetValue <MenuBool>("Heal").Value) { if (!Config["activator"]["summoner"]["heal"].GetValue <MenuBool>("AllyHeal").Value&& !ally.IsMe) { return; } if (ally.Health - dmg < enemys * ally.Level * 15) { Player.Spellbook.CastSpell(Heal, ally); } else if (ally.Health - dmg < ally.Level * 10) { Player.Spellbook.CastSpell(Heal, ally); } } if (Config["activator"]["defensives"].GetValue <MenuBool>("Solari").Value&& Solari.IsReady && Player.Distance(ally.Position) < Solari.Range) { var value = 30 + 15 * Player.Level + 0.2 * Player.BonusHealth; if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < enemys * ally.Level * 15) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } } }
public static void Execute() { if (Player.Instance.IsInShopRange() || Player.Instance.CountAlliesInRange(Misc.RangeEnemy) < Misc.EnemyCount || Activator.lastUsed >= Environment.TickCount) { return; } #region Self if (Zhonyas.IsReady() && Zhonyas.IsOwned() && Player.Instance.InDanger(Settings.ZhonyasMyHp) && Settings.Zhonyas) { Zhonyas.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Seraph.IsReady() && Seraph.IsOwned() && Player.Instance.InDanger(Settings.MYHPSeraph) && Settings.UseSeraph) { Seraph.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Talisman.IsReady() && Player.Instance.CountAlliesInRange(450) >= 2 && Talisman.IsOwned() && Player.Instance.InDanger(30)) { Talisman.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Randuin.IsReady() && Player.Instance.CountEnemiesInRange(Randuin.Range) >= 2 && Randuin.IsOwned() && Player.Instance.InDanger(30)) { Randuin.Cast(); Activator.lastUsed = Environment.TickCount + 500; } //Allies if (FaceOfTheMountain.IsReady() && FaceOfTheMountain.IsOwned()) { var allyFace = EntityManager.Heroes.Allies.FirstOrDefault(a => a.InDanger(Settings.AllyHPFaceOfTheMountain)); if (allyFace != null) { FaceOfTheMountain.Cast(allyFace); Activator.lastUsed = Environment.TickCount + 500; } } if (Mikael.IsReady() && Player.Instance.HasCCs() && Mikael.IsOwned()) { var allyMikael = EntityManager.Heroes.Allies.FirstOrDefault(a => a.InDanger(Settings.AllyHPMikaelHeal)); if (allyMikael != null) { Mikael.Cast(allyMikael); Activator.lastUsed = Environment.TickCount + 500; } } if (Solari.IsReady() && Solari.IsOwned()) { var allySolari = EntityManager.Heroes.Allies.FirstOrDefault(a => a.InDanger(Settings.AllyHealthSolari)); if (allySolari != null) { Solari.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } } if (Ohm.IsReady() && Ohm.IsOwned()) { var turret = EntityManager.Turrets.Enemies.FirstOrDefault(t => t.IsAttackingPlayer); var allyFace = EntityManager.Heroes.Allies.FirstOrDefault(a => a.InDanger(Settings.OhmHealth)); if (allyFace != null && turret != null) { Ohm.Cast(turret); Activator.lastUsed = Environment.TickCount + 500; } } //CC if (DerbishBlade.IsReady() && DerbishBlade.IsOwned() && Settings.DerbishBlade && Player.Instance.HasCCs()) { Core.DelayAction(() => DerbishBlade.Cast(), Settings.CleanseDelay); Activator.lastUsed = Environment.TickCount + 1500; } if (Mercurial.IsReady() && Mercurial.IsOwned() && Settings.Mercurial && Player.Instance.HasCCs()) { Core.DelayAction(() => Mercurial.Cast(), Settings.CleanseDelay); Activator.lastUsed = Environment.TickCount + 1500; } if (QuickSilver.IsReady() && QuickSilver.IsOwned() && Settings.QuickSilver && Player.Instance.HasCCs()) { Core.DelayAction(() => QuickSilver.Cast(), Settings.CleanseDelay); Activator.lastUsed = Environment.TickCount + 1500; } var ally = EntityManager.Heroes.Allies.FirstOrDefault(a => a.IsValidTarget(Mikael.Range)); if (ally == null) { return; } if (!ally.HasCCs()) { return; } if (Mikael.IsReady() && Mikael.IsOwned() && Settings.MikaelCleanse) { Core.DelayAction(() => Mikael.Cast(ally), Settings.CleanseDelay); Activator.lastUsed = Environment.TickCount + 1500; } #endregion Self }
protected override void Volatile_ProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsEnemy) { return; } if (!Solari.IsReady() && !FaceOfTheMountain.IsReady() && !Seraph.IsReady() && !Zhonya.IsReady() && !CanUse(_barrier) && !CanUse(_heal) && !CanUse(_exhaust)) { return; } if (sender.Distance(Player.Position) > 1600) { return; } foreach ( var ally in EntityManager.Heroes.Allies.Where( ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 51 && Player.Distance(ally.ServerPosition) < 700)) { double dmg = 0; if (args.Target != null && args.Target.NetworkId == ally.NetworkId) { dmg = dmg + ((AIHeroClient)sender).GetSpellDamage(ally, args.Slot); } else { var castArea = ally.Distance(args.End) * (args.End - ally.ServerPosition).Normalized() + ally.ServerPosition; if (castArea.Distance(ally.ServerPosition) < ally.BoundingRadius / 2) { dmg = dmg + ((AIHeroClient)sender).GetSpellDamage(ally, args.Slot); } else { continue; } } if (CanUse(_exhaust) && SummonersMenu["exhaust"].Cast <CheckBox>().CurrentValue) { if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 40) { TryCast(() => Player.Spellbook.CastSpell(_exhaust, sender)); } } if (CanUse(_heal) && SummonersMenu["heal"].Cast <CheckBox>().CurrentValue) { if (SummonersMenu["healteam"].Cast <CheckBox>().CurrentValue&& !ally.IsMe) { return; } if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 10) { TryCast(() => Player.Spellbook.CastSpell(_heal, ally)); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => Player.Spellbook.CastSpell(_heal, ally)); } } if (DefensivesMenu["lotis"].Cast <CheckBox>().CurrentValue&& Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range) { var value = 75 + (15 * Player.Level); if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } if (DefensivesMenu["fotm"].Cast <CheckBox>().CurrentValue&& FaceOfTheMountain.IsReady() && Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range) { var value = 0.1 * Player.MaxHealth; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => FaceOfTheMountain.Cast(ally)); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { TryCast(() => FaceOfTheMountain.Cast(ally)); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => FaceOfTheMountain.Cast(ally)); } } if (!ally.IsMe) { continue; } if (CanUse(_barrier) && SummonersMenu["barrier"].Cast <CheckBox>().CurrentValue) { var value = 95 + Player.Level * 20; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => Player.Spellbook.CastSpell(_barrier, Player)); } else if (Player.Health - dmg < Player.CountEnemiesInRange(700) * Player.Level * 15) { TryCast(() => Player.Spellbook.CastSpell(_barrier, Player)); } else if (ally.Health - dmg < ally.Level * 15) { TryCast(() => Seraph.Cast()); } } if (Seraph.IsReady() && DefensivesMenu["se"].Cast <CheckBox>().CurrentValue) { var value = Player.Mana * 0.2 + 150; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => Seraph.Cast()); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { TryCast(() => Seraph.Cast()); } else if (ally.Health - dmg < ally.Level * 15) { TryCast(() => Seraph.Cast()); } } if (Zhonya.IsReady() && DefensivesMenu["zh"].Cast <CheckBox>().CurrentValue) { if (dmg > Player.Level * 30) { TryCast(() => Zhonya.Cast()); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { TryCast(() => Zhonya.Cast()); } else if (ally.Health - dmg < ally.Level * 15) { TryCast(() => Zhonya.Cast()); } } } }
private void Survival() { if (Player.HealthPercent < 60 && (Seraph.IsReady() || Zhonya.IsReady())) { double dmg = OktwCommon.GetIncomingDamage(Player, 1); var enemys = Player.CountEnemiesInRange(800); if (dmg > 0 || enemys > 0) { if (Seraph.IsReady() && MainMenu.Item("Seraph").GetValue <bool>()) { var value = Player.Mana * 0.2 + 150; if (dmg > value && Player.HealthPercent < 50) { Seraph.Cast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Seraph.Cast(); } else if (Player.Health - dmg < Player.Level * 10) { Seraph.Cast(); } } if (Zhonya.IsReady() && MainMenu.Item("Zhonya").GetValue <bool>()) { if (dmg > Player.Level * 35) { ZhonyaTryCast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { ZhonyaTryCast(); } else if (Player.Health - dmg < Player.Level * 10) { ZhonyaTryCast(); } } } } if (!Solari.IsReady() && !FaceOfTheMountain.IsReady()) { return; } foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 50 && Player.Distance(ally.ServerPosition) < 700)) { double dmg = OktwCommon.GetIncomingDamage(ally); if (dmg == 0) { continue; } if (MainMenu.Item("Solari").GetValue <bool>() && Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range) { var value = 75 + (15 * Player.Level); if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } if (MainMenu.Item("FaceOfTheMountain").GetValue <bool>() && FaceOfTheMountain.IsReady() && Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range) { var value = 0.1 * Player.MaxHealth; if (dmg > value && Player.HealthPercent < 50) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < ally.Level * 10) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < ally.Level * 10) { FaceOfTheMountain.Cast(ally); } } } }
private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsEnemy) { return; } if (!Solari.IsReady() && !FaceOfTheMountain.IsReady() && !Seraph.IsReady() && !Zhonya.IsReady() && !CanUse(barrier) && !CanUse(heal) && !CanUse(exhaust)) { return; } if (sender.Distance(Player.Position) > 1600) { return; } foreach (var ally in Program.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 51 && Player.Distance(ally.ServerPosition) < 700)) { double dmg = 0; if (args.Target != null && args.Target.NetworkId == ally.NetworkId) { dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name); } else { var castArea = ally.Distance(args.End) * (args.End - ally.ServerPosition).Normalized() + ally.ServerPosition; if (castArea.Distance(ally.ServerPosition) < ally.BoundingRadius / 2) { dmg = dmg + sender.GetSpellDamage(ally, args.SData.Name); } else { continue; } } if (CanUse(exhaust) && Config.Item("Exhaust").GetValue <bool>()) { if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 40) { TryCast(() => Player.Spellbook.CastSpell(exhaust, sender)); } } if (CanUse(heal) && Config.Item("Heal").GetValue <bool>()) { if (!Config.Item("AllyHeal").GetValue <bool>() && !ally.IsMe) { return; } if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 10) { TryCast(() => Player.Spellbook.CastSpell(heal, ally)); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => Player.Spellbook.CastSpell(heal, ally)); } } if (Config.Item("Solari").GetValue <bool>() && Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range) { var value = 75 + (15 * Player.Level); if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } if (Config.Item("FaceOfTheMountain").GetValue <bool>() && FaceOfTheMountain.IsReady() && Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range) { var value = 0.1 * Player.MaxHealth; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => FaceOfTheMountain.Cast(ally)); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 15) { TryCast(() => FaceOfTheMountain.Cast(ally)); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => FaceOfTheMountain.Cast(ally)); } } if (!ally.IsMe) { continue; } if (CanUse(barrier) && Config.Item("Barrier").GetValue <bool>()) { var value = 95 + Player.Level * 20; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => Player.Spellbook.CastSpell(barrier, Player)); } else if (Player.Health - dmg < Player.CountEnemiesInRange(700) * Player.Level * 15) { TryCast(() => Player.Spellbook.CastSpell(barrier, Player)); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => Seraph.Cast()); } } if (Seraph.IsReady() && Config.Item("Seraph").GetValue <bool>()) { var value = Player.Mana * 0.2 + 150; if (dmg > value && Player.HealthPercent < 50) { TryCast(() => Seraph.Cast()); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 10) { TryCast(() => Seraph.Cast()); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => Seraph.Cast()); } } if (Zhonya.IsReady() && Config.Item("Zhonya").GetValue <bool>()) { if (dmg > Player.Level * 30) { TryCast(() => Zhonya.Cast()); } else if (ally.Health - dmg < ally.CountEnemiesInRange(700) * ally.Level * 10) { TryCast(() => Zhonya.Cast()); } else if (ally.Health - dmg < ally.Level * 10) { TryCast(() => Zhonya.Cast()); } } } }
public static void Execute() { var target = EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && e.IsInRange(Player.Instance, 1500)); if (Player.Instance.IsInShopRange() || target == null || DamageHandler.LastItemCast > Environment.TickCount) { return; } #region Self if (Zhonyas.IsReady() && Player.Instance.InDanger() && Zhonyas.IsOwned()) { Zhonyas.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (ArchengelStaff.IsReady() && Player.Instance.InDanger() && ArchengelStaff.IsOwned()) { ArchengelStaff.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (FaceOfTheMountain.IsReady() && Player.Instance.InDanger() && FaceOfTheMountain.IsOwned()) { FaceOfTheMountain.Cast(Player.Instance); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (Talisman.IsReady() && Player.Instance.CountAlliesInRange(450) >= 2 || Player.Instance.InDanger() && FaceOfTheMountain.IsOwned()) { FaceOfTheMountain.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (Mikael.IsReady() && Player.Instance.InDanger() || Player.Instance.HasCC() && Mikael.IsOwned()) { Mikael.Cast(Player.Instance); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (Solari.IsReady() && Player.Instance.InDanger() && Solari.IsOwned()) { Solari.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (Ohm.IsReady() && Ohm.IsOwned()) { var turret = EntityManager.Turrets.Enemies.FirstOrDefault(t => t.IsAttackingPlayer); if (turret != null) { Ohm.Cast(turret); DamageHandler.LastItemCast = Environment.TickCount + 450; } } if (Randuin.IsReady() && Player.Instance.CountEnemiesInRange(Randuin.Range) >= 2 && Randuin.IsOwned()) { Randuin.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } //CC if (!Player.Instance.HasCC()) { return; } if (DerbishBlade.IsReady() && DerbishBlade.IsOwned()) { DerbishBlade.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (Mercurial.IsReady() && Mercurial.IsOwned()) { Mercurial.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } if (QuickSilver.IsReady() && QuickSilver.IsOwned()) { QuickSilver.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } #endregion Self #region Ally if (DamageHandler.LastItemCast < Environment.TickCount) { if (FaceOfTheMountain.IsReady() && FaceOfTheMountain.IsOwned()) { foreach ( var ally in EntityManager.Heroes.Allies.Where( a => DamageHandler.Damages.ContainsKey(a.NetworkId) && a.InDanger())) { FaceOfTheMountain.Cast(ally); DamageHandler.LastItemCast = Environment.TickCount + 450; } } } if (Talisman.IsReady() && Player.Instance.CountAlliesInRange(450) >= 2 || Player.Instance.InDanger() && FaceOfTheMountain.IsOwned()) { foreach ( var ally in EntityManager.Heroes.Allies.Where( a => DamageHandler.Damages.ContainsKey(a.NetworkId) && a.InDanger())) { FaceOfTheMountain.Cast(ally); DamageHandler.LastItemCast = Environment.TickCount + 450; } } if (Mikael.IsReady() && Player.Instance.InDanger() || Player.Instance.HasCC() && Mikael.IsOwned()) { foreach ( var ally in EntityManager.Heroes.Allies.Where( a => DamageHandler.Damages.ContainsKey(a.NetworkId) && a.InDanger())) { Mikael.Cast(ally); DamageHandler.LastItemCast = Environment.TickCount + 450; } } if (Solari.IsReady() && Player.Instance.InDanger() && Solari.IsOwned()) { foreach ( var ally in EntityManager.Heroes.Allies.Where( a => DamageHandler.Damages.ContainsKey(a.NetworkId) && a.InDanger())) { Solari.Cast(ally); DamageHandler.LastItemCast = Environment.TickCount + 450; } } if (Ohm.IsReady() && Ohm.IsOwned()) { foreach (var objAiTurret in EntityManager.Turrets.AllTurrets) { if (DamageHandler.LastTargetTurrets.ContainsKey(objAiTurret.NetworkId)) { var turrettarget = DamageHandler.LastTargetTurrets[objAiTurret.NetworkId]; if (!turrettarget.IsValidTarget() || !turrettarget.IsAlly) { continue; } Ohm.Cast(); DamageHandler.LastItemCast = Environment.TickCount + 450; } } } }
private void Survival() { if (Redemption.IsReady() && Config.Item("Redemption").GetValue <bool>()) { var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(5000) && x.Position.CountAlliesInRange(600) > 0); if (target != null) { var ally = HeroManager.Allies.FirstOrDefault(x => x.IsValid && !x.IsDead && x.Position.Distance(target.Position) < 400); if (ally != null && ally.Health - OktwCommon.GetIncomingDamage(ally) < ally.MaxHealth * 0.5) { if (target.CountAlliesInRange(600) > 1 || ally.CountEnemiesInRange(600) > 1) { var predInput = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = float.MaxValue, Delay = 0.5f, Range = 5500, From = Player.ServerPosition, Radius = 500, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var pos = SebbyLib.Prediction.Prediction.GetPrediction(predInput); Redemption.Cast(pos.CastPosition); } } } } if (Player.HealthPercent < 60 && (Seraph.IsReady() || Zhonya.IsReady() || CanUse(barrier))) { double dmg = OktwCommon.GetIncomingDamage(Player); var enemys = Player.CountEnemiesInRange(800); if (dmg > 0 || enemys > 0) { if (CanUse(barrier) && Config.Item("Barrier").GetValue <bool>()) { var value = 95 + Player.Level * 20; if (dmg > value && Player.HealthPercent < 50) { ObjectManager.Player.Spellbook.CastSpell(barrier, Player); } else if (Player.Health - dmg < enemys * Player.Level * 20) { ObjectManager.Player.Spellbook.CastSpell(barrier, Player); } else if (Player.Health - dmg < Player.Level * 10) { ObjectManager.Player.Spellbook.CastSpell(barrier, Player); } } if (Seraph.IsReady() && Config.Item("Seraph").GetValue <bool>()) { var value = Player.Mana * 0.2 + 150; if (dmg > value && Player.HealthPercent < 50) { Seraph.Cast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { Seraph.Cast(); } else if (Player.Health - dmg < Player.Level * 10) { Seraph.Cast(); } } if (Zhonya.IsReady() && Config.Item("Zhonya").GetValue <bool>()) { if (dmg > Player.Level * 35) { ZhonyaTryCast(); } else if (Player.Health - dmg < enemys * Player.Level * 20) { ZhonyaTryCast(); } else if (Player.Health - dmg < Player.Level * 10) { ZhonyaTryCast(); } } } } if (!Solari.IsReady() && !FaceOfTheMountain.IsReady() && !CanUse(heal)) { return; } foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && ally.HealthPercent < 50 && Player.Distance(ally.ServerPosition) < 700)) { double dmg = OktwCommon.GetIncomingDamage(ally); if (dmg == 0) { continue; } if (CanUse(heal) && Config.Item("Heal").GetValue <bool>()) { if (!Config.Item("AllyHeal").GetValue <bool>() && !ally.IsMe) { return; } if (ally.Health - dmg < ally.Level * 10) { ObjectManager.Player.Spellbook.CastSpell(heal, ally); } else if (ally.Health - dmg < ally.Level * 10) { ObjectManager.Player.Spellbook.CastSpell(heal, ally); } } if (Config.Item("Solari").GetValue <bool>() && Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range) { var value = 75 + (15 * Player.Level); if (dmg > value && Player.HealthPercent < 50) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } else if (ally.Health - dmg < ally.Level * 10) { Solari.Cast(); } } if (Config.Item("FaceOfTheMountain").GetValue <bool>() && FaceOfTheMountain.IsReady() && Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range) { var value = 0.1 * Player.MaxHealth; if (dmg > value && Player.HealthPercent < 50) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < ally.Level * 10) { FaceOfTheMountain.Cast(ally); } else if (ally.Health - dmg < ally.Level * 10) { FaceOfTheMountain.Cast(ally); } } } }
public static void Execute() { if (Player.Instance.IsInShopRange() || Player.Instance.CountAlliesInRange(Misc.RangeEnemy) < Misc.EnemyCount || Activator.lastUsed >= Environment.TickCount) { return; } #region Self if (Zhonyas.IsReady() && Zhonyas.IsOwned() && Player.Instance.InDanger(Settings.ZhonyasMyHp) && Settings.Zhonyas) { Zhonyas.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (ArchengelStaff.IsReady() && ArchengelStaff.IsOwned() && Player.Instance.InDanger(Settings.MYHPArchengelStaff) && Settings.UseArchengelStaff) { ArchengelStaff.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (FaceOfTheMountain.IsReady() && FaceOfTheMountain.IsOwned() && Player.Instance.InDanger(30)) { FaceOfTheMountain.Cast(Player.Instance); Activator.lastUsed = Environment.TickCount + 1500; } if (Talisman.IsReady() && Player.Instance.CountAlliesInRange(450) >= 2 && Talisman.IsOwned() && Player.Instance.InDanger(30)) { Talisman.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Mikael.IsReady() && Player.Instance.HasCC() && Mikael.IsOwned() && Player.Instance.InDanger(30)) { Mikael.Cast(Player.Instance); Activator.lastUsed = Environment.TickCount + 1500; } if (Solari.IsReady() && Solari.IsOwned() && Player.Instance.InDanger(30)) { Solari.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Ohm.IsReady() && Ohm.IsOwned() && Player.Instance.InDanger(30)) { var turret = EntityManager.Turrets.Enemies.FirstOrDefault(t => t.IsAttackingPlayer); if (turret != null) { Ohm.Cast(turret); Activator.lastUsed = Environment.TickCount + 1500; } } if (Randuin.IsReady() && Player.Instance.CountEnemiesInRange(Randuin.Range) >= 2 && Randuin.IsOwned() && Player.Instance.InDanger(30)) { Randuin.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } //CC if (!Player.Instance.HasCC()) { return; } if (DerbishBlade.IsReady() && DerbishBlade.IsOwned()) { DerbishBlade.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (Mercurial.IsReady() && Mercurial.IsOwned()) { Mercurial.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } if (QuickSilver.IsReady() && QuickSilver.IsOwned()) { QuickSilver.Cast(); Activator.lastUsed = Environment.TickCount + 1500; } #endregion Self }
public static void Defensive() { //Zhonyas if (ActiveMenu["Zhonyas"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if ((Player.Instance.CountEnemiesInRange(700) >= 1) && Zhonyas.IsOwned() && Zhonyas.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.ZyHp"].Cast <Slider>().CurrentValue) { Zhonyas.Cast(); } } } //Seraph if (ActiveMenu["Seraph"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if ((Player.Instance.CountEnemiesInRange(650) >= 1) && Seraph.IsOwned() && Seraph.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.SeraphHp"].Cast <Slider>().CurrentValue) { Seraph.Cast(); } } } //Solari if (ActiveMenu["Solari"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if ((Player.Instance.CountEnemiesInRange(600) >= 1) && Solari.IsOwned() && Solari.IsReady()) { if (Player.Instance.HealthPercent <= ActiveMenu["Item.SolariHp"].Cast <Slider>().CurrentValue) { Solari.Cast(); } } } //Face var Ally = EntityManager.Heroes.Allies.Where( a => a.HealthPercent <= ActiveMenu["Item.FaceHP"].Cast <Slider>().CurrentValue) .FirstOrDefault(a => a.IsValidTarget(Face.Range)); if (ActiveMenu["Face"].Cast <CheckBox>().CurrentValue) { if (Player.Instance.IsDead) { return; } if (Face.IsOwned() && Face.IsReady() && Ally.IsValid) { Face.Cast(Ally); } } }