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 ((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 Obj_AI_Hero && target.IsValid) { var t = target as Obj_AI_Hero; QWER.SPredictionCast(t, hitchance); } else { QWER.CastIfHitchanceEquals(target, HitChance.High); } } }
public static void CastSpell(Spell QWER, AIBaseClient target) { var predIndex = 0; var hitchance = HitChance.Low; if (QWER.Slot == SpellSlot.Q) { predIndex = Config["predmode"].GetValue <MenuList>("Qpred").Index; var QHitChance = Config["predmode"].GetValue <MenuList>("QHitChance").Index; if (QHitChance == 0) { hitchance = HitChance.VeryHigh; } else if (QHitChance == 1) { hitchance = HitChance.High; } else if (QHitChance == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.W) { predIndex = Config["predmode"].GetValue <MenuList>("Wpred").Index; var WHitChance = Config["predmode"].GetValue <MenuList>("WHitChance").Index; if (WHitChance == 0) { hitchance = HitChance.VeryHigh; } else if (WHitChance == 1) { hitchance = HitChance.High; } else if (WHitChance == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.E) { predIndex = Config["predmode"].GetValue <MenuList>("Epred").Index; var EHitChance = Config["predmode"].GetValue <MenuList>("EHitChance").Index; if (EHitChance == 0) { hitchance = HitChance.VeryHigh; } else if (EHitChance == 1) { hitchance = HitChance.High; } else if (EHitChance == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.R) { predIndex = Config["predmode"].GetValue <MenuList>("Rpred").Index; var RHitChance = Config["predmode"].GetValue <MenuList>("RHitChance").Index; if (RHitChance == 0) { hitchance = HitChance.VeryHigh; } else if (RHitChance == 1) { hitchance = HitChance.High; } else if (RHitChance == 2) { hitchance = HitChance.Medium; } } if (predIndex == 3) { if (QWER.Type == SkillshotType.Circle) { Core.PredictionAio.CCast(QWER, target, hitchance); } else if (QWER.Type == SkillshotType.Line) { Core.PredictionAio.LCast(QWER, target, hitchance); } else if (QWER.Type == SkillshotType.Cone) { Core.PredictionAio.ConeCast(QWER, target, hitchance); } else { QWER.CastIfHitchanceMinimum(target, hitchance); } } else if (predIndex == 2) { if (target is AIHeroClient) { QWER.SPredictionCast(target as AIHeroClient, hitchance); } else { QWER.CastIfHitchanceMinimum(target, hitchance); } } else if (predIndex == 1) { var aoe = false; if (QWER.Type == SkillshotType.Circle) { aoe = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe = true; } var predInput = new SpellPrediction.PredictionInput { Aoe = aoe, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.PreviousPosition, RangeCheckFrom = Player.PreviousPosition, Radius = QWER.Width, Unit = target, Type = QWER.Type }; var predOutput = SpellPrediction.GetPrediction(predInput); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.PreviousPosition, predOutput.CastPosition)) { return; } if (predOutput.Hitchance >= hitchance) { QWER.Cast(predOutput.CastPosition); } if (Game.Time - DrawSpellTime > 0.5) { DrawSpell = QWER; DrawSpellTime = Game.Time; } DrawSpellPos = predOutput; } else if (predIndex == 0) { QWER.CastIfHitchanceMinimum(target, hitchance); } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { int predIndex = 0; HitChance hitchance = HitChance.Low; if (QWER.Slot == SpellSlot.Q) { predIndex = MainMenu.Item("Qpred", true).GetValue <StringList>().SelectedIndex; if (MainMenu.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (MainMenu.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (MainMenu.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.W) { predIndex = MainMenu.Item("Wpred", true).GetValue <StringList>().SelectedIndex; if (MainMenu.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (MainMenu.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (MainMenu.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.E) { predIndex = MainMenu.Item("Epred", true).GetValue <StringList>().SelectedIndex; if (MainMenu.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (MainMenu.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (MainMenu.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } else if (QWER.Slot == SpellSlot.R) { predIndex = MainMenu.Item("Rpred", true).GetValue <StringList>().SelectedIndex; if (MainMenu.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 0) { hitchance = HitChance.VeryHigh; } else if (MainMenu.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 1) { hitchance = HitChance.High; } else if (MainMenu.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 2) { hitchance = HitChance.Medium; } } if (predIndex == 0) { var predInput2 = new PredictionInput { Aoe = false, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = QWER.Type }; var poutput2 = Prediction.GetPrediction(predInput2); if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition)) { return; } if ((int)hitchance == 6) { if (poutput2.Hitchance >= HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 5) { if (poutput2.Hitchance >= HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if ((int)hitchance == 4) { if (poutput2.Hitchance >= HitChance.Medium) { QWER.Cast(poutput2.CastPosition); } } if (Game.Time - DrawSpellTime > 0.5) { DrawSpell = QWER; DrawSpellTime = Game.Time; } DrawSpellPos = poutput2; } else if (predIndex == 1) { var predInput2 = new PredictionInput { Aoe = false, Collision = QWER.Collision, Speed = QWER.Speed, Delay = QWER.Delay, Range = QWER.Range, Slot = QWER.Slot, From = Player.ServerPosition, Radius = QWER.Width, Unit = target, Type = QWER.Type }; var poutput2 = Prediction.GetPrediction(predInput2); if (poutput2.Hitchance >= HitChance.Low && poutput2.Hitchance <= HitChance.VeryHigh) { var prediction = AIPrediction.GetPrediction(predInput2); if (Game.Time - DrawSpellTime > 0.5) { DrawSpell = QWER; DrawSpellTime = Game.Time; } DrawSpellPos = poutput2; switch (QWER.Slot) { case SpellSlot.Q: { var targetPrediction = MainMenu.Item("QHitChanceAI", true).GetValue <Slider>().Value / 100.0f; if (prediction.HitchanceFloat > targetPrediction) { QWER.Cast(prediction.CastPosition); return; } break; } case SpellSlot.W: { var targetPrediction = MainMenu.Item("WHitChanceAI", true).GetValue <Slider>().Value / 100.0f; if (prediction.HitchanceFloat > targetPrediction) { QWER.Cast(prediction.CastPosition); return; } break; } case SpellSlot.E: { var targetPrediction = MainMenu.Item("EHitChanceAI", true).GetValue <Slider>().Value / 100.0f; if (prediction.HitchanceFloat > targetPrediction) { QWER.Cast(prediction.CastPosition); return; } break; } case SpellSlot.R: { var targetPrediction = MainMenu.Item("RHitChanceAI", true).GetValue <Slider>().Value / 100.0f; if (prediction.HitchanceFloat > targetPrediction) { QWER.Cast(prediction.CastPosition); return; } break; } default: { return; } } } if (poutput2.Hitchance == HitChance.Immobile || poutput2.Hitchance == HitChance.Dashing) { QWER.Cast(poutput2.CastPosition); } } }
private static void Orbwalker_OnAction(object sender, OrbwalkerActionArgs args) { if (args.Type == OrbwalkerType.BeforeAttack) { if (Combo && Config["extraSet"].GetValue <MenuBool>("comboDisableMode").Enabled) { var t = args.Target as AIHeroClient; if (t != null && 4 * Player.GetAutoAttackDamage(t) < t.Health - OktwCommon.GetIncomingDamage(t) && !t.HasBuff("LuxIlluminatingFraulein") && !Player.HasBuff("sheen")) { args.Process = false; } } if (!Player.IsMelee && Config["extraSet"].GetValue <MenuBool>("collAA").Enabled&& OktwCommon.CollisionYasuo(Player.PreviousPosition, args.Target.Position)) { args.Process = false; } if (Orbwalker.ActiveMode == OrbwalkerMode.Harass && Config["extraSet"].GetValue <MenuBool>("supportMode").Enabled) { if (args.Target.Type == GameObjectType.AIMinionClient) { args.Process = false; } } } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 1) { Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine; bool aoe2 = false; if (QWER.Type == SkillshotType.SkillshotCircle) { CoreType2 = Core.SkillshotType.SkillshotCircle; aoe2 = true; } if (QWER.Width > 80 && !QWER.Collision) { aoe2 = true; } var predInput2 = new Core.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 = Core.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 >= Core.HitChance.VeryHigh) { QWER.Cast(poutput2.CastPosition); } else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= Core.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1) { if (poutput2.Hitchance >= Core.HitChance.High) { QWER.Cast(poutput2.CastPosition); } } else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2) { if (poutput2.Hitchance >= Core.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); } } }