Exemplo n.º 1
0
        static void Combo()
        {
            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                var Qtarget = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical, true);

                if (Q.CanCast(Qtarget))
                {
                    Q.SPredictionCast(Qtarget, Q.MinHitChance);
                }
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>())
            {
                var Wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true);

                if (W.CanCast(Wtarget))
                {
                    W.SPredictionCast(Wtarget, W.MinHitChance);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>())
            {
                foreach (var Rtarget in HeroManager.Enemies.Where(x => R.CanCast(x)))
                {
                    if (R.CanCast(Rtarget) && !Rtarget.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)))
                    {
                        R.CastIfWillHit(Rtarget, 2);
                    }
                }
            }
        }
Exemplo n.º 2
0
        static void Combo()
        {
            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                QSwitchForUnit(TargetSelector.GetTarget(GetQActiveRange + 30, TargetSelector.DamageType.Physical, true));
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>())
            {
                var Wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true);

                if (W.CanCast(Wtarget) && !Wtarget.IsValidTarget(DefaultRange / 3) && W.GetPrediction(Wtarget).Hitchance >= HitChance.VeryHigh)
                {
                    W.Cast(Wtarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseE", true).GetValue <Boolean>() && E.IsReady())
            {
                var Etarget = E_GetBestTarget();

                if (E.CanCast(Etarget))
                {
                    E.Cast(Etarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>() && R.IsReady() && WLastCastedTime + 1.0 < Game.ClockTime)
            {
                foreach (Obj_AI_Hero Rtarget in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range) && !x.IsValidTarget(DefaultRange) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability) && R.GetPrediction(x).Hitchance >= HitChance.High && Utility.GetAlliesInRange(x, 800).Where(ally => !ally.IsMe).Count() <= 1))
                {
                    if (R.CanCast(Rtarget) && !Player.IsWindingUp)
                    {
                        var    dis        = Player.Distance(Rtarget.ServerPosition);
                        double predhealth = HealthPrediction.GetHealthPrediction(Rtarget, (int)(R.Delay + dis / R.Speed) * 1000) + Rtarget.HPRegenRate;

                        if (Rtarget.IsValidTarget(DefaultRange))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true) * 2;
                        }
                        else
                        if (Rtarget.IsValidTarget(GetQActiveRange - 50))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true);
                        }

                        if (CollisionCheck(Player, Rtarget, R.Width))
                        {
                            if (predhealth <= R.GetDamage(Rtarget))
                            {
                                R.Cast(Rtarget);
                                break;
                            }
                        }
                        else
                        if (predhealth <= R.GetDamage(Rtarget) * 0.8)
                        {
                            foreach (Obj_AI_Hero ExplosionTarget in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range)))
                            {
                                if (R.GetPrediction(ExplosionTarget).Hitchance >= HitChance.High && CollisionCheck(Player, ExplosionTarget, R.Width) && Rtarget.IsValidTarget(224, true, ExplosionTarget.ServerPosition))
                                {
                                    R.Cast(ExplosionTarget);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        static void Combo()
        {
            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                QSwitchForUnit(TargetSelector.GetTarget(GetQActiveRange + 30, TargetSelector.DamageType.Physical, true));
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>())
            {
                var Wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true);

                if (W.CanCast(Wtarget) && !Wtarget.IsValidTarget(DefaultRange / 3) && W.GetPrediction(Wtarget).Hitchance >= HitChance.VeryHigh)
                {
                    W.Cast(Wtarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseE", true).GetValue <Boolean>())
            {
                var Etarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, false);

                if (E.CanCast(Etarget) && !Etarget.HasBuffOfType(BuffType.SpellImmunity) && E.GetPrediction(Etarget).Hitchance >= HitChance.VeryHigh && Etarget.IsMoving)
                {
                    E.Cast(Etarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>())
            {
                foreach (Obj_AI_Hero Rtarget in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget(R.Range) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability)))
                {
                    var Rpred = R.GetPrediction(Rtarget);

                    if (R.CanCast(Rtarget) && Rpred.Hitchance >= HitChance.VeryHigh)
                    {
                        var    dis        = Player.Distance(Rpred.CastPosition);
                        double predhealth = HealthPrediction.GetHealthPrediction(Rtarget, (int)(R.Delay + dis / R.Speed) * 1000);

                        double RMinDamage = 75 + (50 * R.Level) + (Player.FlatPhysicalDamageMod * 0.5);
                        double RMaxDamage = RMinDamage * 2;

                        double RrangeDamage = RMaxDamage * ((dis / 1200) * 100);

                        if (RrangeDamage < RMinDamage)
                        {
                            RrangeDamage = RMinDamage;
                        }
                        else if (RrangeDamage > RMaxDamage)
                        {
                            RrangeDamage = RMaxDamage;
                        }

                        double RbonusDamage = ((20 + (5 * R.Level)) / 100) * (Rtarget.MaxHealth - Rtarget.Health);

                        var RDamage     = RrangeDamage + RbonusDamage;
                        var RCalcDamage = Damage.CalcDamage(Player, Rtarget, Damage.DamageType.Physical, RDamage);

                        if (Rtarget.IsValidTarget(GetQActiveRange))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true) * 2;
                        }

                        if (predhealth <= RCalcDamage && !Player.IsWindingUp)
                        {
                            if (CollisionCheck(Player, Rpred.CastPosition, 50))
                            {
                                R.Cast(Rtarget);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        static void Combo()
        {
            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                QSwitchForUnit(TargetSelector.GetTarget(GetQActiveRange + 30, TargetSelector.DamageType.Physical, true));
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>())
            {
                var Wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true);

                if (W.CanCast(Wtarget) && !Wtarget.IsValidTarget(DefaultRange / 3) && W.GetPrediction(Wtarget).Hitchance >= HitChance.VeryHigh && aaKillunableCheck(Wtarget))
                {
                    W.Cast(Wtarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseE", true).GetValue <Boolean>())
            {
                var Etarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, false);

                if (E.CanCast(Etarget) && !Etarget.HasBuffOfType(BuffType.SpellImmunity) && E.GetPrediction(Etarget).Hitchance >= HitChance.VeryHigh && aaKillunableCheck(Etarget))
                {
                    E.Cast(Etarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>() && R.IsReady() && WLastCastedTime + W.Delay + 0.2 < Game.ClockTime)
            {
                foreach (Obj_AI_Hero Rtarget in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget(R.Range) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability)))
                {
                    var Rpred = R.GetPrediction(Rtarget);

                    if (R.CanCast(Rtarget) && Rpred.Hitchance >= HitChance.High && !Player.IsWindingUp && aaKillunableCheck(Rtarget))
                    {
                        var    dis        = Player.Distance(Rpred.UnitPosition);
                        double predhealth = HealthPrediction.GetHealthPrediction(Rtarget, (int)(R.Delay + dis / R.Speed) * 1000) + Rtarget.HPRegenRate;

                        if (Rtarget.IsValidTarget(DefaultRange))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true) * 2;
                        }
                        else
                        if (Rtarget.IsValidTarget(GetQActiveRange - 50))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true);
                        }

                        if (CollisionCheck(Player, Rpred.UnitPosition, R.Width))
                        {
                            if (predhealth <= R.GetDamage(Rtarget))
                            {
                                R.Cast(Rtarget);
                                break;
                            }
                        }
                        else
                        if (predhealth <= R.GetDamage(Rtarget) * 0.8)
                        {
                            foreach (Obj_AI_Hero ExplosionTarget in ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget(R.Range)))
                            {
                                var pred = R.GetPrediction(ExplosionTarget);

                                if (pred.Hitchance >= HitChance.High && CollisionCheck(Player, pred.UnitPosition, R.Width) && Rtarget.IsValidTarget(235, true, ExplosionTarget.ServerPosition))
                                {
                                    R.Cast(ExplosionTarget);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }