示例#1
0
        private static void PositionHelper()
        {
            if (Player.ChampionName == "Draven" || !Config.Item("positioningAssistant").GetValue <bool>() || AIOmode == 2)
            {
                return;
            }

            if (Player.IsMelee)
            {
                Orbwalker.SetOrbwalkingPoint(new Vector3());
                return;
            }

            foreach (var enemy in Enemies.Where(enemy => enemy.IsMelee && enemy.IsValidTarget(dodgeRange) && enemy.IsFacing(Player) && Config.Item("posAssistant" + enemy.ChampionName).GetValue <bool>()))
            {
                if (Player.FlatMagicDamageMod > Player.FlatPhysicalDamageMod)
                {
                    OktwCommon.blockAttack = true;
                }

                var     points    = OktwCommon.CirclePoints(20, 200, Player.Position);
                Vector3 bestPoint = Vector3.Zero;

                foreach (var point in points)
                {
                    if (enemy.Distance(point) > dodgeRange && (bestPoint == Vector3.Zero || Game.CursorPos.Distance(point) < Game.CursorPos.Distance(bestPoint)))
                    {
                        bestPoint = point;
                    }
                }

                if (enemy.Distance(bestPoint) > dodgeRange && !bestPoint.IsWall() && !bestPoint.UnderTurret(true))
                {
                    Orbwalker.SetOrbwalkingPoint(bestPoint);
                }
                else
                {
                    var fastPoint = enemy.ServerPosition.Extend(Player.ServerPosition, dodgeRange);
                    if (!fastPoint.IsWall() && !fastPoint.UnderTurret(true) && fastPoint.CountEnemiesInRange(dodgeRange) <= Player.CountEnemiesInRange(dodgeRange))
                    {
                        Orbwalker.SetOrbwalkingPoint(fastPoint);
                    }
                }
                dodgeTime = Game.Time;
                return;
            }

            Orbwalker.SetOrbwalkingPoint(new Vector3());
            if (OktwCommon.blockAttack == true)
            {
                OktwCommon.blockAttack = false;
            }
        }
示例#2
0
        private void AxeLogic()
        {
            var t = TargetSelector.GetTarget(800, TargetSelector.DamageType.Physical);

            if (Config.Item("axeKill", true).GetValue <bool>() && t.IsValidTarget() && Player.Distance(t.Position) > 400 && Player.GetAutoAttackDamage(t) * 2 > t.Health)
            {
                Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                return;
            }
            if (axeList.Count == 0)
            {
                Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                return;
            }

            if (axeList.Count == 1)
            {
                CatchAxe(axeList.First());
                return;
            }
            else
            {
                var bestAxe = axeList.First();
                foreach (var obj in axeList)
                {
                    if (Game.CursorPos.Distance(bestAxe.Position) > Game.CursorPos.Distance(obj.Position))
                    {
                        bestAxe = obj;
                    }
                }
                CatchAxe(bestAxe);
            }
        }
示例#3
0
 private void Game_OnGameUpdate(EventArgs args)
 {
     if (Config.Item("aim", true).GetValue <bool>())
     {
         var posPred = CalculateReturnPos();
         if (posPred != Vector3.Zero)
         {
             Orbwalker.SetOrbwalkingPoint(posPred);
         }
         else
         {
             Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
         }
     }
     else
     {
         Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
     }
 }