private static void CastQ(Obj_AI_Base target) { SebbyLib.Prediction.PredictionOutput prediction = GetPred(Q1, target); Vector3 pos1 = Vector3.Zero, pos2 = Vector3.Zero, pos3 = Vector3.Zero; SebbyLib.Prediction.HitChance hitchance = SebbyLib.Prediction.HitChance.Low; if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = SebbyLib.Prediction.HitChance.VeryHigh; } else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = SebbyLib.Prediction.HitChance.High; } else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = SebbyLib.Prediction.HitChance.Medium; } if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange) { prediction = GetPred(Q2, target); pos1 = Player.Position.Extend(prediction.CastPosition, Q1.Range); if (Cache.GetMinions(pos1, 280).Any()) { return; } if (OktwCommon.CirclePoints(10, 150, pos1).Any(x => x.IsWall())) { return; } if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange) { prediction = GetPred(Q3, target); pos2 = Player.Position.Extend(prediction.CastPosition, Q2.Range); if (Cache.GetMinions(pos2, 280).Any()) { return; } if (OktwCommon.CirclePoints(10, 150, pos2).Any(x => x.IsWall())) { return; } if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange) { return; } else if (prediction.Hitchance >= hitchance) { Q3.Cast(prediction.CastPosition); } } else if (prediction.Hitchance >= hitchance) { Q2.Cast(prediction.CastPosition); } } else if (prediction.Hitchance >= hitchance) { Q1.Cast(prediction.CastPosition); } }
internal static void Init() { if (Menu.Item("FleeWallJump", true).GetValue <bool>() && WallJumpPos.Any(x => x.DistanceToPlayer() <= E.Range + 50)) { WallVisibleGetLogic(); WallJumpLogic(); } else { if (IsDashing) { if (Menu.Item("FleeQ", true).GetValue <bool>() && Q.IsReady() && !SpellManager.HaveQ3) { var qMinion = MinionManager.GetMinions(lastEPos, 220, MinionTypes.All, MinionTeam.NotAlly).FirstOrDefault(); if (qMinion.IsValidTarget(220)) { Q.Cast(Me.Position, true); } } } else { if (Menu.Item("FleeE", true).GetValue <bool>() && E.IsReady()) { var dashList = new List <Obj_AI_Base>(); dashList.AddRange(HeroManager.Enemies.Where(i => i.IsValidTarget(E.Range))); dashList.AddRange(MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All, MinionTeam.NotAlly)); var dash = dashList.Where( i => SpellManager.CanCastE(i) && PosAfterE(i).Distance(Game.CursorPos) < Game.CursorPos.DistanceToPlayer() && Evade.EvadeManager.IsSafe(PosAfterE(i).To2D()).IsSafe) .MinOrDefault(i => Game.CursorPos.Distance(PosAfterE(i))); if (dash.IsValidTarget(E.Range) && SpellManager.CanCastE(dash)) { E.CastOnUnit(dash, true); return; } } if (Menu.Item("FleeQ3", true).GetValue <bool>() && SpellManager.HaveQ3 && Q3.IsReady() && HeroManager.Enemies.Any(x => x.IsValidTarget(Q3.Range))) { SpellManager.CastQ3(); } } } }