示例#1
0
        public static void LastHit()
        {
            var minions = MinionManager.GetMinions(Orbwalking.GetAttackRange(Player));

            if (Dmg.TalentReaper == 0)
            {
                return;
            }

            foreach (var m in minions)
            {
                if (!m.IsValidTarget(Orbwalking.GetAttackRange(Player)) || m == null)
                {
                    continue;
                }
                var range =
                    Player.GetAlliesInRange(Spells.W.Range)
                    .Where(x => !x.IsMe)
                    .Where(x => !x.IsDead)
                    .FirstOrDefault(x => x.Distance(Player.Position) <= Orbwalking.GetAttackRange(Player));

                if (Player.GetAutoAttackDamage(m, true) < m.Health || range == null || !MenuConfig.Debug)
                {
                    continue;
                }

                Chat.Print("Damage = " + (float)Player.GetAutoAttackDamage(m, true) + " | Minion Hp = " + m.Health);

                Render.Circle.DrawCircle(m.Position, 75, m.Distance(Player) <= 225f ? Color.Green : Color.Red);
            }
        }
示例#2
0
        private void Combo()
        {
            if (Menu.Item("ComboELogic", true).GetValue <bool>() && E.IsReady())
            {
                var target = TargetSelector.GetTarget(975f, TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(975f) && target.DistanceToPlayer() > Orbwalking.GetRealAutoAttackRange(Me))
                {
                    if (Utils.TickCount - CastSpellTime > 400)
                    {
                        Cast_E(target, true);
                    }
                }
            }

            if (Menu.Item("ComboQExtended", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (CheckTarget(target, QExtend.Range) && target.DistanceToPlayer() > Q.Range &&
                    (!E.IsReady() || (E.IsReady() && target.DistanceToPlayer() > 975f)))
                {
                    var pred       = QExtend.GetPrediction(target, true);
                    var collisions = MinionManager.GetMinions(Me.ServerPosition, Q.Range, MinionTypes.All,
                                                              MinionTeam.NotAlly);

                    if (!collisions.Any())
                    {
                        return;
                    }

                    foreach (var minion in collisions)
                    {
                        var poly = new Geometry.Polygon.Rectangle(Me.ServerPosition,
                                                                  Me.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                        if (poly.IsInside(pred.UnitPosition))
                        {
                            Q.Cast(minion);
                        }
                    }
                }
            }

            if (Menu.Item("ComboR", true).GetValue <bool>() && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (CheckTarget(target, R.Range) &&
                    R.GetDamage(target) * (7.5 + 7.5 * Me.AttackSpeedMod) > target.Health &&
                    target.Distance(Me) > Orbwalking.GetAttackRange(Me) + 150)
                {
                    R.Cast(target);
                }
            }
        }
示例#3
0
        private void Combo()
        {
            var itemTarget = TargetSelector.GetTarget(750, TargetSelector.DamageType.Physical);

            if (itemTarget != null)
            {
                var dmg = GetComboDamage(itemTarget);

                ItemManager.Target = itemTarget;

                if (dmg > itemTarget.Health - 50)
                {
                    ItemManager.KillableTarget = true;
                }

                ItemManager.UseTargetted = true;
            }

            if (Menu.Item("UseQExtendCombo", true).GetValue <bool>() && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical);

                if (!target.IsValidTarget(Q.Range) && target.IsValidTarget(QExtend.Range))
                {
                    var pred       = QExtend.GetPrediction(target, true);
                    var collisions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.NotAlly);

                    if (!collisions.Any() || (!target.IsMoving && Menu.Item("MovementCheck", true).GetValue <bool>()))
                    {
                        return;
                    }

                    foreach (var minion in collisions)
                    {
                        var poly = new Geometry.Polygon.Rectangle(Player.ServerPosition, Player.ServerPosition.Extend(minion.ServerPosition, QExtend.Range), QExtend.Width);

                        if (poly.IsInside(pred.UnitPosition))
                        {
                            Q.Cast(minion);
                        }
                    }
                }
            }

            if (Menu.Item("UseRCombo", true).GetValue <bool>() && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(R.Range) && !target.IsZombie && !target.IsDead &&
                    R.GetDamage(target) * GetShots() > target.Health &&
                    target.Distance(Player) > Orbwalking.GetAttackRange(Player) + 150)
                {
                    R.Cast(target);
                }
            }
        }
示例#4
0
        private void Cast_E(Obj_AI_Hero target)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }

            var castpos = Me.ServerPosition.Extend(Game.CursorPos, 220);
            var maxepos = Me.ServerPosition.Extend(Game.CursorPos, E.Range);

            if (castpos.UnderTurret(true) && Menu.Item("underE", true).GetValue <bool>())
            {
                return;
            }

            if ((NavMesh.GetCollisionFlags(castpos).HasFlag(CollisionFlags.Wall) ||
                 NavMesh.GetCollisionFlags(castpos).HasFlag(CollisionFlags.Building)) &&
                Menu.Item("ECheck", true).GetValue <bool>())
            {
                return;
            }

            if (castpos.CountEnemiesInRange(500) >= 3 && castpos.CountAlliesInRange(400) < 3 &&
                Menu.Item("SafeCheck", true).GetValue <bool>())
            {
                return;
            }

            if (Orbwalking.InAutoAttackRange(target) &&
                target.ServerPosition.Distance(castpos) < Orbwalking.GetAttackRange(Me))
            {
                E.Cast(castpos, true);
            }
            else if (!Orbwalking.InAutoAttackRange(target) && target.ServerPosition.Distance(castpos) >
                     Orbwalking.GetAttackRange(Me))
            {
                E.Cast(castpos, true);
            }
            else if (!Orbwalking.InAutoAttackRange(target) &&
                     target.ServerPosition.Distance(castpos) > Orbwalking.GetAttackRange(Me) &&
                     target.ServerPosition.Distance(maxepos) < Orbwalking.GetAttackRange(Me))
            {
                E.Cast(maxepos, true);
            }
        }
示例#5
0
文件: Program.cs 项目: geramz/PortAIO
        private static void JungleClear()
        {
            var useQ = getCheckBoxItem(jungleClearMenu, "UseQJungleClear");
            var useW = getCheckBoxItem(jungleClearMenu, "UseWJungleClear");
            var useE = getCheckBoxItem(jungleClearMenu, "UseEJungleClear");

            var orbwalkerTarget = Orbwalker.LastTarget;
            var minion          = orbwalkerTarget as Obj_AI_Minion;

            if (minion == null || minion.Team != GameObjectTeam.Neutral)
            {
                if (minion != null || !Q.IsReady())
                {
                    return;
                }

                var bestQMinion =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral)
                    .OrderByDescending(x => x.MaxHealth)
                    .FirstOrDefault();

                if (bestQMinion != null)
                {
                    Q.Cast(bestQMinion);
                }

                return;
            }

            if (useQ && Q.IsReady())
            {
                Q.Cast(minion);
            }

            if (useW && Player.LSDistance(minion) < Orbwalking.GetAttackRange(Player))
            {
                W.Cast();
            }

            if (useE && E.IsReady())
            {
                E.CastOnUnit(minion);
            }
        }
示例#6
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!IsActive())
            {
                return;
            }
            if (disableMove)
            {
                return;
            }

            Orbwalking.Move = true;

            if (MaxRangerMisc.GetMenuItem("SAssembliesMiscsMaxRangerDisable").GetValue <KeyBind>().Active ||
                (MaxRangerMisc.GetMenuItem("SAssembliesMiscsMaxRangerDisableInCombo").GetValue <bool>() &&
                 Orbwalking.Orbwalker.Instances.Any(x => x.ActiveMode == Orbwalking.OrbwalkingMode.Combo)))
            {
                return;
            }

            var enemyList = ObjectManager.Get <Obj_AI_Hero>().Where(x =>
                                                                    x.IsEnemy && x.IsValidTarget(Orbwalking.GetRealAutoAttackRange(ObjectManager.Player)) &&
                                                                    x.IsFacing(ObjectManager.Player));

            foreach (Obj_AI_Hero hero in enemyList)
            {
                if (Orbwalking.GetAttackRange(ObjectManager.Player) < Orbwalking.GetAttackRange(hero))
                {
                    continue;
                }

                var distance = hero.ServerPosition.Distance(ObjectManager.Player.ServerPosition);
                var neededAdditionalDistance = Orbwalking.GetAttackRange(hero) + ObjectManager.Player.BoundingRadius;

                if (distance < neededAdditionalDistance + 45)
                {
                    Orbwalking.Move = false;
                    var maxRangePosition = ObjectManager.Player.ServerPosition.Extend(ObjectManager.Player.ServerPosition - hero.ServerPosition + ObjectManager.Player.ServerPosition,
                                                                                      neededAdditionalDistance - distance + 95);
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, maxRangePosition);
                    //Orbwalking.MoveTo(maxRangePosition, 0, true, false, false);
                }
            }
        }
示例#7
0
        private float CalcUltimateDamage(AIHeroClient target, float resMulti, bool rangeCheck)
        {
            try
            {
                if (target == null)
                {
                    return(0);
                }

                float damage = 0;
                if (R.IsReady() && (!rangeCheck || R.IsInRange(target)))
                {
                    var rMana = R.ManaCost * resMulti;
                    if (rMana <= Player.Mana)
                    {
                        var waves = 10 + R.Level * 2 - 2;
                        if (target.Distance(Player) < 250)
                        {
                            waves -= 4;
                        }
                        if (!Utils.IsImmobile(target))
                        {
                            waves -= 3;
                            if (!Utils.IsSlowed(target))
                            {
                                waves -= 2;
                            }
                        }
                        waves = Math.Max(3, waves);
                        if (Player.Position.IsUnderTurret(false))
                        {
                            waves = target.Distance(Player) > Orbwalking.GetAttackRange(target) * 1.2f ? 1 : 0;
                        }
                        damage += R.GetDamage(target) * waves;
                    }
                }
                return(damage);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(0);
        }
示例#8
0
        public static void OnUpdate(EventArgs args)
        {
            switch (Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Items();
                Qlogic();
                if (root.Item("Fly").GetValue <bool>())
                {
                    var target = TargetSelector.GetTarget(Orbwalking.GetAttackRange(Player), TargetSelector.DamageType.Physical);
                    if (target.IsValidTarget())
                    {
                        if (Game.Time * 1000 >= Orbwalking.LastAATick + 1)
                        {
                            Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                        }
                        if (Game.Time * 1000 > Orbwalking.LastAATick + Player.AttackDelay * 1000 - 150f)
                        {
                            Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                        }
                    }
                    else
                    {
                        Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (root.Item("AutoQH").GetValue <bool>())
                {
                    Qlogic();
                }
                if (root.Item("Fly").GetValue <bool>())
                {
                    var target = Orbwalker.GetTarget();
                    if (target.IsValidTarget())
                    {
                        if (Game.Time * 1000 >= Orbwalking.LastAATick + 1)
                        {
                            Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                        }
                        if (Game.Time * 1000 > Orbwalking.LastAATick + Player.AttackDelay * 1000 - 150f)
                        {
                            Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                        }
                    }
                    else
                    {
                        Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                }

                break;
            }
            WLogic();
            RLogic();
            ELogic();
            LaneClear();
            JungleClear();
            Pots();
        }