private void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { if (DashSpell.IsReady() && Config.Item("EGCchampion" + gapcloser.Sender.ChampionName, true).GetValue <bool>()) { int GapcloserMode = Config.Item("GapcloserMode", true).GetValue <StringList>().SelectedIndex; if (GapcloserMode == 0) { var bestpoint = Player.Position.Extend(Game.CursorPos, DashSpell.Range).To3DWorld(); if (IsGoodPosition(bestpoint)) { DashSpell.Cast(bestpoint); } } else if (GapcloserMode == 1) { var points = OktwCommon.CirclePoints(10, DashSpell.Range, Player.Position); var bestpoint = Player.Position.Extend(gapcloser.Sender.Position, -DashSpell.Range).To3DWorld(); int enemies = bestpoint.CountEnemiesInRange(DashSpell.Range); foreach (var point in points) { int count = point.CountEnemiesInRange(DashSpell.Range); if (count < enemies) { enemies = count; bestpoint = point; } else if (count == enemies && Game.CursorPos.Distance(point) < Game.CursorPos.Distance(bestpoint)) { enemies = count; bestpoint = point; } } if (IsGoodPosition(bestpoint)) { DashSpell.Cast(bestpoint); } } } }
private static void CastSpell(LeagueSharp.Common.Spell qwer, Obj_AI_Base target) { var predInput2 = new SebbyLib.Prediction.PredictionInput { Speed = qwer.Speed, Delay = qwer.Delay, Range = qwer.Range, From = Player.ServerPosition, Radius = qwer.Width, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { qwer.Cast(poutput2.CastPosition); } }
private void OnPossibleToInterrupt(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { if (config.Item("useQint", true).GetValue <bool>()) { if (Q.CanCast(sender)) { Q.Cast(sender); } } if (config.Item("useWint", true).GetValue <bool>()) { if (W.CanCast(sender)) { W.Cast(sender); } } }
private void AutoWardLogic() { foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValid && !enemy.IsVisible && !enemy.IsDead)) { var need = OKTWtracker.ChampionInfoList.Find(x => x.NetworkId == enemy.NetworkId); if (need == null || need.PredictedPos == null) { continue; } var PPDistance = need.PredictedPos.Distance(Player.Position); if (PPDistance > 1400) { continue; } var timer = Game.Time - need.LastVisableTime; if (timer > 1 && timer < 3) { if (Program.Combo && PPDistance < 1500 && Player.ChampionName == "Quinn" && W.IsReady() && Config.Item("autoW", true).GetValue <bool>()) { W.Cast(); } if (Program.Combo && PPDistance < 900 && Player.ChampionName == "Karhus" && Q.IsReady() && Player.CountEnemiesInRange(900) == 0) { Q.Cast(need.PredictedPos); } if (Program.Combo && PPDistance < 1400 && Player.ChampionName == "Ashe" && E.IsReady() && Player.CountEnemiesInRange(800) == 0 && Config.Item("autoE", true).GetValue <bool>()) { E.Cast(Player.Position.Extend(need.PredictedPos, 5000)); } if (PPDistance < 800 && Player.ChampionName == "MissFortune" && E.IsReady() && Program.Combo && Player.Mana > 200) { E.Cast(Player.Position.Extend(need.PredictedPos, 800)); } if (!Player.Spellbook.IsAutoAttacking && PPDistance < 800 && Player.ChampionName == "Caitlyn" && W.IsReady() && Player.Mana > 200f && Config.Item("bushW", true).GetValue <bool>() && Utils.TickCount - W.LastCastAttemptT > 2000) { W.Cast(need.PredictedPos); } if (!Player.Spellbook.IsAutoAttacking && PPDistance < 150 + R.Level * 250 && Player.ChampionName == "Teemo" && R.IsReady() && Player.Mana > 200f && Config.Item("bushR", true).GetValue <bool>() && Utils.TickCount - W.LastCastAttemptT > 2000) { R.Cast(need.PredictedPos); } if (!Player.Spellbook.IsAutoAttacking && PPDistance < 760 && Player.ChampionName == "Jhin" && E.IsReady() && Player.Mana > 200f && Config.Item("bushE", true).GetValue <bool>() && Utils.TickCount - E.LastCastAttemptT > 2000) { E.Cast(need.PredictedPos); } } if (timer < 4) { if (Config.Item("AutoWardCombo").GetValue <bool>() && Program.AIOmode != 2 && !Program.Combo) { return; } if (NavMesh.IsWallOfGrass(need.PredictedPos, 0)) { if (PPDistance < 600 && Config.Item("AutoWard").GetValue <bool>()) { if (TrinketN.IsReady()) { TrinketN.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (SightStone.IsReady()) { SightStone.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (WardN.IsReady()) { WardN.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (EOTOasis.IsReady()) { EOTOasis.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (EOTEquinox.IsReady()) { EOTEquinox.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (EOTWatchers.IsReady()) { EOTWatchers.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } } if (Config.Item("AutoWardBlue").GetValue <bool>()) { if (FarsightOrb.IsReady()) { FarsightOrb.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } else if (ScryingOrb.IsReady()) { ScryingOrb.Cast(need.PredictedPos); need.LastVisableTime = Game.Time - 5; } } } } } }