Example #1
0
        public static void UpdateKs()
        {
            foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range) && !x.IsZombie))
            {
                if (WKs && W.IsReady() && W.GetDamage(hero) * 2 >= hero.Health)
                {
                    W.Cast(hero);
                }
                if (RKs && R1IsReady() && R.GetDamage(hero) >= hero.Health)
                {
                    var pred = R.GetPrediction(hero);
                    if (!pred.CastPosition.IsWall() && pred.Hitchance >= HitChance.Medium)
                    {
                        R.Cast(pred.CastPosition);
                        LastUltPos = Player.Position.To2D();
                    }
                }
                if (BotrkKs && ItemData.Blade_of_the_Ruined_King.GetItem().IsReady() &&
                    ItemData.Blade_of_the_Ruined_King.GetItem().IsInRange(hero) &&
                    (Player.CalcDamage(hero, Damage.DamageType.Physical, hero.MaxHealth * 0.1) >= hero.Health ||
                     Player.CalcDamage(hero, Damage.DamageType.Physical, 100) >= hero.Health))
                {
                    ItemData.Blade_of_the_Ruined_King.GetItem().Cast(hero);
                }
                if (CutlassKs && ItemData.Bilgewater_Cutlass.GetItem().IsReady() &&
                    ItemData.Bilgewater_Cutlass.GetItem().IsInRange(hero) &&
                    (Player.CalcDamage(hero, Damage.DamageType.Magical, 100) >= hero.Health))
                {
                    ItemData.Bilgewater_Cutlass.GetItem().Cast(hero);
                }
                if (TiamatKs && (ItemData.Tiamat_Melee_Only.GetItem().IsReady() ||
                                 ItemData.Ravenous_Hydra_Melee_Only.GetItem().IsReady()))

                {
                    var pred = Prediction.GetPrediction(hero, Player.AttackCastDelay).UnitPosition;
                    if ((ItemData.Tiamat_Melee_Only.GetItem().IsInRange(pred) ||
                         ItemData.Ravenous_Hydra_Melee_Only.GetItem().IsInRange(pred)) &&
                        Player.CalcDamage(hero, Damage.DamageType.Physical,
                                          Player.TotalAttackDamage * (1 - (Player.Position.To2D().Distance(pred.To2D()) - hero.BoundingRadius) / 1000))
                        >= hero.Health)
                    {
                        if (ItemData.Tiamat_Melee_Only.GetItem().IsReady())
                        {
                            ItemData.Tiamat_Melee_Only.GetItem().Cast();
                        }
                        if (ItemData.Ravenous_Hydra_Melee_Only.GetItem().IsReady())
                        {
                            ItemData.Ravenous_Hydra_Melee_Only.GetItem().Cast();
                        }
                    }
                }
            }
            if (Player.HasBuff("talonshadowassaultbuff"))
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range, true,
                                                                                    LastUltPos.IsValid() ? LastUltPos.To3D() : default(Vector3)) && !x.IsZombie))
                {
                    if (R.GetDamage(hero) >= hero.Health)
                    {
                        if (R2IsReady())
                        {
                            R.Cast();
                        }
                        else if (HasItem())
                        {
                            CastItem();
                        }
                    }
                }
            }
        }
Example #2
0
 public static void UpdateCombo()
 {
     if (WCasted)
     {
         if (R1IsReady() && RCombo)
         {
             R.Cast();
         }
         else if (Q.IsReady() && Player.HasBuff("talonshadowassaultbuff") && !Orbwalking.CanAttack() &&
                  !HasItem() && !OutOfAA(TargetSelect(Player.BoundingRadius + Player.AttackRange + 70)))
         {
             Q.Cast();
         }
         else if (HasItem() && WCasted && (!R1IsReady() || !RCombo))
         {
             CastItem();
         }
     }
     if (W.IsReady() && WCombo)
     {
         var targetW = TargetSelect(W.Range);
         if (targetW.IsValidTarget() && !targetW.IsZombie && !OutOfAA(targetW) && !Q.IsReady() &&
             Orbwalking.CanMove(80) && !Orbwalking.CanAttack())
         {
             W.Cast(targetW);
         }
         else if (targetW.IsValidTarget() && !targetW.IsZombie && OutOfAA(targetW) &&
                  Orbwalking.CanMove(80) && (!E.IsReady() || !ECombo))
         {
             W.Cast(targetW);
         }
     }
     if (E.IsReady() && ECombo)
     {
         var targetE = TargetSelect(E.Range);
         if (targetE.IsValidTarget() && !targetE.IsZombie && OutOfAA(targetE) && Orbwalking.CanAttack())
         {
             E.Cast(targetE);
         }
         else if (targetE.IsValidTarget() && !targetE.IsZombie && OutOfAA(targetE) && !Orbwalking.CanAttack() && Orbwalking.CanMove(80))
         {
             var x = Prediction.GetPrediction(targetE, Player.AttackDelay - (Utils.GameTimeTickCount - Orbwalking.LastAATick));
             var y = Prediction.GetPrediction(Player, Player.AttackDelay - (Utils.GameTimeTickCount - Orbwalking.LastAATick));
             if (x.UnitPosition.To2D().Distance(y.UnitPosition.To2D()) > E.Range)
             {
                 E.Cast(targetE);
             }
         }
     }
     if (R1IsReady() && RCombo)
     {
         var targetR = TargetSelect(R.Range);
         if (targetR.IsValidTarget() && !targetR.IsZombie && OutOfAA(targetR) && (!E.IsReady() || !ECombo) && (!W.IsReady() || !WCombo))
         {
             R.Cast();
             LastUltPos = Player.Position.To2D();
         }
         else if (targetR.IsValidTarget() && !targetR.IsZombie && !OutOfAA(targetR) &&
                  (!W.IsReady() || !WCombo) && !Orbwalking.CanAttack() && Orbwalking.CanMove(80))
         {
             R.Cast();
             LastUltPos = Player.Position.To2D();
         }
     }
     if (Player.HasBuff("talonshadowassaultbuff") && RCombo)
     {
         var targetR2 = TargetSelect(R.Range, LastUltPos.IsValid() ? LastUltPos.To3D() : (Vector3?)null);
         if (targetR2.IsValidTarget() && !targetR2.IsZombie && targetR2.Position.To2D().Distance(LastUltPos) >= 450 &&
             (OutOfAA(targetR2) || (!OutOfAA(targetR2) && !Orbwalking.CanAttack() && Orbwalking.CanMove(80))))
         {
             if (R2IsReady())
             {
                 R.Cast();
             }
             else if (HasItem())
             {
                 CastItem();
             }
         }
     }
     if (ItemData.Blade_of_the_Ruined_King.GetItem().IsReady() || ItemData.Bilgewater_Cutlass.GetItem().IsReady() ||
         ItemData.Youmuus_Ghostblade.GetItem().IsReady())
     {
         var targetA = TargetSelect(550);
         if (targetA.IsValidTarget() && !targetA.IsZombie)
         {
             if (BotrkCombo)
             {
                 ItemData.Blade_of_the_Ruined_King.GetItem().Cast(targetA);
                 ItemData.Bilgewater_Cutlass.GetItem().Cast(targetA);
             }
             if (YoumuuCombo)
             {
                 ItemData.Youmuus_Ghostblade.GetItem().Cast(targetA);
             }
         }
     }
 }