private void CastQ(AIHeroClient target) { var ext = 0; if (player.Distance(target.ServerPosition) > 400) { ext = 100; } if (Program.IsSPrediction) { var pred = Q.GetSPrediction(target); if (pred.HitChance >= HitChance.Medium) { //Console.WriteLine(1); Q.Cast(player.Position.Extend(pred.CastPosition.To3D(), player.Distance(pred.CastPosition) + ext)); } } else { var pred = Q.GetPrediction(target, true); var pos = player.Position.Extend(pred.CastPosition, player.Distance(pred.CastPosition) + ext).To3DWorld(); if (pred.CastPosition.IsValid() && target.Distance(pos) < player.Distance(target) && ((pred.Hitchance >= HitChance.Medium && player.Distance(target) < 500) || pred.Hitchance >= HitChance.High || (pred.Hitchance >= HitChance.Low && Q.CountHits(new List <Obj_AI_Base>() { target }, pos) > 0))) { //Console.WriteLine(2 + " - " + " - " + pred.Hitchance); Q.Cast(pos); } } }
public static bool DoCast(Spell spell, Obj_AI_Hero target, HitChance minHitChance, bool colisionCheck=false) { // Data.Static.Objects.ProjectLogger.WriteLog("DoCast Call"); if ((PredictionMethod==0)||((PredictionMethod==1)&&colisionCheck)) //Sebby Colision is broken...lol { var output=spell.GetPrediction(target); if (colisionCheck) if (CheckColision(output)) return false; if (minHitChance>output.Hitchance) return false; spell.Cast(output.CastPosition); return true; } if (PredictionMethod==1) { var output=SebbyLib.Prediction.Prediction.GetPrediction(target, spell.Delay); if (minHitChance>(HitChance)output.Hitchance) return false; spell.Cast(output.CastPosition); return true; } if (PredictionMethod==2) { var output=spell.GetSPrediction(target); if (colisionCheck) if (CheckColision(output)) return false; if (minHitChance>output.HitChance) return false; spell.Cast(output.CastPosition); return true; } return false; }
private void CastQHero(AIHeroClient target) { if (Program.IsSPrediction) { var pred = Q.GetSPrediction(target); if (pred.CollisionResult.Units.Count < 2) { Q.Cast(pred.CastPosition); } } else { var targQ = Q.GetPrediction(target, true); var collision = Q.GetCollision( player.Position.To2D(), new List <Vector2>() { targQ.CastPosition.To2D() }); if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) && collision.Count < 2) { Q.CastIfHitchanceEquals(target, HitChance.High); } } }
private static void BubbaKush() { Console.WriteLine("1"); if (spellR.Instance.State == SpellState.NotLearned || !spellR.Instance.IsReady()) { Console.WriteLine("2"); return; } Console.WriteLine("3"); var flashVector = GetFlashVector(); Console.WriteLine("4"); var gpUnit = GetClosestDirectEnemyUnitToPos(flashVector); Console.WriteLine("5"); var doFlash = getCheckBoxItem(mainMenu, "useFlash"); Console.WriteLine("6"); var doWardjump = getCheckBoxItem(mainMenu, "useWardjump"); Console.WriteLine("7"); var doQ = getCheckBoxItem(mainMenu, "useQ"); Console.WriteLine("8"); var qPredHc = getBoxItem(mainMenu, "useQpred") + 4; Console.WriteLine("9"); if (doQ) { Console.WriteLine("10"); if (leeHero.LSDistance(flashVector) > 425 && leeHero.LSDistance(flashVector) < ChampInfo.Q.Range + distLeeToWardjump && CanQ1()) { Console.WriteLine("11"); if (gpUnit != null) { Console.WriteLine("12"); var pred = spellQ.GetSPrediction(gpUnit as AIHeroClient); Console.WriteLine("13"); if (pred.HitChance >= (HitChance)qPredHc) { Console.WriteLine("14"); spellQ.Cast(pred.CastPosition); Console.WriteLine("15"); } } } Console.WriteLine("17"); if (spellQ2.Instance.IsReady() && spellQ2.Instance.Name.ToLower() == QSpellNames[2].ToLower()) { Console.WriteLine("16"); spellQ2.Cast(); } Console.WriteLine("18"); } Console.WriteLine("19"); if (bubbaPriorityMode == PriorityMode.Wardjump) { if (leeHero.LSDistance(flashVector) < distLeeToWardjump && CanWardJump() && doWardjump) { lastWjTickMenu = Environment.TickCount; WardJumpTo(flashVector); } else if (leeHero.LSDistance(flashVector) < 425 && leeHero.LSDistance(rTarget) < ChampInfo.R.Range && flashSlot.IsReady() && doFlash && !CanWardJump() && Environment.TickCount > lastWjTickMenu + 1200) { if (spellR.CastOnUnit(rTarget)) { leeHero.Spellbook.CastSpell(flashSlot, flashVector); } } else { if (leeHero.LSDistance(flashVector) > distLeeKickPos) { if (getCheckBoxItem(mainMenu, "moveItself")) { EloBuddy.Player.IssueOrder( GameObjectOrder.MoveTo, getBoxItem(mainMenu, "moveItselfMode") == 0 ? flashVector : Game.CursorPos); } } else { spellR.CastOnUnit(rTarget); } } } else if (bubbaPriorityMode == PriorityMode.Flash) { if (leeHero.LSDistance(flashVector) < 425 && leeHero.LSDistance(rTarget) < ChampInfo.R.Range && flashSlot.IsReady() && doFlash) { if (spellR.CastOnUnit(rTarget)) { leeHero.Spellbook.CastSpell(flashSlot, flashVector); lastFlashTickMenu = Environment.TickCount; } } else if (!flashSlot.IsReady() && leeHero.LSDistance(flashVector) < distLeeToWardjump && CanWardJump() && doWardjump && Environment.TickCount > lastFlashTickMenu + 1200) { WardJumpTo(flashVector); } else { if (leeHero.LSDistance(flashVector) > distLeeKickPos) { if (getCheckBoxItem(mainMenu, "moveItself")) { EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, getBoxItem(mainMenu, "moveItselfMode") == 0 ? flashVector : Game.CursorPos); } } else { spellR.CastOnUnit(rTarget); } } } }
public static void CastSpell(Spell QWER, Obj_AI_Base target) { if (!target.IsVisible || !target.IsHPBarRendered) { return; } 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 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); } } }