Exemplo n.º 1
0
 private static void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (BadaoShenHelper.UseQCombo())
     {
         BadaoMainVariables.Q.Cast();
     }
 }
Exemplo n.º 2
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (BadaoMainVariables.E.IsReady() && Orbwalking.CanMove(80) && BadaoShenVariables.ComboEIfHit.GetValue <bool>())
     {
         foreach (AIHeroClient hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget() &&
                                                                 x.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) <= BadaoMainVariables.E.Range))
         {
             List <AIHeroClient> a = new List <AIHeroClient>();
             var EPred             = BadaoMainVariables.E.GetPrediction(hero);
             var EndPos            = Geometry.Extend(ObjectManager.Player.Position.To2D(), EPred.CastPosition.To2D(), 650);
             foreach (AIHeroClient hero2 in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget() &&
                                                                      x.NetworkId != hero.NetworkId &&
                                                                      x.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) <= BadaoMainVariables.E.Range))
             {
                 var PredHero2 = Prediction.GetPrediction(hero2, (hero2.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) /
                                                                  BadaoMainVariables.E.Range) * 0.3f);
                 if (hero2.Position.To2D().Distance(ObjectManager.Player.Position.To2D(), EndPos, true)
                     <= 50 + hero.BoundingRadius &&
                     PredHero2.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D(), EndPos, true)
                     <= 50 + hero.BoundingRadius)
                 {
                     a.Add(hero2);
                 }
             }
             if (a.Count() >= BadaoShenVariables.ComboEIfWillHit.GetValue <Slider>().Value + 1)
             {
                 BadaoMainVariables.E.Cast(EndPos);
             }
         }
     }
     foreach (AIHeroClient hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget() &&
                                                             x.Position.To2D().Distance(ObjectManager.Player.Position.To2D()) <= BadaoMainVariables.E.Range))
     {
         if (BadaoShenHelper.UseEComboToTarget(hero) && Orbwalking.CanMove(80))
         {
             var     PredPos = BadaoMainVariables.E.GetPrediction(hero).CastPosition.To2D();
             Vector2 CastPos = new Vector2();
             if (PredPos.Distance(ObjectManager.Player.Position.To2D()) <= 450)
             {
                 CastPos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredPos, PredPos.Distance(ObjectManager.Player.Position.To2D()) + 200);
             }
             else
             {
                 CastPos = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredPos, 650);
             }
             if (PredPos.Distance(ObjectManager.Player.Position.To2D()) <= 650)
             {
                 BadaoMainVariables.E.Cast(CastPos);
                 break;
             }
         }
     }
     if (BadaoShenHelper.UseQCombo())
     {
         foreach (AIHeroClient hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget()))
         {
             var Castpos = BadaoMainVariables.Q.GetPrediction(hero).CastPosition.To2D();
             if (Castpos.Distance(ObjectManager.Player.Position.To2D(), BadaoShenVariables.SwordPos, true)
                 <= 50 + hero.BoundingRadius)
             {
                 BadaoMainVariables.Q.Cast();
             }
         }
     }
 }