private static void AutoW() { if (MenuInit.IsActive("ElVeigar.Combo.W.Stun")) { var target = ObjectManager.Get <Obj_AI_Hero>() .FirstOrDefault( h => h.IsValidTarget(spells[Spells.W].Range) && h.GetStunDuration() >= spells[Spells.W].Delay); if (target.IsValidTarget() && target != null) { spells[Spells.W].Cast(target.Position); } } }
private static void KillstealHandler() { if (MenuInit.IsActive("ElVeigar.Combo.KS.R")) { var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(spells[Spells.R].Range) && spells[Spells.R].GetDamage(x) > x.Health); if (target != null) { var getEnemies = MenuInit.Menu.Item("ElVeigar.KS.R.On" + target.CharData.BaseSkinName); if (getEnemies != null && getEnemies.GetValue <bool>()) { spells[Spells.R].CastOnUnit(target); } } } if (MenuInit.IsActive("ElVeigar.Combo.KS.Q")) { var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(spells[Spells.Q].Range) && spells[Spells.Q].GetDamage(x) > x.Health); if (target != null) { var predictionQ = spells[Spells.Q].GetPrediction(target); if (predictionQ.Hitchance >= HitChance.High && predictionQ.CollisionObjects.Count == 0) { spells[Spells.Q].Cast(predictionQ.CastPosition); } } } if (MenuInit.IsActive("ElVeigar.Combo.KS.W")) { var target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(spells[Spells.W].Range) && spells[Spells.W].GetDamage(x) > x.Health); var predictionW = spells[Spells.W].GetPrediction(target); if (target != null) { if (predictionW.Hitchance >= HitChance.High) { spells[Spells.W].Cast(predictionW.CastPosition); } } } }
private static void Interrupter_OnPosibleToInterrupt( Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs spell) { if (!MenuInit.IsActive("Misc.Interrupt")) { return; } if (Player.Distance(unit.Position) < spells[Spells.E].Range && spells[Spells.E].IsReady()) { if (!IsInvulnerable(unit)) { CastE(unit); } } }
private static void DoJungleClear() { try { if (Player.ManaPercent < MenuInit.Menu.Item("ElVeigar.JungleClear.Mana").GetValue <Slider>().Value) { return; } var jungleWMinions = MinionManager.GetMinions( Player.Position, spells[Spells.W].Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); var minionerinos2 = (from minions in jungleWMinions select minions.Position.To2D()).ToList(); var minionPosition = MinionManager.GetBestCircularFarmLocation( minionerinos2, spells[Spells.W].Width, spells[Spells.W].Range).Position; if (minionPosition.Distance(Player.Position.To2D()) < spells[Spells.W].Range && MinionManager.GetBestCircularFarmLocation( minionerinos2, spells[Spells.W].Width, spells[Spells.W].Range).MinionsHit > 0) { spells[Spells.W].Cast(minionPosition); } if (MenuInit.IsActive("ElVeigar.jungleclearMenu.Q")) { if (!Player.IsWindingUp) { spells[Spells.Q].Cast(minionPosition); } } } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }
private static void OnDraw(EventArgs args) { if (MenuInit.IsActive("Misc.Drawings.Off")) { return; } if (MenuInit.Menu.Item("Misc.Drawings.Q").GetValue <Circle>().Active) { if (spells[Spells.Q].Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[Spells.Q].Range, Color.White); } } if (MenuInit.Menu.Item("Misc.Drawings.W").GetValue <Circle>().Active) { if (spells[Spells.W].Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[Spells.W].Range, Color.White); } } if (MenuInit.Menu.Item("Misc.Drawings.E").GetValue <Circle>().Active) { if (spells[Spells.E].Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[Spells.E].Range, Color.White); } } if (MenuInit.Menu.Item("Misc.Drawings.R").GetValue <Circle>().Active) { if (spells[Spells.R].Level > 0) { Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[Spells.R].Range, Color.White); } } }
private static void DoHarass() { try { var target = TargetSelector.GetTarget(spells[Spells.E].Range, TargetSelector.DamageType.Magical); if (target == null || !target.IsValidTarget()) { return; } if (Player.ManaPercent < MenuInit.Menu.Item("ElVeigar.Harass.Mana").GetValue <Slider>().Value) { return; } switch (MenuInit.IsListActive("Harass.Mode").SelectedIndex) { case 0: // E - Q - W if (spells[Spells.E].IsReady() && Player.Distance(target.Position) <= spells[Spells.E].Range) { var predE = spells[Spells.E].GetPrediction(target); if (predE.Hitchance == HitChance.VeryHigh) { if (!IsInvulnerable(target)) { CastE(target); } } } if (spells[Spells.Q].IsReady() && spells[Spells.Q].IsInRange(target)) { var prediction = spells[Spells.Q].GetPrediction(target); if (prediction.Hitchance >= HitChance.High && prediction.CollisionObjects.Count == 0) { spells[Spells.Q].Cast(prediction.CastPosition); } } break; case 1: //E - W if (spells[Spells.E].IsReady() && Player.Distance(target.Position) <= spells[Spells.E].Range) { var predE = spells[Spells.E].GetPrediction(target); if (predE.Hitchance == HitChance.VeryHigh) { if (!IsInvulnerable(target)) { CastE(target); } } } break; case 2: // Q if (spells[Spells.Q].IsReady() && spells[Spells.Q].IsInRange(target)) { var predictionQ = spells[Spells.Q].GetPrediction(target); if (predictionQ.Hitchance >= HitChance.High && predictionQ.CollisionObjects.Count == 0) { spells[Spells.Q].Cast(predictionQ.CastPosition); } } break; } } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }
private static void DoCombo() { var target = TargetSelector.GetTarget(spells[Spells.E].Range + 200, TargetSelector.DamageType.Magical); if (!target.IsValidTarget()) { return; } if (spells[Spells.R].IsReady() && target.IsValidTarget(spells[Spells.R].Range) && MenuInit.IsActive("ElVeigar.Combo.R")) { if (spells[Spells.R].GetDamage(target) > target.Health) { if (!IsInvulnerable(target)) { spells[Spells.R].CastOnUnit(target); } } } if (spells[Spells.E].IsReady() && MenuInit.IsActive("ElVeigar.Combo.E")) { if (Player.Distance(target.Position) <= spells[Spells.E].Range + 200) { var predE = spells[Spells.E].GetPrediction(target); if (predE.Hitchance == HitChance.VeryHigh) { if (!IsInvulnerable(target)) { CastE(target); } } } } if (spells[Spells.Q].IsReady() && spells[Spells.Q].IsInRange(target) && MenuInit.IsActive("ElVeigar.Combo.Q")) { var pred = spells[Spells.Q].GetPrediction(target); if (pred.Hitchance >= HitChance.VeryHigh && pred.CollisionObjects.Count == 0) { spells[Spells.Q].Cast(pred.CastPosition); } } var predictionW = spells[Spells.W].GetPrediction(target); if (spells[Spells.W].IsReady() && Player.Distance(target.Position) <= spells[Spells.W].Range - 80f && MenuInit.IsActive("ElVeigar.Combo.W")) { if (predictionW.Hitchance >= HitChance.VeryHigh) { spells[Spells.W].Cast(predictionW.CastPosition); } } if (MenuInit.IsActive("ElVeigar.Combo.Use.Ignite") && Player.Distance(target) <= 600 && IgniteDamage(target) >= target.Health) { Player.Spellbook.CastSpell(Ignite, target); } }