private static void ByJungle() { var Monsters = EntityManager.MinionsAndMonsters.GetJungleMonsters(Kayn.Position, 1800f); var mana = Jungle["jmana"].Cast <Slider>().CurrentValue; if (Kayn.ManaPercent < mana) { return; } var WPred = EntityManager.MinionsAndMonsters.GetLineFarmLocation(Monsters, Wk.Width, (int)W.Range); if (Jungle["Qj"].Cast <CheckBox>().CurrentValue&& Qk.IsLearned && Qk.IsReady()) { foreach (var monster in Monsters.Where(x => !x.IsDead && x.IsValidTarget(Qk.Range) && x.Health > 100)) { Qk.Cast(monster.Position); } } if (Jungle["Wj"].Cast <CheckBox>().CurrentValue&& W.IsLearned && W.IsReady()) { if (WPred.HitNumber >= Jungle["J"].Cast <Slider>().CurrentValue) { W.Cast(WPred.CastPosition); } } }
private static void ByLane() { var minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Kayn.Position, W.Range).ToArray(); var mana = Lane["mana"].Cast <Slider>().CurrentValue; if (Kayn.ManaPercent < mana) { return; } if (minions != null) { var wpred = EntityManager.MinionsAndMonsters.GetLineFarmLocation(minions, Qk.Width, (int)W.Range); if (Lane["Ql"].Cast <CheckBox>().CurrentValue&& Qk.IsLearned && Qk.IsReady()) { foreach (var minion in minions.Where(x => x.IsValid() && !x.IsDead && x.Health > 15)) { if (Lane["Qmode"].Cast <ComboBox>().CurrentValue == 0 && Prediction.Position.PredictUnitPosition(minion, Qk.CastDelay).Distance(Kayn.Position) <= (Qk.Range - 50)) { Qk.Cast(minion.Position); } else { Qk.Cast(minion.Position); } } } if (Lane["Wl"].Cast <CheckBox>().CurrentValue&& W.IsLearned && W.IsReady()) { if (wpred.HitNumber >= Lane["Min"].Cast <Slider>().CurrentValue) { W.Cast(wpred.CastPosition); } { foreach (var minion in minions.Where(x => x.IsValid() && !x.IsDead && x.Health > 15)) { if (Lane["Wmode"].Cast <ComboBox>().CurrentValue == 0 && Prediction.Position.PredictUnitPosition(minion, W.CastDelay).Distance(Kayn.Position) <= (W.Range + 700)) { W.Cast(minion.Position); } else { W.Cast(minion.Position); } } } } } }
private static void ByCombo() { if (Player.Instance.IsKayn()) { // Q usage if (Qk.IsBackRange(Orbwalker.ActiveModes.Combo) && !Kayn.IsAboutToTransform()) { var target = Qk.GetTarget(); if (target != null) { var prediction = Qk.GetPrediction(target); switch (prediction.HitChance) { case HitChance.High: case HitChance.Immobile: // Regular Q cast if (Qk.Cast(prediction.CastPosition)) { return; } break; case HitChance.Collision: // Special case for colliding enemies var colliding = prediction.CollisionObjects.OrderBy(o => o.Distance(Kayn, true)).ToList(); if (colliding.Count > 0) { // First colliding target is < 100 units away from our main target if (colliding[0].IsInRange(target, 100)) { if (Qk.Cast(prediction.CastPosition)) { return; } } } break; } } } if (Wk.IsBackRange(Orbwalker.ActiveModes.Combo) && !Kayn.IsAboutToTransform()) { var target = Wk.GetTarget(); if (target != null) { var prediction = Wk.GetPrediction(target); switch (prediction.HitChance) { case HitChance.High: case HitChance.Immobile: // Regular W cast if (Wk.Cast(prediction.CastPosition)) { return; } break; case HitChance.Collision: // Special case for colliding enemies var colliding = prediction.CollisionObjects.OrderBy(o => o.Distance(Kayn, true)).ToList(); if (colliding.Count > 0) { // First colliding target is < 100 units away from our main target if (colliding[0].IsInRange(target, 100)) { if (Wk.Cast(prediction.CastPosition)) { return; } } } break; } } } if (R.IsBackRange(Orbwalker.ActiveModes.Combo)) { var target = R.GetTarget(); if (target != null && target.HealthPercent < Menus.Combo["Rs"].Cast <Slider>().CurrentValue) { if (!target.IsInRange(Kayn, R.Range) && R.IsReady()) { return; } { R.Cast(target); } } } } }