예제 #1
0
        public static void OnGapcloser(Obj_AI_Hero sender, GapcloserArgs args)
        {
            if (sender.IsMe || !sender.IsEnemy || args.EndPosition.Distance(Global.Player) > 1000)
            {
                return;
            }

            if (SpellManager.W.Ready && MenuConfig.Misc["W"].Enabled)
            {
                var allyT = GameObjects.AllyTurrets.FirstOrDefault(x => x.IsValid);
                if (allyT != null && ShadowManager.CanCastFirst(SpellSlot.W))
                {
                    SpellManager.W.Cast(allyT.ServerPosition);
                }
                else
                {
                    ShadowManager.SwitchToShadows();
                }
            }

            else if (SpellManager.R.Ready)
            {
                var enemy = GameObjects.EnemyHeroes.OrderBy(x => x.Health).FirstOrDefault(x => x.IsValidTarget(SpellManager.R.Range));
                if (enemy == null)
                {
                    return;
                }

                SpellManager.R.Cast(enemy);
            }
        }
예제 #2
0
파일: Harass.cs 프로젝트: yegithub/Aimtec-2
        public static void OnUpdate()
        {
            var target = Global.TargetSelector.GetTarget(SpellManager.WCastRange + SpellManager.Q.Range);

            if (target == null || Maths.GetEnergyPercent() < MenuConfig.Harass["Energy"].Value)
            {
                return;
            }

            if (SpellManager.E.Ready && MenuConfig.Harass["E"].Enabled)
            {
                SpellManager.CastE(target);
            }

            if (SpellManager.W.Ready && target.IsValidTarget(SpellManager.WCastRange + SpellManager.E.Range))
            {
                if (ShadowManager.CanCastFirst(SpellSlot.W) && MenuConfig.Harass["W"].Enabled)
                {
                    SpellManager.CastW(target);
                }

                else if (ShadowManager.CanSwitchToShadow(SpellSlot.W) && MenuConfig.Harass["W2"].Enabled && Global.Player.HealthPercent() >= MenuConfig.Harass["Health"].Value &&
                         !target.IsUnderEnemyTurret())
                {
                    SpellManager.CastW(target, true);
                }
            }

            if (SpellManager.Q.Ready && MenuConfig.Harass["Q"].Enabled)
            {
                SpellManager.CastQ(target);
            }
        }
예제 #3
0
        public static void OnKeyPressed()
        {
            Global.Orbwalker.Move(Game.CursorPos);

            if (ShadowManager.CanCastFirst(SpellSlot.W))
            {
                SpellManager.W.Cast(Game.CursorPos);
            }
            else
            {
                SpellManager.W.Cast();
            }
        }
예제 #4
0
        public static void OnUpdate()
        {
            if (MenuConfig.LaneClear["Check"].Enabled && Global.Player.CountEnemyHeroesInRange(2000) > 0 || Maths.GetEnergyPercent() < MenuConfig.LaneClear["Energy"].Value)
            {
                return;
            }

            if (_turretTarget != null && _turret != null && MenuConfig.LaneClear["TurretFarm"].Enabled)
            {
                if (_turretTarget.IsDead)
                {
                    _turret       = null;
                    _turretTarget = null;
                }
                else
                {
                    var turretDamage = _turret.GetAutoAttackDamage(_turretTarget);
                    var playerDamage = Global.Player.GetAutoAttackDamage(_turretTarget);
                    var inAaRange    = _turretTarget.Distance(Global.Player) <= Global.Player.AttackRange + 65;

                    if (!inAaRange)
                    {
                        return;
                    }

                    if (_turretTarget.Health < playerDamage * 2 + turretDamage && _turretTarget.Health > turretDamage + playerDamage && Global.Orbwalker.CanAttack())
                    {
                        Global.Orbwalker.Attack(_turretTarget);
                    }

                    else if (SpellManager.E.Ready && _turretTarget.Health < Global.Player.GetSpellDamage(_turretTarget, SpellSlot.E) + playerDamage)
                    {
                        SpellManager.CastE(_turretTarget);
                    }
                    else if (SpellManager.Q.Ready && _turretTarget.Health < Global.Player.GetSpellDamage(_turretTarget, SpellSlot.Q) + playerDamage)
                    {
                        SpellManager.CastQ(_turretTarget);
                    }
                }
            }
            else
            {
                var minion = GameObjects.EnemyMinions.FirstOrDefault(x => x.IsValidTarget(SpellManager.Q.Range));
                if (minion == null)
                {
                    return;
                }

                if (SpellManager.Q.Ready && MenuConfig.LaneClear["Q"].Enabled)
                {
                    SpellManager.CastQ(minion, MenuConfig.LaneClear["Q"].Value);
                }

                if (SpellManager.W.Ready && MenuConfig.LaneClear["W"].Enabled)
                {
                    if (GameObjects.EnemyMinions.Count(x => x.IsValidTarget(1300)) >= 6 && Global.Player.Level >= 12 && Maths.GetEnergyPercent() >= 70)
                    {
                        if (ShadowManager.CanCastFirst(SpellSlot.W))
                        {
                            SpellManager.W.Cast(minion.ServerPosition);
                        }
                        else
                        {
                            SpellManager.W.Cast();
                        }
                    }
                }

                if (SpellManager.E.Ready && MenuConfig.LaneClear["E"].Enabled)
                {
                    SpellManager.CastE(minion, MenuConfig.LaneClear["E"].Value, true);
                }
            }
        }
예제 #5
0
        public static void OnUpdate()
        {
            var target = Global.TargetSelector.GetTarget(SpellManager.WCastRange + SpellManager.Q.Range);

            if (target == null)
            {
                return;
            }

            if (SpellManager.R.Ready &&
                target.IsValidTarget(SpellManager.R.Range) &&
                !(MenuConfig.Combo["Killable"].Enabled && Dmg.Damage(target) < target.Health))
            {
                if (target.HealthPercent() <= 25 ||
                    !MenuConfig.Combo[target.ChampionName].Enabled)
                {
                    return;
                }

                SpellManager.CastR(target);
            }

            if (SpellManager.W.Ready &&
                MenuConfig.Combo["W"].Enabled &&
                target.IsValidTarget(SpellManager.WCastRange + SpellManager.R.Range))
            {
                if (ShadowManager.CanCastFirst(SpellSlot.W))
                {
                    if (Game.TickCount - SpellManager.LastR < 1500)
                    {
                        foreach (var shadow in ShadowManager.Shadows)
                        {
                            if (shadow == null)
                            {
                                continue;
                            }

                            if (target.IsDashing())
                            {
                                SpellManager.W.Cast(target.GetDashInfo().EndPos);
                            }

                            switch (MenuConfig.Combo["Style"].Value)
                            {
                            case 0:
                                var trianglePos = target.ServerPosition + (target.ServerPosition - shadow.ServerPosition).To2D().Perpendicular().To3D().Normalized() * 350;
                                if (trianglePos.Distance(target) > SpellManager.WCastRange)
                                {
                                    goto case 1;
                                }

                                SpellManager.W.Cast(trianglePos);
                                break;

                            case 1:
                                SpellManager.W.Cast(target.ServerPosition.Extend(shadow.ServerPosition, -SpellManager.WCastRange));
                                break;

                            case 2:
                                SpellManager.W.Cast(Game.CursorPos);
                                break;
                            }
                        }
                    }

                    else if (target.IsValidTarget(SpellManager.WCastRange + 200) && ShadowManager.CanCastFirst(SpellSlot.W) && !(SpellManager.R.Ready && target.HealthPercent() > 25))
                    {
                        SpellManager.W.Cast(target.ServerPosition);
                    }
                }
                else if (ShadowManager.CanSwitchToShadow(SpellSlot.W) &&
                         ShadowManager.Shadows.FirstOrDefault().Distance(target) <= Global.Player.Distance(target) &&
                         target.Distance(Global.Player) > Global.Player.AttackRange + 65)
                {
                    SpellManager.W.Cast();
                }
            }

            else if (SpellManager.Q.Ready &&
                     MenuConfig.Combo["Q"].Enabled)
            {
                SpellManager.CastQ(target);
            }

            if (SpellManager.E.Ready &&
                MenuConfig.Combo["E"].Enabled)
            {
                SpellManager.CastE(target);
            }
        }