public static void CastQ(Obj_AI_Hero target) { if (target == null || MenuConfig.Config.Item("blacklist" + target.CharData.BaseSkinName).GetValue<bool>() || (!MenuConfig.Q2 && Mode.ThreshQ(target))) { return; } switch (MenuConfig.PredMode.SelectedIndex) { case 0: var predictionInput = new PredictionInput { Aoe = false, Collision = true, Speed = MenuConfig.Speed, Delay = .5f, Range = MenuConfig.Range, From = Player.ServerPosition, Radius = MenuConfig.Width, Unit = target, Type = SkillshotType.SkillshotLine, CollisionObjects = new [] {CollisionableObjects.YasuoWall, CollisionableObjects.Minions } }; var prediction = SebbyLib.Prediction.Prediction.GetPrediction(predictionInput); if (MenuConfig.Hitchance.SelectedIndex == 0 && prediction.Hitchance < HitChance.High) { return; } if (MenuConfig.Hitchance.SelectedIndex == 1 && prediction.Hitchance < HitChance.VeryHigh) { return; } Spells.Q.Cast(prediction.CastPosition); break; case 1: var commonPred = Spells.Q.GetPrediction(target); if (MenuConfig.Hitchance.SelectedIndex == 0 && commonPred.Hitchance < LeagueSharp.Common.HitChance.High) { return; } if (MenuConfig.Hitchance.SelectedIndex == 1 && commonPred.Hitchance < LeagueSharp.Common.HitChance.VeryHigh) { return; } Spells.Q.Cast(commonPred.CastPosition); break; } }
public static void OnLoad(EventArgs args) { if (Player.ChampionName != "Jayce") { return; } MenuConfig.OnLoad(); //ranged Q = new Spell(SpellSlot.Q, 1050); Qe = new Spell(SpellSlot.Q, 1470); W = new Spell(SpellSlot.W, int.MaxValue); E = new Spell(SpellSlot.E, 650); // melee Qm = new Spell(SpellSlot.Q, 600); Wm = new Spell(SpellSlot.W, int.MaxValue); Em = new Spell(SpellSlot.E, 240); R = new Spell(SpellSlot.R, int.MaxValue); qpred = new PredictionInput { Aoe = false, Collision = false, Speed = Qe.Speed, Delay = Qe.Delay, Range = Qe.Range, Radius = Qe.Width, Type = SkillshotType.SkillshotLine }; qpred1 = new PredictionInput { Aoe = false, Collision = false, Speed = Q.Speed, Delay = Q.Delay, Range = Q.Range, Radius = Q.Width, Type = SkillshotType.SkillshotLine }; Q.SetSkillshot(0.3f, 70f, 1500, true, LeagueSharp.Common.SkillshotType.SkillshotLine); Qe.SetSkillshot(0.3f, 70f, 2180, true, LeagueSharp.Common.SkillshotType.SkillshotLine); Qm.SetTargetted(0f, float.MaxValue); Em.SetTargetted(0f, float.MaxValue); Game.OnUpdate += OnUpdate; Spellbook.OnCastSpell += OnCastSpell; Drawing.OnDraw += OnDraw; Game.OnUpdate += GeneralOnUpdate; Obj_AI_Base.OnDoCast += OnDoCastRange; Obj_AI_Base.OnDoCast += OnDoCastMelee; Obj_AI_Base.OnDoCast += LaneClear; CustomEvents.Unit.OnDash += OnDash; // Obj_AI_Base.OnProcessSpellCast += OnProcessCast; AntiGapcloser.OnEnemyGapcloser += OnGapClose; Interrupter2.OnInterruptableTarget += OnInterrupt; Obj_AI_Base.OnIssueOrder += OnOrder; // GameObject.OnCreate += OnCreate; }
private static void SebbySpell(LeagueSharp.Common.Spell QR, Obj_AI_Base target) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QR.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QR.Width > 80 && !QR.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QR.Collision, Speed = QR.Speed, Delay = QR.Delay, Range = QR.Range, From = Player.ServerPosition, Radius = QR.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (QR.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (HitChanceMenu["HitChance"].Cast <ComboBox>().CurrentValue == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { QR.Cast(poutput2.CastPosition); } } else if (HitChanceMenu["HitChance"].Cast <ComboBox>().CurrentValue == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QR.Cast(poutput2.CastPosition); } } else if (HitChanceMenu["HitChance"].Cast <ComboBox>().CurrentValue == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { QR.Cast(poutput2.CastPosition); } } }
private static void KSCheck() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); // If Target's not in Q Range or there's no target or target's invulnerable don't f**k with him if (target == null || !target.IsValidTarget(Q.Range) || target.IsInvulnerable) { return; } var ksQ = MiscMenu["KSQ"].Cast <CheckBox>().CurrentValue; var ksW = MiscMenu["KSW"].Cast <CheckBox>().CurrentValue; var ksE = MiscMenu["KSE"].Cast <CheckBox>().CurrentValue; #region SebbyPrediction //SebbyPrediction SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool Aoe10 = false; var predictioninput = new SebbyLib.Prediction.PredictionInput { Aoe = Aoe10, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = Q.Range, From = Player.ServerPosition, Radius = Q.Width, Unit = target, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.Prediction.GetPrediction(predictioninput); // KS if (ksQ && SebbyLib.OktwCommon.GetKsDamage(target, Q) > target.Health && target.IsValidTarget(Q.Range)) { if (target.CanMove && predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } else if (!target.CanMove) { Q.Cast(target.Position); } } if (ksW && SebbyLib.OktwCommon.GetKsDamage(target, W) > target.Health && target.IsValidTarget(W.Range)) { W.CastOnUnit(target); } if (ksE && SebbyLib.OktwCommon.GetKsDamage(target, E) > target.Health && target.IsValidTarget(E.Range)) { E.CastOnUnit(target); } }
private static void SebbySpell(Spell QR, Obj_AI_Base target) { var CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var aoe2 = false; if (QR.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if ((QR.Width > 80) && !QR.Collision) { aoe2 = true; } var predInput2 = new PredictionInput { Aoe = aoe2, Collision = QR.Collision, Speed = QR.Speed, Delay = QR.Delay, Range = QR.Range, From = Player.ServerPosition, Radius = QR.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if ((QR.Speed != float.MaxValue) && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= HitChance.Medium) { QR.Cast(poutput2.CastPosition); } } else if (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= HitChance.High) { QR.Cast(poutput2.CastPosition); } } else if (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= HitChance.VeryHigh) { QR.Cast(poutput2.CastPosition); } } }
private void CastQE(Obj_AI_Base target) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = EQ.Collision, Speed = EQ.Speed, Delay = EQ.Delay, Range = EQ.Range, From = Player.ServerPosition, Radius = EQ.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } Vector3 castQpos = poutput2.CastPosition; if (Player.Distance(castQpos) > Q.Range) { castQpos = Player.Position.Extend(castQpos, Q.Range); } if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { EQcastNow = true; Q.Cast(castQpos); } } else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { EQcastNow = true; Q.Cast(castQpos); } } else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { EQcastNow = true; Q.Cast(castQpos); } } }
private static void CastQE(Obj_AI_Base target) { var CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new PredictionInput { Aoe = false, Collision = EQ.Collision, Speed = EQ.Speed, Delay = EQ.Delay, Range = EQ.Range, From = Player.ServerPosition, Radius = EQ.Width, Unit = target, Type = CoreType2 }; var poutput2 = Prediction.GetPrediction(predInput2); if (OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } var castQpos = poutput2.CastPosition; if (Player.Distance(castQpos) > Q.Range) { castQpos = Player.Position.LSExtend(castQpos, Q.Range); } if (Program.getSliderItem("HitChance") == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { EQcastNow = true; Q.Cast(castQpos); } } else if (Program.getSliderItem("HitChance") == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { EQcastNow = true; Q.Cast(castQpos); } } else if (Program.getSliderItem("HitChance") == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { EQcastNow = true; Q.Cast(castQpos); } } }
public static bool OKTWCast_SebbyLib(Spell QWER, Obj_AI_Hero target, bool MultiTarget)//, SebbyLib.Prediction.HitChance hitChance) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) // 기술의 폭이 80 이상이고, 충돌이 일어나지 않는 기술이라면... { aoe2 = true; } if (MultiTarget && !QWER.Collision) // 내가 이건 멀티타겟이라고 정의해버린 경우 { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = HeroManager.Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (QWER.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(HeroManager.Player.ServerPosition, poutput2.CastPosition)) { return(false); } if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { return(QWER.Cast(poutput2.CastPosition)); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High && MultiTarget) { return(QWER.Cast(poutput2.CastPosition)); } return(false); }
private void CastQ(AIHeroClient target) { float distance = Vector3.Distance(BallPos, target.ServerPosition); if (E.IsReady() && Player.Mana > RMANA + QMANA + WMANA + EMANA && distance > Player.Distance(target.ServerPosition) + 300) { E.CastOnUnit(Player); return; } if (Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex == 1) { //var prepos5 = Core.Prediction.GetPrediction(target, delay, Q.Width); var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = float.MaxValue, From = BallPos, Radius = Q.Width, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var prepos5 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if ((int)prepos5.Hitchance > 5 - Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex) { if (prepos5.CastPosition.Distance(prepos5.CastPosition) < Q.Range) { Q.Cast(prepos5.CastPosition); } } } else { float delay = (distance / Q.Speed + Q.Delay); var prepos = LeagueSharp.Common.Prediction.GetPrediction(target, delay, Q.Width); if ((int)prepos.Hitchance > 5 - Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex) { if (prepos.CastPosition.Distance(prepos.CastPosition) < Q.Range) { Q.Cast(prepos.CastPosition); } } } }
private static void CastQ(AIHeroClient target) { var distance = Vector3.Distance(BallPos, target.ServerPosition); if (E.IsReady() && Player.Mana > RMANA + QMANA + WMANA + EMANA && distance > Player.Distance(target.ServerPosition) + 300) { E.CastOnUnit(Player); return; } if (Program.getSliderItem("PredictionMODE") == 1) { var predInput2 = new PredictionInput { Aoe = true, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = float.MaxValue, From = BallPos, Radius = Q.Width, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var prepos5 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if ((int)prepos5.Hitchance > 5 - Program.getSliderItem("HitChance")) { if (prepos5.CastPosition.Distance(prepos5.CastPosition) < Q.Range) { Q.Cast(prepos5.CastPosition); } } } else { var delay = distance / Q.Speed + Q.Delay; var prepos = Prediction.GetPrediction(target, delay, Q.Width); if ((int)prepos.Hitchance > 5 - Program.getSliderItem("HitChance")) { if (Q.IsInRange(target)) { Q.Cast(target); } } } }
private static void AutoHarass() { if (Player.ManaPercent < Menu.Item("autoharassminimumMana").GetValue <Slider>().Value) { return; } var m = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if ((m == null) || !m.IsValidTarget()) { return; } #region SebbyPrediction //SebbyPrediction var PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; var Aoe10 = true; var predictioninput = new PredictionInput { Aoe = Aoe10, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = Q.Range, From = Player.ServerPosition, Radius = Q.Width, Unit = m, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = Prediction.GetPrediction(predictioninput); if ((m != null) && Menu.Item("autoharass").GetValue <bool>()) { E.CastOnUnit(m); } if ((m != null) && Menu.Item("autoharassuseQ").GetValue <bool>()) { if (predpos.Hitchance >= HitChance.High) { Q.Cast(predpos.CastPosition); } } }
private static bool TryKickAOE() { foreach (var t in HeroManager.Enemies.Where(x => x.IsValidTarget(400))) { var from = Prediction.GetPrediction(t, Rnormal.Delay).CastPosition; foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget() && enemy.NetworkId != t.NetworkId && enemy.Distance(t) < Rnormal.Range)) { var PredictionRnormal = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = Rnormal.Speed, Delay = Rnormal.Delay, Range = Rnormal.Range, Radius = Rnormal.Width, Unit = enemy, From = from, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(PredictionRnormal); if (poutput2.AoeTargetsHitCount == 0) { continue; } var castPos = poutput2.CastPosition; var ext = castPos.Extend(from, castPos.Distance(t.ServerPosition) + 300); Console.WriteLine("AOE " + poutput2.AoeTargetsHitCount); if (Player.Distance(ext) < 100) { Orbwalker.SetOrbwalkingPoint(ext); R.Cast(t); return(true); } else if (Player.Distance(ext) < 200) { Orbwalker.SetOrbwalkingPoint(ext); return(true); } } } return(false); }
public static bool CastOKTW(this Spell spell, Obj_AI_Hero target, SebbyLib.Prediction.HitChance hitChance) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (spell.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (spell.Width > 80 && !spell.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = spell.Collision, Speed = spell.Speed, Delay = spell.Delay, Range = spell.Range, From = HeroManager.Player.ServerPosition, Radius = spell.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (spell.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(HeroManager.Player.ServerPosition, poutput2.CastPosition)) { return(false); } if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { return(spell.Cast(poutput2.CastPosition)); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { return(spell.Cast(poutput2.CastPosition)); } return(false); }
/// <summary> /// Cast the Q /// </summary> /// <param name="target"></param> private static void QCast(AIHeroClient target) { if (!Q.IsReady() || !target.IsValidTarget(Q.Range)) { return; } if (Menu.Item("Prediction.type").GetValue <StringList>().SelectedIndex == 0) { var pred = Q.GetPrediction(target); if (pred.Hitchance >= GetHitchance()) { Q.Cast(pred.CastPosition); } } if (Menu.Item("Prediction.type").GetValue <StringList>().SelectedIndex == 1) { var pred = CPrediction.Circle(Q, target, HitChance.VeryHigh, true); if (pred.TotalHits > 0) { Q.Cast(pred.CastPosition); } } else if (Menu.Item("Prediction.type").GetValue <StringList>().SelectedIndex == 2) { 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)) { Q.Cast(predictionOutput.CastPosition); } } }
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); } }
public static void OnLoaded() { if (Player.ChampionName != "LeeSin") { return; } MenuConfig.OnLoad(); Q = new Spell(SpellSlot.Q, 1050); W = new Spell(SpellSlot.W, 700); E = new Spell(SpellSlot.E, 350); R = new Spell(SpellSlot.R, 375); Rnormal = new Spell(SpellSlot.R, 700); FlashSlot = ObjectManager.Player.GetSpellSlot("summonerflash"); Rnormal.SetSkillshot(0f, 70f, 1500f, false, (LeagueSharp.Common.SkillshotType)SkillshotType.SkillshotLine); PredictionRnormal = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = Rnormal.Speed, Delay = Rnormal.Delay, Range = Rnormal.Range, Radius = Rnormal.Width, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine }; foreach (var spell in Player.Spellbook.Spells.Where(spell => spell.Name.ToLower().Contains("smite"))) { Smite = spell.Slot; } Notifciations.Messages(); Misc.VersionCheck.UpdateCheck(); Q.SetSkillshot(0.25f, 58f, 1800f, true, LeagueSharp.Common.SkillshotType.SkillshotLine); Game.OnUpdate += OnUpdate.OnUpdated; Drawing.OnDraw += OnInsec.OnDraw; Drawing.OnDraw += OnJungle.OnCamps; Drawing.OnDraw += OnChamp.OnSpells; GameObject.OnCreate += EventHandler.OnCreate; Obj_AI_Base.OnProcessSpellCast += EventHandler.OnSpellcast; Spellbook.OnCastSpell += EventHandler.OnSpell; Game.OnWndProc += EventHandler.OnWndProc; // Obj_AI_Base.OnDoCast += EventHandler.OnDoCast; }
private static void SebbySpell(Spell QWER, Obj_AI_Base target) { var CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if ((QWER.Width > 80) && !QWER.Collision) { aoe2 = true; } var predInput2 = new PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = Prediction.GetPrediction(predInput2); //var poutput2 = QWER.GetPrediction(target); if ((QWER.Speed != float.MaxValue) && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (poutput2.Hitchance >= HitChance.High) { QWER.Cast(poutput2.CastPosition); } }
public static bool CastOKTW(this Spell spell, Obj_AI_Hero target, SebbyLib.Prediction.HitChance hitChance) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (spell.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (spell.Width > 80 && !spell.Collision) aoe2 = true; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = spell.Collision, Speed = spell.Speed, Delay = spell.Delay, Range = spell.Range, From = HeroManager.Player.ServerPosition, Radius = spell.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (spell.Speed != float.MaxValue && SebbyLib.OktwCommon.CollisionYasuo(HeroManager.Player.ServerPosition, poutput2.CastPosition)) return false; if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { return spell.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { return spell.Cast(poutput2.CastPosition); } return false; }
private static SebbyLib.Prediction.PredictionInput PredictionInput(Obj_AI_Base target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = 1400, Delay = .25f, Range = 1075, Radius = 150f, UseBoundingRadius = false, RangeCheckFrom = ObjectManager.Player.ServerPosition, From = ObjectManager.Player.ServerPosition, Source = ObjectManager.Player, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine, }; return(input); }
public SebbyLib.Prediction.PredictionOutput Prediction(AIHeroClient target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = 1200, Delay = .25f, Range = 1175, Radius = 80f, UseBoundingRadius = true, RangeCheckFrom = ObjectManager.Player.ServerPosition, From = ObjectManager.Player.ServerPosition, Source = ObjectManager.Player, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine, CollisionObjects = new[] { SebbyLib.Prediction.CollisionableObjects.YasuoWall } }; return(SebbyLib.Prediction.Prediction.GetPrediction(input)); }
public SebbyLib.Prediction.PredictionOutput OKTW(AIHeroClient target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = target.Distance(ObjectManager.Player) > 850, Speed = 1500, Delay = 1f, Range = 1700, From = ObjectManager.Player.ServerPosition, Radius = 550f, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle, Source = ObjectManager.Player, UseBoundingRadius = true, RangeCheckFrom = ObjectManager.Player.Position }; var output = SebbyLib.Prediction.Prediction.GetPrediction(input); return(output); }
public SebbyLib.Prediction.PredictionOutput OKTW(Obj_AI_Base target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = 1000, Delay = .3f, Range = 950, From = ObjectManager.Player.ServerPosition, Radius = 400f, // Knockback radius = 600f Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle, Source = ObjectManager.Player, UseBoundingRadius = true, RangeCheckFrom = ObjectManager.Player.Position }; var output = SebbyLib.Prediction.Prediction.GetPrediction(input); return(output); }
public SebbyLib.Prediction.PredictionOutput OKTW(Obj_AI_Base target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = float.MaxValue, Delay = .6f, Range = 1400, From = ObjectManager.Player.ServerPosition, Radius = 150f, Unit = target, Type = SkillshotType.SkillshotLine, Source = ObjectManager.Player, UseBoundingRadius = false, RangeCheckFrom = ObjectManager.Player.Position }; var output = SebbyLib.Prediction.Prediction.GetPrediction(input); return(output); }
private static SebbyLib.Prediction.PredictionOutput GetPred(Spell QWER, Obj_AI_Base target) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); //var poutput2 = QWER.GetPrediction(target); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return(null); } return(poutput2); }
public SebbyLib.Prediction.PredictionOutput OKTW(Obj_AI_Base target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = true, Speed = 1500, Delay = .6f, Range = 1100, From = ObjectManager.Player.ServerPosition, Radius = 60f, Unit = target, Type = SkillshotType.SkillshotLine, Source = ObjectManager.Player, UseBoundingRadius = true, RangeCheckFrom = ObjectManager.Player.Position }; var output = SebbyLib.Prediction.Prediction.GetPrediction(input); return(!OktwCommon.CollisionYasuo(ObjectManager.Player.Position, output.CastPosition) ? output : null); }
public static void OktwCast(this Spell Spells, Obj_AI_Base target, bool AOE = false) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; if (Spells.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = AOE, Collision = Spells.Collision, Speed = Spells.Speed, Delay = Spells.Delay, Range = Spells.Range, From = ObjectManager.Player.ServerPosition, Radius = Spells.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (Spells.Speed != float.MaxValue && YasuoWindWall.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition)) { return; } if (poutput2.Hitchance >= MinOKTWHitChance) { Spells.Cast(poutput2.CastPosition, true); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= MinOKTWHitChance - 1) { Spells.Cast(poutput2.CastPosition, true); } }
public SebbyLib.Prediction.PredictionOutput OKTW(Obj_AI_Base target) { var input = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = float.MaxValue, Delay = .7f, Range = RealRange, From = ObjectManager.Player.ServerPosition, Radius = 150f, Unit = target, Type = SkillshotType.SkillshotCircle }; var output = SebbyLib.Prediction.Prediction.GetPrediction(input); if (!OktwCommon.CollisionYasuo(ObjectManager.Player.Position, output.CastPosition) && output.Hitchance >= SebbyLib.Prediction.HitChance.High) { return(output); } return(null); }
public void cast(Obj_AI_Base target, Spell spell, SebbyLib.Prediction.SkillshotType type) { // spell.cast // OktwCommon. if (target == null) { return; } var mode = this.GetMenu.GetMenu.Item("Prediction").GetValue <StringList>().SelectedIndex; if (mode == 0) { var predictionInput = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = spell.Collision, Speed = spell.Speed, Delay = spell.Delay, Range = spell.Range, From = HeroManager.Player.ServerPosition, Radius = spell.Width, Unit = target, Type = type }; var pred = SebbyLib.Prediction.Prediction.GetPrediction(predictionInput); if (pred.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { spell.Cast(pred.CastPosition); } } else { spell.CastIfHitchanceEquals( target, LeagueSharp.Common.HitChance.VeryHigh); } }
private static void CastW(Obj_AI_Base t) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = W.Collision, Speed = W.Speed, Delay = W.Delay, Range = W.Range, From = Player.ServerPosition, Radius = W.Width, Unit = t, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { W.Cast(poutput2.CastPosition); } }
private static bool TryToGetPosAOE() { foreach (var t in HeroManager.Enemies.Where(x => x.IsValidTarget(1000))) { var from = Prediction.GetPrediction(t, Rnormal.Delay).CastPosition; foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget() && enemy.NetworkId != t.NetworkId && enemy.Distance(t) < Rnormal.Range)) { var PredictionRnormal = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = Rnormal.Speed, Delay = Rnormal.Delay, Range = Rnormal.Range, Radius = Rnormal.Width, Unit = enemy, From = from, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(PredictionRnormal); if (poutput2.AoeTargetsHitCount == 0 || poutput2.Hitchance < SebbyLib.Prediction.HitChance.Medium) { continue; } var castPos = poutput2.CastPosition; var ext = castPos.Extend(from, castPos.Distance(t.ServerPosition) + 200); Console.WriteLine("AOE2 " + poutput2.AoeTargetsHitCount); if (Player.Distance(ext) < W.Range) { Jump(ext); return true; } } } return false; }
private static void CastQ(AIHeroClient target) { var distance = Vector3.Distance(BallPos, target.ServerPosition); if (E.IsReady() && Player.Mana > RMANA + QMANA + WMANA + EMANA && distance > Player.LSDistance(target.ServerPosition) + 300) { E.CastOnUnit(Player); return; } if (Program.getSliderItem("PredictionMODE") == 1) { var predInput2 = new PredictionInput { Aoe = true, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = float.MaxValue, From = BallPos, Radius = Q.Width, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var prepos5 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if ((int) prepos5.Hitchance > 5 - Program.getSliderItem("HitChance")) { if (prepos5.CastPosition.LSDistance(prepos5.CastPosition) < Q.Range) { Q.Cast(prepos5.CastPosition); } } } else { var delay = distance/Q.Speed + Q.Delay; var prepos = Prediction.GetPrediction(target, delay, Q.Width); if ((int) prepos.Hitchance > 5 - Program.getSliderItem("HitChance")) { if (Q.IsInRange(target)) { Q.Cast(target); } } } }
// Human Q Logic internal static void CastJavelin(Obj_AI_Base target, string mode) { // if not harass mode ignore mana check if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode)) { if (mode == "ha" && KL.Player.ManaPercent <= 65) return; if (!target.IsValidTarget(KL.Spells["Javelin"].Range)) return; // try prediction on champion if (target.IsChampion() && target is Obj_AI_Hero) // double check { if (KN.Root.Item("ndhqcheck").GetValue<bool>()) { switch (KN.Root.Item("ppred").GetValue<StringList>().SelectedValue) { case "OKTW": PredictionInput pi; pi = new PredictionInput(); pi.Aoe = false; pi.Collision = true; pi.Speed = 1300f; pi.Delay = 0.25f; pi.Range = 1500f; pi.From = KN.Player.ServerPosition; pi.Radius = 40f; pi.Unit = target; pi.Type = SkillshotType.SkillshotLine; var po = Prediction.GetPrediction(pi); if (po.Hitchance >= (SebbyLib.Prediction.HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(po.CastPosition); } break; case "SPrediction": var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero) target); if (so.HitChance >= (HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(so.CastPosition); } break; case "Common": var co = KL.Spells["Javelin"].GetPrediction(target); if (co.Hitchance >= (HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(co.CastPosition); } break; } } if (!KN.Root.Item("ndhqcheck").GetValue<bool>()) KL.Spells["Javelin"].Cast(target.ServerPosition); } else { KL.Spells["Javelin"].Cast(target); } } }
public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if (sender.Owner.IsMe) { if (getCheckBoxItem(menu, "ENABLED") && (PortAIO.OrbwalkerManager.isComboActive || PortAIO.OrbwalkerManager.isHarassActive)) { if (!ShineCommon.Utility.IsValidSlot(args.Slot)) { return; } if (OKTWPredictioner.Spells[(int)args.Slot] == null) { return; } if (!getCheckBoxItem(menu, String.Format("{0}{1}", ObjectManager.Player.ChampionName, args.Slot))) { return; } if (handleEvent[(int)args.Slot]) { args.Process = false; handleEvent[(int)args.Slot] = false; var enemy = TargetSelector.GetTarget(OKTWPredictioner.Spells[(int)args.Slot].Range, DamageType.Physical); if (enemy != null) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (OKTWPredictioner.Spells[(int)args.Slot].Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (OKTWPredictioner.Spells[(int)args.Slot].Width > 80 && !OKTWPredictioner.Spells[(int)args.Slot].Collision) aoe2 = true; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = OKTWPredictioner.Spells[(int)args.Slot].Collision, Speed = OKTWPredictioner.Spells[(int)args.Slot].Speed, Delay = OKTWPredictioner.Spells[(int)args.Slot].Delay, Range = OKTWPredictioner.Spells[(int)args.Slot].Range, From = Player.ServerPosition, Radius = OKTWPredictioner.Spells[(int)args.Slot].Width, Unit = enemy, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (OKTWPredictioner.Spells[(int)args.Slot].Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) return; if (getBoxItem(menu, "SPREDHITC") == 0) // Very High { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) OKTWPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition); else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { OKTWPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition); } } else if (getBoxItem(menu, "SPREDHITC") == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) OKTWPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition); } else if (getBoxItem(menu, "SPREDHITC") == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) OKTWPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition); } return; } } } } }
private static void SebbySpell(LeagueSharp.Common.Spell QR, Obj_AI_Base target) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QR.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QR.Width > 80 && !QR.Collision) aoe2 = true; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QR.Collision, Speed = QR.Speed, Delay = QR.Delay, Range = QR.Range, From = Player.ServerPosition, Radius = QR.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (QR.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) return; if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) QR.Cast(poutput2.CastPosition); } else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) QR.Cast(poutput2.CastPosition); } else if (HitChanceMenu["HitChance"].Cast<ComboBox>().CurrentValue == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) QR.Cast(poutput2.CastPosition); } }
// Human Q Logic internal static void CastJavelin(Obj_AI_Base target, string mode) { if (target == null) { return; } // if not harass mode ignore mana check if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode)) { if (mode != "ha" || KL.Player.ManaPercent > 65) { if (target.IsValidTarget(KL.Spells["Javelin"].Range)) { // try prediction on champion if (target.IsChampion()) { var qoutput = KL.Spells["Javelin"].GetPrediction(target); if (KN.Root.Item("ndhqcheck").GetValue <bool>()) { switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue) { case "OKTW": var pi = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = true, Speed = 1300f, Delay = 0.25f, Range = 1500f, From = KN.Player.ServerPosition, Radius = 40f, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine }; var po = SebbyLib.Prediction.Prediction.GetPrediction(pi); if (po.Hitchance == (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(po.CastPosition); } break; case "SPrediction": var so = KL.Spells["Javelin"].GetSPrediction((AIHeroClient)target); if (so.HitChance == (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(so.CastPosition); } break; case "Common": var co = KL.Spells["Javelin"].GetPrediction(target); if (co.Hitchance == (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(co.CastPosition); } break; } } if (qoutput.Hitchance == HitChance.Collision && KL.Smite.IsReady()) { if (KN.Root.Item("qsmcol").GetValue <bool>() && target.Health <= KL.CatDamage(target) * 3) { if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId)) { var obj = qoutput.CollisionObjects.Cast <Obj_AI_Minion>().ToList(); if (obj.Count == 1) { if (obj.Any( i => i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) && KL.Player.Distance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First()))) { KL.Spells["Javelin"].Cast(qoutput.CastPosition); return; } } } } } if (!KN.Root.Item("ndhqcheck").GetValue <bool>()) { KL.Spells["Javelin"].Cast(target); } } else { KL.Spells["Javelin"].Cast(target); } } } } }
public static void OnLoad() { if (Player.ChampionName != "Jayce") return; MenuConfig.OnLoad(); //ranged Q = new LeagueSharp.Common.Spell(SpellSlot.Q, 1050); Qe = new LeagueSharp.Common.Spell(SpellSlot.Q, 1470); W = new LeagueSharp.Common.Spell(SpellSlot.W, int.MaxValue); E = new LeagueSharp.Common.Spell(SpellSlot.E, 650); // melee Qm = new LeagueSharp.Common.Spell(SpellSlot.Q, 600); Wm = new LeagueSharp.Common.Spell(SpellSlot.W, int.MaxValue); Em = new LeagueSharp.Common.Spell(SpellSlot.E, 240); R = new LeagueSharp.Common.Spell(SpellSlot.R, int.MaxValue); qpred = new PredictionInput { Aoe = false, Collision = false, Speed = Qe.Speed, Delay = Qe.Delay, Range = Qe.Range, Radius = Qe.Width, Type = SkillshotType.SkillshotLine }; qpred1 = new PredictionInput { Aoe = false, Collision = false, Speed = Q.Speed, Delay = Q.Delay, Range = Q.Range, Radius = Q.Width, Type = SkillshotType.SkillshotLine }; Q.SetSkillshot(0.3f, 70f, 1500, true, LeagueSharp.Common.SkillshotType.SkillshotLine); Qe.SetSkillshot(0.3f, 70f, 2180, true, LeagueSharp.Common.SkillshotType.SkillshotLine); Qm.SetTargetted(0f, float.MaxValue); Em.SetTargetted(0f, float.MaxValue); Game.OnUpdate += OnUpdate; Spellbook.OnCastSpell += OnCastSpell; Drawing.OnDraw += OnDraw; Game.OnUpdate += GeneralOnUpdate; Obj_AI_Base.OnSpellCast += OnDoCastRange; Obj_AI_Base.OnSpellCast += OnDoCastMelee; Obj_AI_Base.OnSpellCast += LaneClear; CustomEvents.Unit.OnDash += OnDash; AntiGapcloser.OnEnemyGapcloser += OnGapClose; Interrupter2.OnInterruptableTarget += OnInterrupt; EloBuddy.Player.OnIssueOrder += OnOrder; }
// Cougar E Logic internal static void CastSwipe(Obj_AI_Base target, string mode) { if (KL.CatForm() && KL.CanUse(KL.Spells["Swipe"], false, mode)) { if (target.IsValidTarget(KL.Spells["Swipe"].Range)) { if (target.IsChampion()) { if (KN.Root.Item("ndcecheck").GetValue<bool>()) { switch (KN.Root.Item("ppred").GetValue<StringList>().SelectedValue) { case "OKTW": PredictionInput pi; pi = new PredictionInput(); pi.Aoe = true; pi.Collision = false; pi.Speed = float.MaxValue; pi.Delay = 0.25f; pi.Range = 300f; pi.From = KN.Player.ServerPosition; pi.Radius = 300f; pi.Unit = target; pi.Type = SkillshotType.SkillshotCone; var po = Prediction.GetPrediction(pi); if (po.Hitchance >= (SebbyLib.Prediction.HitChance) (KN.Root.Item("ndcech").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Swipe"].Cast(po.CastPosition); } break; case "SPrediction": var so = KL.Spells["Swipe"].GetSPrediction((Obj_AI_Hero) target); if (so.HitChance >= (HitChance) (KN.Root.Item("ndcech").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Swipe"].Cast(so.CastPosition); } break; case "Common": var co = KL.Spells["Swipe"].GetPrediction(target); if (co.Hitchance >= (HitChance) (KN.Root.Item("ndcech").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Swipe"].Cast(co.CastPosition); } break; } } else KL.Spells["Swipe"].Cast(target.ServerPosition); } else { // try aoe swipe if menu item > 1 var minhit = KN.Root.Item("ndcenum").GetValue<Slider>().Value; if (minhit > 1 && mode == "wc") KL.CastSmartSwipe(); // or cast normal else KL.Spells["Swipe"].Cast(target.ServerPosition); } } } // check valid target in range }
private static void CastQE(Obj_AI_Base target) { var CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new PredictionInput { Aoe = false, Collision = EQ.Collision, Speed = EQ.Speed, Delay = EQ.Delay, Range = EQ.Range, From = Player.ServerPosition, Radius = EQ.Width, Unit = target, Type = CoreType2 }; var poutput2 = Prediction.GetPrediction(predInput2); if (OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) return; var castQpos = poutput2.CastPosition; if (Player.Distance(castQpos) > Q.Range) castQpos = Player.Position.LSExtend(castQpos, Q.Range); if (Program.getSliderItem("HitChance") == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { EQcastNow = true; Q.Cast(castQpos); } } else if (Program.getSliderItem("HitChance") == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { EQcastNow = true; Q.Cast(castQpos); } } else if (Program.getSliderItem("HitChance") == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { EQcastNow = true; Q.Cast(castQpos); } } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 4) { HitChance hitchance = HitChance.Low; if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } if (QWER.Type == SkillshotType.SkillshotCircle) { Core.PredictionAio.CCast(QWER, target, hitchance); } else if (QWER.Type == SkillshotType.SkillshotLine) { Core.PredictionAio.LCast(QWER, target, hitchance); } else { QWER.Cast(target); } } if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 3) { SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle; //aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Movement.PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2); //var poutput2 = QWER.GetPrediction(target); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } } else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 1) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); //var poutput2 = QWER.GetPrediction(target); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } if (Game.Time - DrawSpellTime > 0.5) { DrawSpell = QWER; DrawSpellTime = Game.Time; } DrawSpellPos = poutput2; } else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 0) { if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); return; } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { QWER.CastIfHitchanceEquals(target, HitChance.High); return; } else if (Config.Item("HitChance ", true).GetValue <StringList>().SelectedIndex == 2) { QWER.CastIfHitchanceEquals(target, HitChance.Medium); return; } } else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 2) { if (target is Obj_AI_Hero && target.IsValid) { var t = target as Obj_AI_Hero; if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0) { QWER.SPredictionCast(t, HitChance.VeryHigh); return; } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { QWER.SPredictionCast(t, HitChance.High); return; } else if (Config.Item("HitChance ", true).GetValue <StringList>().SelectedIndex == 2) { QWER.SPredictionCast(t, HitChance.Medium); return; } } else { QWER.CastIfHitchanceEquals(target, HitChance.High); } } }
// Human/Couger R internal static void SwitchForm(Obj_AI_Base target, string mode) { if (!target.IsValidTarget(KL.Spells["Javelin"].Range)) return; if (KN.Root.Item("noR").GetValue<bool>() && mode == "jg" && KN.Player.Level < KN.Root.Item("noRLevel").GetValue<Slider>().Value) return; // catform -> human if (KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], false, mode)) { // dont switch if have Q buff and near target if (KL.CanUse(KL.Spells["Takedown"], false, mode)) { if (KL.Player.HasBuff("Takedown") && Orbwalking.InAutoAttackRange(target)) { return; } } // change form if Q is ready and meets hitchance if (target.IsChampion()) { if (KL.SpellTimer["Javelin"].IsReady()) { switch (KN.Root.Item("ppred").GetValue<StringList>().SelectedValue) { case "OKTW": PredictionInput pi; pi = new PredictionInput(); pi.Aoe = false; pi.Collision = true; pi.Speed = 1300f; pi.Delay = 0.25f; pi.Range = 1500f; pi.From = KN.Player.ServerPosition; pi.Radius = 40f; pi.Unit = target; pi.Type = SkillshotType.SkillshotLine; var po = Prediction.GetPrediction(pi); if (po.Hitchance >= (SebbyLib.Prediction.HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Aspect"].Cast(); } break; case "SPrediction": var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero)target); if (so.HitChance >= (HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Aspect"].Cast(); } break; case "Common": var co = KL.Spells["Javelin"].GetPrediction(target); if (co.Hitchance >= (HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Aspect"].Cast(); } break; } } } // is jungling if (mode == "jg") { if (KL.CanUse(KL.Spells["Bushwhack"], true, mode) || KL.CanUse(KL.Spells["Javelin"], true, mode)) { if ((!KL.SpellTimer["Pounce"].IsReady(2) || !KL.CanUse(KL.Spells["Pounce"], false, mode)) && (!KL.SpellTimer["Swipe"].IsReady() || !KL.CanUse(KL.Spells["Swipe"], false, mode)) && (!KL.SpellTimer["Takedown"].IsReady() || !KL.CanUse(KL.Spells["Takedown"], false, mode)) || !(KL.Player.Distance(target.ServerPosition) <= 355) || !KN.Root.Item("jgaacount").GetValue<KeyBind>().Active) { if (KL.Spells["Javelin"].Cast(target) != Spell.CastStates.Collision && KL.SpellTimer["Javelin"].IsReady()) { KL.Spells["Aspect"].Cast(); } else if (!KL.CanUse(KL.Spells["Javelin"], true, mode)) { KL.Spells["Aspect"].Cast(); } } } } } // human -> catform if (!KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], true, mode)) { switch (mode) { case "jg": if (KL.Counter < KN.Root.Item("aareq").GetValue<Slider>().Value && KN.Root.Item("jgaacount").GetValue<KeyBind>().Active) { return; } break; case "gap": if (target.IsValidTarget(375)) { KL.Spells["Aspect"].Cast(); return; } break; case "wc": if (target.IsValidTarget(375) && target.IsMinion) { KL.Spells["Aspect"].Cast(); return; } break; } if (target.IsHunted()) { // force switch no swipe/takedown req if (!KN.Root.Item("ndhrcreq").GetValue<bool>() && mode == "co" || !KN.Root.Item("ndhrjreq").GetValue<bool>() && mode == "jg") { KL.Spells["Aspect"].Cast(); return; } // dis b for level 1 nid // stop form switch when W is not leveled or disabled. if (!KL.CanUse(KL.Spells["Pounce"], false, mode)) { // block the form switch if greater than couger Q range if (target.Distance(KL.Player) > KL.Spells["Takedown"].Range + 50) { return; } } // or check if pounce timer is ready before switch if (KL.Spells["Aspect"].IsReady() && target.IsValidTarget(KL.Spells["ExPounce"].Range)) { // dont change form if swipe or takedown isn't ready if ((KL.SpellTimer["Takedown"].IsReady() || KL.SpellTimer["Swipe"].IsReady()) && KL.SpellTimer["Pounce"].IsReady(1)) KL.Spells["Aspect"].Cast(); } } else { // check if in pounce range if (target.IsValidTarget(KL.Spells["Pounce"].Range + 95)) { if (mode != "jg") { // switch to cougar if can kill target if (KL.CatDamage(target) * 3 >= target.Health) { if (mode == "co" && target.IsValidTarget(KL.Spells["Pounce"].Range + 200)) { if (!KL.CanUse(KL.Spells["Javelin"], true, "co") || KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision) { KL.Spells["Aspect"].Cast(); } } } // switch if Q disabled in menu or not ready if (!KL.CanUse(KL.Spells["Javelin"], true, mode)) { KL.Spells["Aspect"].Cast(); } else if (Utils.GameTimeTickCount - (int) (KL.TimeStamp["Javelin"] * 1000) + ((6 + (6 * KL.Player.PercentCooldownMod)) * 1000) >= 500 && !KL.SpellTimer["Javelin"].IsReady(2)) { KL.Spells["Aspect"].Cast(); } } else { if (KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision && KN.Root.Item("spcol").GetValue<bool>()) { if (KL.Spells["Aspect"].IsReady()) KL.Spells["Aspect"].Cast(); } if ((!KL.SpellTimer["Bushwhack"].IsReady() || !KL.CanUse(KL.Spells["Bushwhack"], true, mode)) && (!KL.SpellTimer["Javelin"].IsReady(3) || !KL.CanUse(KL.Spells["Javelin"], true, mode))) { if (KL.Spells["Aspect"].IsReady()) KL.Spells["Aspect"].Cast(); } } } if (KN.Target.IsValidTarget(KL.Spells["Javelin"].Range) && target.IsChampion()) { if (KL.SpellTimer["Javelin"].IsReady()) { // check if in pounce range. if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 100f) { // if we dont meet hitchance on Q target pounce nearest target var poutput = KL.Spells["Javelin"].GetPrediction(KN.Target); if (poutput.Hitchance < (HitChance) (KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { if (KL.Spells["Aspect"].IsReady()) KL.Spells["Aspect"].Cast(); } } } if (KN.Target.IsHunted() && KN.Target.Distance(KL.Player.ServerPosition) > KL.Spells["ExPounce"].Range + 100) { if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 25) { if (KL.Spells["Aspect"].IsReady()) KL.Spells["Aspect"].Cast(); } } if (!KL.SpellTimer["Javelin"].IsReady()) { if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 125) { KL.Spells["Aspect"].Cast(); } } } } } }
private void CastW(Obj_AI_Base t) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = W.Collision, Speed = W.Speed, Delay = W.Delay, Range = W.Range, From = Player.ServerPosition, Radius = W.Width, Unit = t, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { W.Cast(poutput2.CastPosition); } }
private static void KSCheck() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); // If Target's not in Q Range or there's no target or target's invulnerable don't f**k with him if (target == null || !target.IsValidTarget(Q.Range) || target.IsInvulnerable) return; var ksQ = MiscMenu["KSQ"].Cast<CheckBox>().CurrentValue; var ksW = MiscMenu["KSW"].Cast<CheckBox>().CurrentValue; var ksE = MiscMenu["KSE"].Cast<CheckBox>().CurrentValue; #region SebbyPrediction //SebbyPrediction SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool Aoe10 = false; var predictioninput = new SebbyLib.Prediction.PredictionInput { Aoe = Aoe10, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = Q.Range, From = Player.ServerPosition, Radius = Q.Width, Unit = target, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.Prediction.GetPrediction(predictioninput); // KS if (ksQ && SebbyLib.OktwCommon.GetKsDamage(target, Q) > target.Health && target.IsValidTarget(Q.Range)) { if (target.CanMove && predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } else if (!target.CanMove) { Q.Cast(target.Position); } } if (ksW && SebbyLib.OktwCommon.GetKsDamage(target, W) > target.Health && target.IsValidTarget(W.Range)) { W.CastOnUnit(target); } if (ksE && SebbyLib.OktwCommon.GetKsDamage(target, E) > target.Health && target.IsValidTarget(E.Range)) { E.CastOnUnit(target); } }
private static void Game_OnGameLoad(EventArgs args) { if (Player.ChampionName != ChampionName) return; Config = new Menu(ChampionName + " GENESIS", ChampionName + " GENESIS", true); var targetSelectorMenu = new Menu("Target Selector", "Target Selector"); TargetSelector.AddToMenu(targetSelectorMenu); Config.AddSubMenu(targetSelectorMenu); Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking")); Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking")); Config.AddToMainMenu(); Config.SubMenu("Q Config").AddItem(new MenuItem("Q2delay", "Q2 Delay").SetValue(new Slider(500, 2000, 0))); Config.SubMenu("Draw").AddItem(new MenuItem("qRange", "Q range").SetValue(false)); Q = new Spell(SpellSlot.Q, 1100); W = new Spell(SpellSlot.W, 700); E = new Spell(SpellSlot.E, 330); R = new Spell(SpellSlot.R, 375); R.SetTargetted(0.20f,float.MaxValue); Rnormal = new Spell(SpellSlot.R, 700); Q.SetSkillshot(0.25f, 60f, 1800f, true, SkillshotType.SkillshotLine); Rnormal.SetSkillshot(0f, 70f, 1500f, false, SkillshotType.SkillshotLine); PredictionRnormal = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = false, Speed = Rnormal.Speed, Delay = Rnormal.Delay, Range = Rnormal.Range, Radius = Rnormal.Width, Type = SebbyLib.Prediction.SkillshotType.SkillshotLine }; flash = Player.GetSpellSlot("summonerflash"); ignite = Player.GetSpellSlot("summonerdot"); smite = Player.GetSpellSlot("summonersmite"); if (smite == SpellSlot.Unknown) { smite = Player.GetSpellSlot("itemsmiteaoe"); } if (smite == SpellSlot.Unknown) { smite = Player.GetSpellSlot("s5_summonersmiteplayerganker"); } if (smite == SpellSlot.Unknown) { smite = Player.GetSpellSlot("s5_summonersmitequick"); } if (smite == SpellSlot.Unknown) { smite = Player.GetSpellSlot("s5_summonersmiteduel"); } Game.OnUpdate += Game_OnGameUpdate; Obj_AI_Base.OnBuffAdd += Obj_AI_Base_OnBuffAdd; Obj_AI_Base.OnBuffRemove += Obj_AI_Base_OnBuffRemove; Orbwalking.BeforeAttack += Orbwalking_BeforeAttack; Orbwalking.AfterAttack += Orbwalking_AfterAttack; Drawing.OnDraw += Drawing_OnDraw; }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 1) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) aoe2 = true; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); //var poutput2 = QWER.GetPrediction(target); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) return; if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) QWER.Cast(poutput2.CastPosition); else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) QWER.Cast(poutput2.CastPosition); } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) QWER.Cast(poutput2.CastPosition); } if (Game.Time - DrawSpellTime > 0.5) { DrawSpell = QWER; DrawSpellTime = Game.Time; } DrawSpellPos = poutput2; } else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 0) { if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); return; } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1) { QWER.CastIfHitchanceEquals(target, HitChance.High); return; } else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2) { QWER.CastIfHitchanceEquals(target, HitChance.Medium); return; } } else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 2 ) { if (target is Obj_AI_Hero && target.IsValid) { var t = target as Obj_AI_Hero; if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0) { QWER.SPredictionCast(t, HitChance.VeryHigh); return; } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1) { QWER.SPredictionCast(t, HitChance.High); return; } else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2) { QWER.SPredictionCast(t, HitChance.Medium); return; } } else { QWER.CastIfHitchanceEquals(target, HitChance.High); } } }
internal static void CastJavelin(Obj_AI_Base target, string mode) { // if not harass mode ignore mana check if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode)) { if (mode != "ha" || KL.Player.ManaPercent > 65) { if (target.LSIsValidTarget(KL.Spells["Javelin"].Range)) { if (target.IsChampion()) { var qoutput = KL.Spells["Javelin"].GetPrediction(target); if (getCheckBoxItem(qHMenu, "ndhqcheck")) { switch (getBoxItem(KN.Root, "ppred")) { case 1: var pi = new PredictionInput { Aoe = false, Collision = true, Speed = 1300f, Delay = 0.25f, Range = 1500f, From = KN.Player.ServerPosition, Radius = 40f, Unit = target, Type = SkillshotType.SkillshotLine }; var po = Prediction.GetPrediction(pi); if (po.Hitchance == (SebbyLib.Prediction.HitChance) (getBoxItem(KN.Root, "ndhqch") + 3)) { KL.Spells["Javelin"].Cast(po.CastPosition); } break; case 2: var so = KL.Spells["Javelin"].GetPrediction((AIHeroClient) target); if (so.Hitchance == (HitChance) (getBoxItem(KN.Root, "ndhqch") + 3)) { KL.Spells["Javelin"].Cast(so.CastPosition); } break; case 0: var co = KL.Spells["Javelin"].GetPrediction(target); if (co.Hitchance == (HitChance) (getBoxItem(KN.Root, "ndhqch") + 3)) { KL.Spells["Javelin"].Cast(co.CastPosition); } break; } } if (qoutput.Hitchance == HitChance.Collision && KL.Smite.IsReady()) { if (getCheckBoxItem(KN.qHMenu, "qsmcol") && target.Health <= KL.CatDamage(target) * 3) { if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId)) { if (qoutput.CollisionObjects.Cast<AIHeroClient>().Any()) { return; } var obj = qoutput.CollisionObjects.Cast<Obj_AI_Minion>().ToList(); if (obj.Count == 1) { if (obj.Any(i => i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) && KL.Player.LSDistance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First()))) { KL.Spells["Javelin"].Cast(qoutput.CastPosition); return; } } } } } if (!getCheckBoxItem(qHMenu, "ndhqcheck")) KL.Spells["Javelin"].Cast(target); } else { KL.Spells["Javelin"].Cast(target); } } } } }
private void CastQE(Obj_AI_Base target) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = false, Collision = EQ.Collision, Speed = EQ.Speed, Delay = EQ.Delay, Range = EQ.Range, From = Player.ServerPosition, Radius = EQ.Width, Unit = target, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) return; Vector3 castQpos = poutput2.CastPosition; if (Player.Distance(castQpos) > Q.Range) castQpos = Player.Position.Extend(castQpos, Q.Range); if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { EQcastNow = true; Q.Cast(castQpos); } } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { EQcastNow = true; Q.Cast(castQpos); } } else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { EQcastNow = true; Q.Cast(castQpos); } } }
private void CastQ(Obj_AI_Hero target) { float distance = Vector3.Distance(BallPos, target.ServerPosition); if (E.IsReady() && Player.Mana > RMANA + QMANA + WMANA + EMANA && distance > Player.Distance(target.ServerPosition) + 300) { E.CastOnUnit(Player); return; } if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 1) { //var prepos5 = Core.Prediction.GetPrediction(target, delay, Q.Width); var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = true, Collision = Q.Collision, Speed = Q.Speed, Delay = Q.Delay, Range = float.MaxValue, From = BallPos, Radius = Q.Width, Unit = target, Type = SebbyLib.Prediction.SkillshotType.SkillshotCircle }; var prepos5 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if ((int)prepos5.Hitchance > 5 - Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex) { if (prepos5.CastPosition.Distance(prepos5.CastPosition) < Q.Range) { Q.Cast(prepos5.CastPosition); } } } else { float delay = (distance / Q.Speed + Q.Delay); var prepos = Prediction.GetPrediction(target, delay, Q.Width); if ((int)prepos.Hitchance > 5 - Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex) { if (prepos.CastPosition.Distance(prepos.CastPosition) < Q.Range) { Q.Cast(prepos.CastPosition); } } } }
public static void CastSebby(this Spell spell, Obj_AI_Base unit, HitChance hit, bool aoe2 = false) { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; if (spell.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; aoe2 = true; } if (spell.Width > 80 && !spell.Collision) { aoe2 = true; } var predInput2 = new SebbyLib.Prediction.PredictionInput { Aoe = aoe2, Collision = spell.Collision, Speed = spell.Speed, Delay = spell.Delay, Range = spell.Range, From = ObjectManager.Player.ServerPosition, Radius = spell.Width, Unit = unit, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (spell.Speed != Single.MaxValue && OktwCommon.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition)) { return; } switch (hit) { case HitChance.Low: if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Low) { spell.Cast(poutput2.CastPosition); } break; case HitChance.Medium: if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { spell.Cast(poutput2.CastPosition); } break; case HitChance.High: if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { spell.Cast(poutput2.CastPosition); } break; case HitChance.VeryHigh: if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { spell.Cast(poutput2.CastPosition); } break; case HitChance.Immobile: if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Immobile) { spell.Cast(poutput2.CastPosition); } break; } }
// Cougar W Logic internal static void CastPounce(Obj_AI_Base target, string mode) { // check the actual spell timer and if we have it enabled in our menu if (!KL.CatForm() || !KL.CanUse(KL.Spells["Pounce"], false, mode)) return; // check if target is hunted in 750 range if (!target.IsValidTarget(KL.Spells["ExPounce"].Range)) return; if (target.IsHunted()) { // get hitbox var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1; // force pounce if menu item enabled if (target.IsHunted() && KN.Root.Item("ndcwhunt").GetValue<bool>() || // or of target is greater than my attack range target.Distance(KL.Player.ServerPosition) > radius || // or is jungling or waveclearing (without farm distance check) mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue<bool>() || // or combo mode and ignoring distance check !target.IsHunted() && mode == "co" && !KN.Root.Item("ndcwdistco").GetValue<bool>()) { if (KN.Root.Item("kitejg").GetValue<bool>() && mode == "jg") { if (target.Distance(Game.CursorPos) > 600 && target.Distance(KL.Player.ServerPosition) <= 300) { KL.Spells["Pounce"].Cast(Game.CursorPos); return; } } KL.Spells["Pounce"].Cast(target.ServerPosition); } } // if target is not hunted else { // check if in the original pounce range if (target.Distance(KL.Player.ServerPosition) > KL.Spells["Pounce"].Range) return; // get hitbox var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1; // if greater than our hitbox radius pounce! if (target.Distance(KL.Player.ServerPosition) > radius || // or is jungling or waveclearing (without distance checking) mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue<bool>() || // or combo mode with no distance checking mode == "co" && !KN.Root.Item("ndcwdistco").GetValue<bool>()) { if (target.IsChampion()) { if (KN.Root.Item("ndcwcheck").GetValue<bool>()) { switch (KN.Root.Item("ppred").GetValue<StringList>().SelectedValue) { case "OKTW": PredictionInput pi; pi = new PredictionInput(); pi.Aoe = false; pi.Collision = true; pi.Speed = 1300f; pi.Delay = 0.25f; pi.Range = 1500f; pi.From = KN.Player.ServerPosition; pi.Radius = 40f; pi.Unit = target; pi.Type = SkillshotType.SkillshotLine; var po = Prediction.GetPrediction(pi); if (po.Hitchance >= (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(po.CastPosition); } break; case "SPrediction": var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero)target); if (so.HitChance >= (HitChance)(KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(so.CastPosition); } break; case "Common": var co = KL.Spells["Javelin"].GetPrediction(target); if (co.Hitchance >= (HitChance)(KN.Root.Item("ndhqch").GetValue<StringList>().SelectedIndex + 3)) { KL.Spells["Javelin"].Cast(co.CastPosition); } break; } } else KL.Spells["Pounce"].Cast(target.ServerPosition); } else { // check pouncing near enemies if (mode == "wc" && KN.Root.Item("ndcwene").GetValue<bool>() && target.ServerPosition.CountEnemiesInRange(550) > 0) return; // check pouncing under turret if (mode == "wc" && KN.Root.Item("ndcwtow").GetValue<bool>() && target.ServerPosition.UnderTurret(true)) return; KL.Spells["Pounce"].Cast(target.ServerPosition); } } } }