private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseWCombo() && target.BadaoIsValidTarget() && target is Obj_AI_Hero)
     {
         BadaoMainVariables.W.Cast();
     }
 }
 private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear
         || !(target is Obj_AI_Minion) || target.Team != GameObjectTeam.Neutral)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (!BadaoMissFortuneHelper.CanJungleClearMana())
         return;
     if (BadaoMissFortuneHelper.UseWJungleClear() && target.BadaoIsValidTarget())
     {
         BadaoMainVariables.W.Cast();
     }
 }
Esempio n. 3
0
 private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
     {
         return;
     }
     if (ObjectManager.Player.IsChannelingImportantSpell())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseWCombo() && target.BadaoIsValidTarget() && target is AIHeroClient)
     {
         BadaoMainVariables.W.Cast();
     }
 }
 private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear ||
         !(target is Obj_AI_Minion) || target.Team == GameObjectTeam.Neutral)
     {
         return;
     }
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
     {
         return;
     }
     if (ObjectManager.Player.IsChannelingImportantSpell())
     {
         return;
     }
     if (!BadaoMissFortuneHelper.CanLaneClearMana())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseWLaneClear() && target.BadaoIsValidTarget())
     {
         BadaoMainVariables.W.Cast();
     }
 }
Esempio n. 5
0
 private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         return;
     }
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseRCombo() && unit.IsMe &&
         target.BadaoIsValidTarget() &&
         target is AIHeroClient && BadaoMissFortuneHelper.Rdamepior() &&
         target.Health <= 0.6f * BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float   reactiontime = 0.5f;
         var     PredTarget   = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping / 1000f);
         Vector2 x1           = new Vector2();
         Vector2 x2           = new Vector2();
         Vector2 CenterPolar  = new Vector2();
         Vector2 CenterEnd    = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
                                            out CenterPolar, out CenterEnd, out x1, out x2);
         float        dis1   = PredTarget.UnitPosition.To2D().Distance(x1);
         float        dis2   = PredTarget.UnitPosition.To2D().Distance(x2);
         AIHeroClient Target = target as AIHeroClient;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
              (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
                                BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                                - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as AIHeroClient;
             BadaoMissFortuneVariables.CenterPolar       = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd         = CenterEnd;
             BadaoMissFortuneVariables.Rcount            = Utils.GameTimeTickCount;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                  (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                   (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
                                     BadaoMissFortuneHelper.RDamage(Target) * (dis1 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                                     - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as AIHeroClient;
             BadaoMissFortuneVariables.CenterPolar       = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd         = CenterEnd;
             BadaoMissFortuneVariables.Rcount            = Utils.GameTimeTickCount;
         }
     }
     if (BadaoMissFortuneHelper.UseRComboWise() && unit.IsMe &&
         target.BadaoIsValidTarget() &&
         target is AIHeroClient && BadaoMissFortuneHelper.Rdamepior() &&
         target.Health <= 0.8f * BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float   reactiontime = 1f;
         var     PredTarget   = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping / 1000f);
         Vector2 x1           = new Vector2();
         Vector2 x2           = new Vector2();
         Vector2 CenterPolar  = new Vector2();
         Vector2 CenterEnd    = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
                                            out CenterPolar, out CenterEnd, out x1, out x2);
         float        dis1   = PredTarget.UnitPosition.To2D().Distance(x1);
         float        dis2   = PredTarget.UnitPosition.To2D().Distance(x2);
         AIHeroClient Target = target as AIHeroClient;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
              (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
                                BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                                - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as AIHeroClient;
             BadaoMissFortuneVariables.CenterPolar       = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd         = CenterEnd;
             BadaoMissFortuneVariables.Rcount            = Utils.GameTimeTickCount;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                  (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                   (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
                                     BadaoMissFortuneHelper.RDamage(Target) * (dis1 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                                     - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as AIHeroClient;
             BadaoMissFortuneVariables.CenterPolar       = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd         = CenterEnd;
             BadaoMissFortuneVariables.Rcount            = Utils.GameTimeTickCount;
         }
     }
 }
 private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseRCombo() && unit.IsMe 
         && target.BadaoIsValidTarget() &&
         target is Obj_AI_Hero && BadaoMissFortuneHelper.Rdamepior() 
         && target.Health <= 0.6f*BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float reactiontime = 0.5f;
         var PredTarget = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping/1000f);
         Vector2 x1 = new Vector2();
         Vector2 x2 = new Vector2();
         Vector2 CenterPolar = new Vector2();
         Vector2 CenterEnd = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
             out CenterPolar, out CenterEnd, out x1, out x2);
         float dis1 = PredTarget.UnitPosition.To2D().Distance(x1);
         float dis2 = PredTarget.UnitPosition.To2D().Distance(x2);
         Obj_AI_Hero Target = target as Obj_AI_Hero;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
             (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
             BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime)/ 3f >= Target.Health
             - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                 (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                 (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
                 BadaoMissFortuneHelper.RDamage(Target)* (dis1 / Target.MoveSpeed + reactiontime)/3f >= Target.Health
                 - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
     }
     if (BadaoMissFortuneHelper.UseRComboWise() && unit.IsMe
         && target.BadaoIsValidTarget() &&
         target is Obj_AI_Hero && BadaoMissFortuneHelper.Rdamepior()
         && target.Health <= 0.8f * BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float reactiontime = 1f;
         var PredTarget = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping / 1000f);
         Vector2 x1 = new Vector2();
         Vector2 x2 = new Vector2();
         Vector2 CenterPolar = new Vector2();
         Vector2 CenterEnd = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
             out CenterPolar, out CenterEnd, out x1, out x2);
         float dis1 = PredTarget.UnitPosition.To2D().Distance(x1);
         float dis2 = PredTarget.UnitPosition.To2D().Distance(x2);
         Obj_AI_Hero Target = target as Obj_AI_Hero;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
             (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
             BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
             - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                 (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                 (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
                 BadaoMissFortuneHelper.RDamage(Target) * (dis1 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                 - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
     }
 }