예제 #1
0
 private static void Orbwalker_OnPreAttack(EloBuddy.AttackableUnit target, EloBuddy.SDK.Orbwalker.PreAttackArgs args)
 {
     if (EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo) && args.Target is EloBuddy.AIHeroClient && args.Target.Distance(EloBuddy.Player.Instance) > 400 && (W.IsReady() || E.IsReady() || Q.IsReady()) && BlockAA)
     {
         args.Process = false;
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: volder1/PortAIO
        private void BeforeAttack(EloBuddy.AttackableUnit unit, EloBuddy.SDK.Orbwalker.PreAttackArgs args)
        {
            if (!Q.IsReady() || !qMenu["autoQ"].Cast <CheckBox>().CurrentValue || !FishBoneActive)
            {
                return;
            }

            var t = args.Target as EloBuddy.AIHeroClient;

            if (t != null)
            {
                var realDistance = GetRealDistance(t) - 50;
                if (Program.Combo && (realDistance < GetRealPowPowRange(t) || (Player.Mana < RMANA + 20 && Player.LSGetAutoAttackDamage(t) * 3 < t.Health)))
                {
                    Q.Cast();
                }
                else if (Program.Farm && qMenu["Qharras"].Cast <CheckBox>().CurrentValue&& (realDistance > bonusRange() || realDistance < GetRealPowPowRange(t) || Player.Mana < RMANA + EMANA + WMANA + WMANA))
                {
                    Q.Cast();
                }
            }

            var minion = args.Target as EloBuddy.Obj_AI_Minion;

            if (Program.Farm && minion != null)
            {
                var realDistance = GetRealDistance(minion);

                if (realDistance < GetRealPowPowRange(minion) || Player.ManaPercent < farmMenu["Mana"].Cast <Slider>().CurrentValue)
                {
                    Q.Cast();
                }
            }
        }
예제 #3
0
파일: Vayne.cs 프로젝트: geramz/PortAIO
        private void Orbwalker_OnPreAttack(EloBuddy.AttackableUnit target, EloBuddy.SDK.Orbwalker.PreAttackArgs args)
        {
            if (args.Process)
            {
                IsWindingUp = true;
            }
            else
            {
                IsWindingUp = false;
            }
            if (R.IsReady() && EloBuddy.SDK.Orbwalker.ActiveModesFlags.HasFlag(EloBuddy.SDK.Orbwalker.ActiveModes.Combo) && UseRBool && args.Target is EloBuddy.AIHeroClient && (!(args.Target as EloBuddy.AIHeroClient).IsUnderEnemyTurret() || EloBuddy.ObjectManager.Player.IsUnderEnemyTurret()) && EloBuddy.ObjectManager.Player.CountAllyHeroesInRange(800) >= EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(800))
            {
                R.Cast();
            }
            var possible2WTarget = ValidTargets.FirstOrDefault(
                h =>
                h.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 500 &&
                h.GetBuffCount("vaynesilvereddebuff") == 2);

            if (TryToFocus2WBool && possible2WTarget.LSIsValidTarget())
            {
                EloBuddy.SDK.Orbwalker.ForcedTarget = possible2WTarget;
            }
            if (EloBuddy.ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool)
            {
                if (
                    ValidTargets.Any(
                        e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350 && e.IsMelee))
                {
                    args.Process = false;
                }
            }
            var possibleTarget = EloBuddy.SDK.TargetSelector.GetTarget(615, EloBuddy.DamageType.Physical);

            if (possibleTarget != null && args.Target is EloBuddy.Obj_AI_Minion &&
                UseQBonusOnEnemiesNotCS && EloBuddy.ObjectManager.Player.HasBuff("vaynetumblebonus"))
            {
                EloBuddy.SDK.Orbwalker.ForcedTarget = possibleTarget;
                args.Process = false;
            }
            var possibleNearbyMeleeChampion =
                ValidTargets.FirstOrDefault(
                    e => e.ServerPosition.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350);

            if (possibleNearbyMeleeChampion.LSIsValidTarget())
            {
                if (Q.IsReady() && UseQBool)
                {
                    var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(possibleNearbyMeleeChampion.ServerPosition,
                                                                                    -350);
                    if (!IsDangerousPosition(pos))
                    {
                        Q.Cast(pos);
                        args.Process = false;
                    }
                }
                if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady())
                {
                    var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers
                                                           where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName
                                                           select tuplet.Item2;
                    if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null)
                    {
                        if (
                            possibleMeleeChampionsGapclosers.Any(
                                gapcloserEntry =>
                                possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady()))
                        {
                            return;
                        }
                    }
                    if (
                        LeagueSharp.SDK.Core.Utils.MathUtils.GetWaypoints(possibleNearbyMeleeChampion)
                        .LastOrDefault()
                        .Distance(EloBuddy.ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange)
                    {
                        if (EDelaySlider > 0)
                        {
                            var thisEnemy = possibleNearbyMeleeChampion;
                            LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(possibleNearbyMeleeChampion);
                    }
                }
            }
        }