private static void SebbySpell(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 (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { QR.Cast(poutput2.CastPosition); } } else if (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QR.Cast(poutput2.CastPosition); } } else if (Menu.Item("HitChance").GetValue <StringList>().SelectedIndex == 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 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); } } }
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); }
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 void AutoHarass() { if (Player.ManaPercentage() < 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 SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; bool Aoe10 = true; 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 = m, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.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 >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } } }
private static void SebbySpell(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; } if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } }
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 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 void CastSpell(Spell QWER, Obj_AI_Base target) { if (Config.Item("PredictionMODE").GetValue <StringList>().SelectedIndex == 0) { if (QWER.Slot == SpellSlot.W) { if (Config.Item("Wpred").GetValue <StringList>().SelectedIndex == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); } else { QWER.Cast(target); } } if (QWER.Slot == SpellSlot.R) { if (Config.Item("Rpred").GetValue <StringList>().SelectedIndex == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); } else { QWER.Cast(target); } } if (QWER.Slot == SpellSlot.E) { if (Config.Item("Epred").GetValue <StringList>().SelectedIndex == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); } else { QWER.Cast(target); } } } else { SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle; 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); if (QWER.Slot == SpellSlot.W) { if (Config.Item("Wpred").GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } } else { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } } if (QWER.Slot == SpellSlot.R) { if (Config.Item("Rpred").GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } } else { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } } if (QWER.Slot == SpellSlot.E) { if (Config.Item("Epred").GetValue <StringList>().SelectedIndex == 0) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } } else { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } } } }
public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if (sender.Owner.IsMe) { if (OKTWPredictioner.Config.Item("ENABLED").GetValue <bool>() && (OKTWPredictioner.Config.Item("COMBOKEY").GetValue <KeyBind>().Active || OKTWPredictioner.Config.Item("HARASSKEY").GetValue <KeyBind>().Active)) { if (!Utility.IsValidSlot(args.Slot)) { return; } if (OKTWPredictioner.Spells[(int)args.Slot] == null) { return; } if (!OKTWPredictioner.Config.Item(String.Format("{0}{1}", ObjectManager.Player.ChampionName, args.Slot)).GetValue <bool>()) { return; } if (handleEvent[(int)args.Slot]) { args.Process = false; var enemy = TargetSelector.GetTarget(OKTWPredictioner.Spells[(int)args.Slot].Range, TargetSelector.DamageType.Physical); var QWER = OKTWPredictioner.Spells[(int)args.Slot]; if (enemy != null) { 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 = enemy, Type = CoreType2 }; var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (ShineCommon.Utility.HitchanceArray[OKTWPredictioner.Config.Item("SPREDHITC").GetValue <StringList>().SelectedIndex] == HitChance.VeryHigh) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { if (QWER.Cast(poutput2.CastPosition)) { handleEvent[(int)args.Slot] = false; } } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { if (QWER.Cast(poutput2.CastPosition)) { handleEvent[(int)args.Slot] = false; } } } else if (ShineCommon.Utility.HitchanceArray[OKTWPredictioner.Config.Item("SPREDHITC").GetValue <StringList>().SelectedIndex] == HitChance.High) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { if (QWER.Cast(poutput2.CastPosition)) { handleEvent[(int)args.Slot] = false; } } } else if (ShineCommon.Utility.HitchanceArray[OKTWPredictioner.Config.Item("SPREDHITC").GetValue <StringList>().SelectedIndex] == HitChance.Medium) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { if (QWER.Cast(poutput2.CastPosition)) { handleEvent[(int)args.Slot] = false; } } } else if (ShineCommon.Utility.HitchanceArray[OKTWPredictioner.Config.Item("SPREDHITC").GetValue <StringList>().SelectedIndex] == HitChance.Low) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Low) { if (QWER.Cast(poutput2.CastPosition)) { handleEvent[(int)args.Slot] = false; } } } } } } } }
//Combo private static void Combo() { var useQ = (Menu.Item("useQ").GetValue <bool>()); var useW = (Menu.Item("useW").GetValue <bool>()); var useE = (Menu.Item("useE").GetValue <bool>()); var useR = (Menu.Item("useR").GetValue <bool>()); var m = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (m == null || !m.IsValidTarget()) { return; } #region SebbyPrediction //SebbyPrediction SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; bool Aoe10 = true; 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 = m, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.Prediction.GetPrediction(predictioninput); if (Player.Mana > E.ManaCost + W.ManaCost + R.ManaCost) { if (useQ && Q.IsReady() && Player.Mana > Q.ManaCost && Q.IsInRange(m)) { if (m.CanMove && predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } else if (!m.CanMove) { Q.Cast(m.Position); } } if (useW && W.IsReady()) { W.Cast(m); } if (useE && E.IsReady() && E.IsInRange(m)) { E.CastOnUnit(m); } if (useR && R.IsReady() && !W.IsReady() && !E.IsReady() && m != null && E.IsInRange(m)) { R.CastOnUnit(m); } } else { if (useE && E.IsReady() && E.IsInRange(m)) { E.CastOnUnit(m); } if (useQ && Q.IsReady() && Player.Mana > Q.ManaCost && Q.IsInRange(m)) { if (m.CanMove && predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } else if (!m.CanMove) { Q.Cast(m.Position); } } if (useW && W.IsReady() && Player.Mana > W.ManaCost && W.IsInRange(m)) { W.Cast(m); } } if (Menu.Item("useIgniteInCombo").GetValue <bool>()) { if (m.Health < Player.GetSummonerSpellDamage(m, Damage.SummonerSpell.Ignite)) { Player.Spellbook.CastSpell(igniteSlot, m); } } }
//Burst public static void Oneshot() { // If player doesn't have mana don't execute the OneShot Combo if (Player.Mana < Q.ManaCost + W.ManaCost + E.ManaCost + R.ManaCost) { return; } if (Player.IsChannelingImportantSpell() || Game.Time - Rtime < 2.5 || Player.HasBuff("malzaharrsound")) { Orbwalker.SetAttack(false); Orbwalker.SetMovement(false); return; } else { Orbwalker.SetAttack(true); Orbwalker.SetMovement(true); } SebbyLib.Orbwalking.MoveTo(Game.CursorPos); var m = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (!m.IsValidTarget()) { return; } #region SebbyPrediction //SebbyPrediction SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; bool Aoe10 = true; 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 = m, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.Prediction.GetPrediction(predictioninput); // var pred = Q.GetSPrediction(m); if (Q.IsReady() && Q.IsInRange(m)) { if (m.CanMove && predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } else if (!m.CanMove) { Q.Cast(m.Position); } } if (E.IsReady() && E.IsInRange(m)) { E.CastOnUnit(m); } if (W.IsReady()) { W.Cast(m); } Player.Spellbook.CastSpell(igniteSlot, m); if (R.IsReady() && !E.IsReady() && !W.IsReady() && R.IsInRange(m)) { R.CastOnUnit(m); } }
private static void OnUpdate(EventArgs args) { if (Player.IsDead || Player.IsRecalling()) { return; } if (Player.IsChannelingImportantSpell() || Game.Time - Rtime < 2.5 || Player.HasBuff("malzaharrsound")) { Orbwalker.SetAttack(false); Orbwalker.SetMovement(false); return; } else { Orbwalker.SetAttack(true); Orbwalker.SetMovement(true); } if (E.IsReady() && Menu.Item("ksE").GetValue <bool>()) { foreach (var h in HeroManager.Enemies.Where(h => h.IsValidTarget(E.Range) && h.Health < SebbyLib.OktwCommon.GetKsDamage(h, E) + SebbyLib.OktwCommon.GetEchoLudenDamage(h))) { E.Cast(h); } } if (Q.IsReady() && Menu.Item("ksQ").GetValue <bool>()) { foreach (var h in HeroManager.Enemies.Where(h => h.IsValidTarget(Q.Range) && h.Health < SebbyLib.OktwCommon.GetKsDamage(h, Q) + SebbyLib.OktwCommon.GetEchoLudenDamage(h))) { #region SebbyPrediction //SebbyPrediction SebbyLib.Prediction.SkillshotType PredSkillShotType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; bool Aoe10 = true; 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 = h, Type = PredSkillShotType }; //SebbyPrediction END #endregion // Input = 'var predictioninput' var predpos = SebbyLib.Prediction.Prediction.GetPrediction(predictioninput); if (predpos.Hitchance >= SebbyLib.Prediction.HitChance.High) { Q.Cast(predpos.CastPosition); } } } //Combo if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo) { if (Menu.Item("DontAAInCombo").GetValue <bool>()) { Orbwalker.SetAttack(false); } else { Orbwalker.SetAttack(true); } Combo(); } //Burst if (Menu.Item("oneshot").GetValue <KeyBind>().Active) { Oneshot(); } //Lane if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.LaneClear) { Lane(); } //AutoHarass AutoHarass(); }
public static void CastTo(this Spell Spells, Obj_AI_Base target, bool AOE = false) { switch (Program.Menu.Item("SelectPred", true).GetValue <StringList>().SelectedIndex) { case 0: { var SpellPred = Spells.GetPrediction(target, AOE); if (SpellPred.Hitchance >= HitChance.VeryHigh) { Spells.Cast(SpellPred.CastPosition, true); } } break; case 1: { 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 >= SebbyLib.Prediction.HitChance.VeryHigh) { Spells.Cast(poutput2.CastPosition, true); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { Spells.Cast(poutput2.CastPosition, true); } } break; case 2: { SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine; var predInput2 = new SebbyLib.Movement.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.Movement.Prediction.GetPrediction(predInput2); if (Spells.Speed != float.MaxValue && YasuoWindWall.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition)) { return; } if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh) { Spells.Cast(poutput2.CastPosition, true); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High) { Spells.Cast(poutput2.CastPosition, true); } } break; case 3: { var hero = target as AIHeroClient; if (hero != null && hero.IsValid) { var t = hero; if (t.IsValidTarget()) { Spells.SPredictionCast(t, HitChance.VeryHigh); } } else { Spells.CastIfHitchanceEquals(target, HitChance.VeryHigh); } } break; case 4: { if (Spells.Type == SkillshotType.SkillshotCircle) { Spells.CastCircle(target); } else if (Spells.Type == SkillshotType.SkillshotLine) { Spells.CastLine(target); } else if (Spells.Type == SkillshotType.SkillshotCone) { Spells.CastCone(target); } } break; } }
internal override void Combo(int predictionMode) { var target = TargetSelector.GetTarget(this.Range, this.DamageType); var commonPrediction = true; if (target == null) { return; } switch (predictionMode) { case 0: commonPrediction = true; break; case 1: commonPrediction = false; break; } if (commonPrediction) { var prediction = Spells.Q.SpellObject.GetPrediction(target); var hitChance = HitChance.Medium; switch (AlqoholicMenu.MainMenu.Item("combo.hitchance").GetValue <StringList>().SelectedIndex) { case 0: hitChance = HitChance.Low; break; case 1: hitChance = HitChance.Medium; break; case 2: hitChance = HitChance.High; break; case 3: hitChance = HitChance.VeryHigh; break; case 4: hitChance = HitChance.Immobile; break; } if (prediction.Hitchance < hitChance) { return; } Spells.Q.Width = this.GetDynamicQWidth(target); Spells.Q.SpellObject.Cast(target); } else { const SebbyLib.Prediction.SkillshotType CoreType = SebbyLib.Prediction.SkillshotType.SkillshotCircle; var predInput = new SebbyLib.Prediction.PredictionInput { Aoe = this.Aoe, Collision = Spells.Q.Collision, Speed = Spells.Q.Speed, Delay = Spells.Q.Delay, Range = Spells.Q.Range, From = ObjectManager.Player.ServerPosition, Radius = Spells.Q.Width, Unit = target, Type = CoreType }; var poutput = SebbyLib.Prediction.Prediction.GetPrediction(predInput); switch (AlqoholicMenu.MainMenu.Item("combo.hitchance").GetValue <StringList>().SelectedIndex) { case 0: if (poutput.Hitchance >= SebbyLib.Prediction.HitChance.Low) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } break; case 1: if (poutput.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } break; case 2: if (poutput.Hitchance >= SebbyLib.Prediction.HitChance.High) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } break; case 3: if (poutput.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } else if (predInput.Aoe && poutput.AoeTargetsHitCount > 1 && poutput.Hitchance >= SebbyLib.Prediction.HitChance.High) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } break; case 4: if (poutput.Hitchance == SebbyLib.Prediction.HitChance.Immobile) { Spells.Q.SpellObject.Cast(poutput.CastPosition); } break; } } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (MenuPrediction["PredictionMODE"].GetValue <MenuList>().Index == 0) { 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 (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 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 (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 2) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } } else if (MenuPrediction["PredictionMODE"].GetValue <MenuList>().Index == 1) { if (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 0) { QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh); } return; } else if (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 1) { QWER.CastIfHitchanceEquals(target, HitChance.High); return; } else if (MenuPrediction["HitChance"].GetValue <MenuList>().Index == 2) { QWER.CastIfHitchanceEquals(target, HitChance.Medium); return; } }
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); } } }
public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args) { if (sender.Owner.IsMe) { if (getCheckBoxItem(menu, "ENABLED") && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))) { 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; } } } } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (getSliderItem("PredictionMODE") == 0) { if (getSliderItem("HitChance") == 0) { var pred = QWER.GetPrediction(target); if (pred.Hitchance >= LeagueSharp.Common.HitChance.VeryHigh) { QWER.Cast(pred.CastPosition); } return; } else if (getSliderItem("HitChance") == 1) { var pred = QWER.GetPrediction(target); if (pred.Hitchance >= LeagueSharp.Common.HitChance.High) { QWER.Cast(pred.CastPosition); } return; } else if (getSliderItem("HitChance") == 2) { var pred = QWER.GetPrediction(target); if (pred.Hitchance >= LeagueSharp.Common.HitChance.Medium) { QWER.Cast(pred.CastPosition); } return; } return; } if (getSliderItem("PredictionMODE") == 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); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (getSliderItem("HitChance") == 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 (getSliderItem("HitChance") == 1) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (getSliderItem("HitChance") == 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; return; } if (getSliderItem("PredictionMODE") == 2) { if (target is AIHeroClient && target.IsValid) { var t = target as AIHeroClient; if (getSliderItem("HitChance") == 0) { var pred = QWER.GetSPrediction(t); if (pred.HitChance >= LeagueSharp.Common.HitChance.VeryHigh) { QWER.Cast(pred.CastPosition); } return; } else if (getSliderItem("HitChance") == 1) { var pred = QWER.GetSPrediction(t); if (pred.HitChance >= LeagueSharp.Common.HitChance.High) { QWER.Cast(pred.CastPosition); } return; } else if (getSliderItem("HitChance") == 2) { var pred = QWER.GetSPrediction(t); if (pred.HitChance >= LeagueSharp.Common.HitChance.Medium) { QWER.Cast(pred.CastPosition); } return; } } else { QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High); } return; } if (getSliderItem("PredictionMODE") == 3) { SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine; bool aoe2 = false; 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); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if (getSliderItem("HitChance") == 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 (getSliderItem("HitChance") == 1) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (getSliderItem("HitChance") == 2) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } return; } if (getSliderItem("PredictionMODE") == 4) { if (target is AIHeroClient && target.IsValid) { var t = target as AIHeroClient; Cast(QWER.Slot); } else { Cast(QWER.Slot); } } }
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; } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { int predIndex = 0; HitChance hitchance = HitChance.Low; if (QWER.Slot == SpellSlot.Q) { predIndex = Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex; if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.W) { predIndex = Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex; if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.E) { predIndex = Config.Item("Epred", true).GetValue <StringList>().SelectedIndex; if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.R) { predIndex = Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex; if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } if (predIndex == 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 ((int)hitchance == 6) { 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 ((int)hitchance == 5) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 4) { if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } } else if (predIndex == 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 (poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { Console.WriteLine("AOE cast"); QWER.Cast(poutput2.CastPosition); } if ((int)hitchance == 6) { 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 ((int)hitchance == 5) { if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 4) { 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 (predIndex == 0) { QWER.CastIfHitchanceEquals(target, hitchance); } else if (predIndex == 2) { if (target is AIHeroClient && target.IsValid) { var t = target as AIHeroClient; QWER.SPredictionCast(t, hitchance); } else { QWER.CastIfHitchanceEquals(target, HitChance.High); } } else if (predIndex == 4) { PortAIO.SkillshotType CoreType2 = PortAIO.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = PortAIO.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe2 = true; } var predInput2 = new PortAIO.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 = PortAIO.Prediction.GetPrediction(predInput2); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if ((int)hitchance == 6) { if (poutput2.Hitchance >= PortAIO.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= PortAIO.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 5) { if (poutput2.Hitchance >= PortAIO.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 4) { if (poutput2.Hitchance >= PortAIO.HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } } }