/// <summary> /// Called when the game updates /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void OnUpdate(EventArgs args) { try { if (Player.IsDead) { return; } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { OnCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { OnHarass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { OnLaneclear(); } if (getCheckBoxItem(comboMenu, "ElZilean.Ignite")) { HandleIgnite(); } if (getKeyBindItem(fleeMenu, "ElZilean.Flee.Key")) { OnFlee(); } foreach (var ally in HeroManager.Allies) { if (!getCheckBoxItem(ultMenu, $"R{ally.ChampionName}") || ally.LSIsRecalling() || ally.IsInvulnerable) { return; } var enemies = ally.LSCountEnemiesInRange(750f); var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f; if (ally.HealthPercent <= getSliderItem(ultMenu, "min-health") && !ally.IsDead && enemies >= 1) { if ((int)(totalDamage / ally.Health) > getSliderItem(ultMenu, "min-damage") || ally.HealthPercent < getSliderItem(ultMenu, "min-health")) { R.Cast(ally); } } } } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Fired when the game loads. /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> public static void OnGameLoad() { try { if (!Player.IsChampion("Zilean")) { return; } var igniteSlot = Player.GetSpellSlot("summonerdot"); if (igniteSlot != SpellSlot.Unknown) { IgniteSpell = new Spell(igniteSlot, 600f); } foreach (var ally in HeroManager.Allies) { IncomingDamageManager.AddChampion(ally); } IncomingDamageManager.Skillshots = true; Q = new Spell(SpellSlot.Q, 900f - 100f); W = new Spell(SpellSlot.W, Orbwalking.GetRealAutoAttackRange(Player)); E = new Spell(SpellSlot.E, 700f); R = new Spell(SpellSlot.R, 900f); Q.SetSkillshot(0.7f, 140f - 25f, int.MaxValue, false, SkillshotType.SkillshotCircle); GenerateMenu(); Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; Interrupter2.OnInterruptableTarget += OnInterruptableTarget; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Obj_AI_Base.OnSpellCast += OnProcessSpellCast; Obj_AI_Base.OnBasicAttack += OnProcessSpellCast; Orbwalking.BeforeAttack += BeforeAttack; } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Fired when the game loads. /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> public static void OnGameLoad() { try { if (Player.ChampionName != "Zilean") { return; } var igniteSlot = Player.GetSpellSlot("summonerdot"); if (igniteSlot != SpellSlot.Unknown) { IgniteSpell = new Spell(igniteSlot, 600f); } foreach (var ally in HeroManager.Allies) { IncomingDamageManager.AddChampion(ally); } IncomingDamageManager.Skillshots = true; Q = new EloBuddy.SDK.Spell.Skillshot(SpellSlot.Q, 900 + 100, EloBuddy.SDK.Enumerations.SkillShotType.Circular, 300, 2000, 100); W = new Spell(SpellSlot.W, Player.GetAutoAttackRange(Player)); E = new Spell(SpellSlot.E, 700f); R = new Spell(SpellSlot.R, 900f); GenerateMenu(); Game.OnUpdate += OnUpdate; Drawing.OnDraw += OnDraw; Interrupter2.OnInterruptableTarget += OnInterruptableTarget; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Orbwalker.OnPreAttack += BeforeAttack; } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Fired when the game loads. /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> public static void OnGameLoad() { try { if (Player.ChampionName != "Zilean") { return; } var igniteSlot = Player.GetSpellSlot("summonerdot"); if (igniteSlot != SpellSlot.Unknown) { IgniteSpell = new Spell(igniteSlot, 600f); } foreach (var ally in HeroManager.Allies) { IncomingDamageManager.AddChampion(ally); Console.WriteLine(@"[ELZILEAN] loaded champions: {0}", ally.ChampionName); } IncomingDamageManager.RemoveDelay = 500; IncomingDamageManager.Skillshots = true; Q = new Spell(SpellSlot.Q, 900f); W = new Spell(SpellSlot.W, Player.GetAutoAttackRange(Player)); E = new Spell(SpellSlot.E, 700f); R = new Spell(SpellSlot.R, 900f); Q.SetSkillshot(0.7f, 140f, int.MaxValue, false, SkillshotType.SkillshotCircle); GenerateMenu(); Game.OnUpdate += OnUpdate; } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Called when the game updates /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void OnUpdate(EventArgs args) { try { if (Player.IsDead) { return; } if (getCheckBoxItem(comboMenu, "ElZilean.Combo.Focus.Bomb")) { var passiveTarget = HeroManager.Enemies.FirstOrDefault(x => x.LSIsValidTarget() && x.HasBuff("ZileanQEnemyBomb") && x.LSIsValidTarget(Q.Range + 100)); if (passiveTarget != null) { Orbwalker.ForcedTarget = passiveTarget; } else { Orbwalker.ForcedTarget = null; } } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { OnCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { OnHarass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { OnLaneclear(); } if (getCheckBoxItem(comboMenu, "ElZilean.Ignite")) { HandleIgnite(); } if (getKeyBindItem(comboMenu, "ElZilean.DoubleBombMouse")) { MouseCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { OnFlee(); } if (getCheckBoxItem(miscMenu, "ElZilean.E.Slow")) { foreach (var slowedAlly in HeroManager.Allies.Where(x => x.HasBuffOfType(BuffType.Slow) && x.LSIsValidTarget(Q.Range, false)) ) { if (E.IsReady() && E.IsInRange(slowedAlly)) { E.CastOnUnit(slowedAlly); } } } if (getCheckBoxItem(miscMenu, "ElZilean.Q.Stun")) { var target = HeroManager.Enemies.FirstOrDefault( h => h.LSIsValidTarget(Q.Range) && h.HasBuffOfType(BuffType.Slow) || h.HasBuffOfType(BuffType.Knockup) || h.HasBuffOfType(BuffType.Charm) || h.HasBuffOfType(BuffType.Stun)); if (target != null) { if (Q.IsReady() && target.LSIsValidTarget(Q.Range)) { var prediction = Q.GetPrediction(target); if (prediction.Hitchance >= HitChance.VeryHigh) { Q.Cast(prediction.CastPosition); } } LeagueSharp.Common.Utility.DelayAction.Add(100, () => W.Cast()); } } foreach (var ally in HeroManager.Allies.Where(a => a.LSIsValidTarget(R.Range, false))) { if (!getCheckBoxItem(ultMenu, $"R{ally.ChampionName}") || ally.IsRecalling() || ally.IsInvulnerable || !ally.LSIsValidTarget(R.Range, false)) { return; } var enemies = ally.LSCountEnemiesInRange(750f); var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f; if (ally.HealthPercent <= getSliderItem(ultMenu, "min-health") && !ally.IsDead && enemies >= 1 && ally.LSIsValidTarget(R.Range, false)) { if ((int)(totalDamage / ally.Health) > getSliderItem(ultMenu, "min-damage") || ally.HealthPercent < getSliderItem(ultMenu, "min-health")) { if (ally.Buffs.Any(b => b.DisplayName == "judicatorintervention" || b.DisplayName == "undyingrage" || b.DisplayName == "kindredrnodeathbuff" || b.DisplayName == "zhonyasringshield" || b.DisplayName == "willrevive")) { return; } R.Cast(ally); } } } } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Called when the game updates /// </summary> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private static void OnUpdate(EventArgs args) { try { if (Player.IsDead) { return; } switch (Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: OnCombo(); break; case Orbwalking.OrbwalkingMode.Mixed: OnHarass(); break; case Orbwalking.OrbwalkingMode.LaneClear: OnLaneclear(); break; } if (Menu.Item("Q.Automatically").GetValue <StringList>().SelectedIndex == 1 || (Menu.Item("Q.Automatically").GetValue <StringList>().SelectedIndex == 2 && ComboModeActive)) { if (Menu.Item("Prediction.type").GetValue <StringList>().SelectedIndex == 1) { var target = Q.GetTarget(); var pred = CPrediction.Circle(Q, target, HitChance.VeryHigh, true); if (pred.TotalHits >= 2 && Q.IsReady()) { Q.Cast(pred.CastPosition); LeagueSharp.Common.Utility.DelayAction.Add(600, () => W.Cast()); } } else if (Menu.Item("Prediction.type").GetValue <StringList>().SelectedIndex == 2) { var target = Q.GetTarget(); var predictionInput = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = false, Speed = int.MaxValue, Delay = 0.7f, Range = 900f - 100f, From = Player.ServerPosition, Radius = 140f - 25f, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var predictionOutput = SebbyLib.Prediction.Prediction.GetPrediction(predictionInput); if (predictionOutput.Hitchance == (SebbyLib.Prediction.HitChance)(6) && predictionOutput.AoeTargetsHitCount >= 2) { Q.Cast(predictionOutput.CastPosition); LeagueSharp.Common.Utility.DelayAction.Add(600, () => W.Cast()); } } else { var target = Q.GetTarget(); var pred = Q.GetPrediction(target); if (pred.AoeTargetsHitCount >= 2 && Q.IsReady()) { Q.Cast(pred.CastPosition); LeagueSharp.Common.Utility.DelayAction.Add(600, () => W.Cast()); } } } if (IsActive("ElZilean.Combo.Focus.Bomb")) { var passiveTarget = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget() && x.HasBuff("ZileanQEnemyBomb")); if (passiveTarget != null) { if (passiveTarget.IsValidTarget(Q.Range + 100)) { TargetSelector.SetTarget(passiveTarget); Orbwalker.ForceTarget(passiveTarget); } } } if (IsActive("ElZilean.Ignite")) { HandleIgnite(); } if (Menu.Item("ElZilean.DoubleBombMouse").GetValue <KeyBind>().Active) { MouseCombo(); } if (Menu.Item("ElZilean.Flee.Key").GetValue <KeyBind>().Active) { OnFlee(); } if (IsActive("ElZilean.E.Slow")) { foreach (var slowedAlly in HeroManager.Allies.Where(x => x.HasBuffOfType(BuffType.Slow) && x.IsValidTarget(Q.Range, false)) ) { if (E.IsReady() && E.IsInRange(slowedAlly)) { E.CastOnUnit(slowedAlly); } } } if (IsActive("ElZilean.Q.Stun")) { var target = HeroManager.Enemies.FirstOrDefault( h => h.IsValidTarget(Q.Range) && h.HasBuffOfType(BuffType.Slow) || h.HasBuffOfType(BuffType.Knockup) || h.HasBuffOfType(BuffType.Charm) || h.HasBuffOfType(BuffType.Stun)); if (target != null) { if (Q.IsReady() && target.IsValidTarget(Q.Range)) { QCast(target); LeagueSharp.Common.Utility.DelayAction.Add(100, () => W.Cast()); } } } foreach (var ally in HeroManager.Allies.Where(a => a.IsValidTarget(R.Range, false))) { if (!Menu.Item($"R{ally.ChampionName}").IsActive() || ally.IsRecalling() || ally.IsInvulnerable || !ally.IsValidTarget(R.Range, false)) { return; } var enemies = ally.CountEnemiesInRange(750f); var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f; if (ally.HealthPercent <= Menu.Item("min-health").GetValue <Slider>().Value&& !ally.IsDead && enemies >= 1 && ally.IsValidTarget(R.Range, false)) { if ((int)(totalDamage / ally.Health) > Menu.Item("min-damage").GetValue <Slider>().Value || ally.HealthPercent < Menu.Item("min-health").GetValue <Slider>().Value) { if (ally.Buffs.Any(b => b.DisplayName == "judicatorintervention" || b.DisplayName == "undyingrage" || b.DisplayName == "kindredrnodeathbuff" || b.DisplayName == "zhonyasringshield" || b.DisplayName == "willrevive")) { return; } R.Cast(ally); } } } } catch (Exception exception) { Console.WriteLine(exception); } }