Esempio n. 1
0
 public static void cancelUlt(Obj_AI_Hero target)
 {
     if (Player.IsChannelingImportantSpell())
     {
         LXOrbwalker.Orbwalk(target.ServerPosition, null);
     }
 }
Esempio n. 2
0
        public static void escape()
        {
            if (LXOrbwalker.CanMove())
            {
                LXOrbwalker.Orbwalk(Game.CursorPos, null);
            }

            List <Obj_AI_Hero> enemy = (from champ in ObjectManager.Get <Obj_AI_Hero>()
                                        where Player.Distance(champ.ServerPosition) < 2500 && champ.IsEnemy && champ.IsValid
                                        select champ).ToList();

            enemy.OrderBy(x => rObj.Position.Distance(x.ServerPosition));

            if (Q.IsReady() && Player.Distance(enemy.FirstOrDefault()) <= Q.Range && enemy != null &&
                Q.GetPrediction(enemy.FirstOrDefault()).Hitchance >= HitChance.High && !qFirstCreated)
            {
                Q.Cast(enemy.FirstOrDefault(), packets());
                qFirstCreated = true;
            }

            if (enemy != null && W.IsReady() && Player.Distance(enemy.FirstOrDefault()) <= W.Range)
            {
                castWEscape(enemy.FirstOrDefault());
            }
        }
Esempio n. 3
0
        private static void OnAfterAttack(Obj_AI_Base unit, Obj_AI_Base target)
        {
            if (unit.IsMe)
            {
                var useQCombo  = menu.Item("UseQCombo").GetValue <bool>();
                var useQHarass = menu.Item("UseQHarass").GetValue <bool>();

                if (unit.IsMe)
                {
                    if (menu.Item("ComboActive").GetValue <KeyBind>().Active ||
                        menu.Item("HarassActive").GetValue <KeyBind>().Active ||
                        menu.Item("HarassActiveT").GetValue <KeyBind>().Active)
                    {
                        if (Q.IsReady())
                        {
                            if (useQCombo || useQHarass)
                            {
                                Q.Cast();
                                LXOrbwalker.ResetAutoAttackTimer();
                                LXOrbwalker.Orbwalk(Game.CursorPos, target);
                            }
                        }
                    }
                }
            }
        }
Esempio n. 4
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //check if player is dead
            if (Player.IsDead)
            {
                return;
            }

            smartKS();

            if (menu.Item("escape").GetValue <KeyBind>().Active)
            {
                escape();
            }
            else if (menu.Item("ComboActive").GetValue <KeyBind>().Active)
            {
                Combo();
            }
            else if (menu.Item("insec").GetValue <KeyBind>().Active)
            {
                LXOrbwalker.Orbwalk(Game.CursorPos, null);

                if (insecTarget != null)
                {
                    insec();
                }
            }
            else if (menu.Item("qeCombo").GetValue <KeyBind>().Active)
            {
                var soilderTarget = SimpleTs.GetTarget(900, SimpleTs.DamageType.Magical);

                LXOrbwalker.Orbwalk(Game.CursorPos, null);
                castQE(soilderTarget);
            }
            else
            {
                if (menu.Item("LaneClearActive").GetValue <KeyBind>().Active)
                {
                    Farm();
                }

                if (menu.Item("HarassActive").GetValue <KeyBind>().Active)
                {
                    Harass();
                }

                if (menu.Item("HarassActiveT").GetValue <KeyBind>().Active)
                {
                    Harass();
                }

                if (menu.Item("wAtk").GetValue <bool>())
                {
                    autoATK();
                }
            }
        }
Esempio n. 5
0
        public static void shouldCancel()
        {
            if (countEnemiesNearPosition(Player.ServerPosition, 600) < 1)
            {
                var nearChamps = (from champ in ObjectManager.Get <Obj_AI_Hero>() where Player.Distance(champ.ServerPosition) <= 1375 && champ.IsEnemy select champ).ToList();
                nearChamps.OrderBy(x => x.Health);

                if (nearChamps.FirstOrDefault() != null && nearChamps.FirstOrDefault().IsValidTarget(1375))
                {
                    LXOrbwalker.Orbwalk(nearChamps.FirstOrDefault().ServerPosition, null);
                }
            }
        }
Esempio n. 6
0
        public static void attackTarget(Obj_AI_Hero target)
        {
            if (soilderCount() < 1)
            {
                return;
            }

            var tar = getNearestSoilderToEnemy(target);

            if (tar != null && Player.Distance(tar) < 800)
            {
                if (target != null && tar.Distance(target) <= 390 && canAttack())
                {
                    LXOrbwalker.Orbwalk(Game.CursorPos, target);
                }
            }
        }
Esempio n. 7
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //check if player is dead
            if (Player.IsDead)
            {
                return;
            }

            smartKS();

            if (menu.Item("escape").GetValue <KeyBind>().Active)
            {
                if (E.IsReady())
                {
                    castE(GetNearestEnemy(Player));
                }
                LXOrbwalker.Orbwalk(Game.CursorPos, null);
            }
            else if (menu.Item("ComboActive").GetValue <KeyBind>().Active)
            {
                Combo();
            }
            else
            {
                if (menu.Item("LastHitQQ").GetValue <KeyBind>().Active)
                {
                    lastHit();
                }

                if (menu.Item("LastHitQQ2").GetValue <KeyBind>().Active)
                {
                    lastHit();
                }

                if (menu.Item("HarassActive").GetValue <KeyBind>().Active)
                {
                    Harass();
                }

                if (menu.Item("HarassActiveT").GetValue <KeyBind>().Active)
                {
                    Harass();
                }
            }
        }
Esempio n. 8
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //check if player is dead
            if (Player.IsDead)
            {
                return;
            }

            if (menu.Item("panic").GetValue <KeyBind>().Active)
            {
                if (W.IsReady())
                {
                    W.Cast();
                }
                LXOrbwalker.Orbwalk(Game.CursorPos, null);
                return;
            }

            //Q grab on immobile
            autoQ();

            //Rmec
            checkRMec();

            if (menu.Item("ComboActive").GetValue <KeyBind>().Active)
            {
                Combo();
            }
            else
            {
                if (menu.Item("HarassActive").GetValue <KeyBind>().Active)
                {
                    Harass();
                }

                if (menu.Item("HarassActiveT").GetValue <KeyBind>().Active)
                {
                    Harass();
                }
            }
        }
Esempio n. 9
0
        public static void castQCannonMouse()
        {
            LXOrbwalker.Orbwalk(Game.CursorPos, null);

            if (HammerTime && !R.IsReady())
            {
                return;
            }

            if (HammerTime && R.IsReady())
            {
                R.Cast();
                return;
            }

            var lagFree = menu.Item("lagMode").GetValue <bool>();

            if (canEcd == 0 && canQcd == 0 && !HammerTime && !firstE)
            {
                var gateDis    = menu.Item("gatePlace").GetValue <Slider>().Value;
                var GateVector = Player.ServerPosition + Vector3.Normalize(Game.CursorPos - Player.ServerPosition) * gateDis;

                if (!lagFree && Q.IsReady())
                {
                    ePos = GateVector;
                    Q.Cast(Game.CursorPos, menu.Item("packet").GetValue <bool>());
                    firstE = true;
                    return;
                }
                else if (E.IsReady() && Q.IsReady())
                {
                    E.Cast(GateVector, menu.Item("packet").GetValue <bool>());
                    Q.Cast(Game.CursorPos, menu.Item("packet").GetValue <bool>());
                    return;
                }
            }
        }
Esempio n. 10
0
 public static void Orbwalk(Vector3 pos, Obj_AI_Hero target = null)
 {
     LXOrbwalker.Orbwalk(pos, target);
 }
Esempio n. 11
0
        //wardjump
        //-------------------------------------------------

        public static void wardWalk(Vector3 pos)
        {
            LXOrbwalker.Orbwalk(pos, null);
        }
Esempio n. 12
0
 public static void Orbwalk(Obj_AI_Base target)
 {
     LXOrbwalker.Orbwalk(Game.CursorPos, (target != null && LXOrbwalker.InAutoAttackRange(target)) ? target : null);
 }
Esempio n. 13
0
        private static void OrbwalkToReticle(bool force, bool w)
        {
            var closestToPlayer = new Reticle(null, -1, -1);
            var closestToMouse  = new Reticle(null, -1, -1);

            foreach (var ret in Reticles)
            {
                if (!ret.gameobj.IsValid)
                {
                    Reticles.Remove(ret);
                }
            }

            if (Reticles.Any())
            {
                if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 0) // Close to mouse
                {
                    var closestDistance = float.MaxValue;
                    var closestIndex    = int.MaxValue;

                    for (var i = 0; i < Reticles.Count(); i++)
                    {
                        var ret      = Reticles[i];
                        var distance = Vector3.Distance(ret.gameobj.Position, Game.CursorPos);
                        if (distance < closestDistance)
                        {
                            closestIndex    = i;
                            closestDistance = distance;
                        }
                        closestToMouse = Reticles[closestIndex];
                    }
                }
                else if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 1) // Close to player
                {
                    var closestDistance = float.MaxValue;
                    var closestIndex    = int.MaxValue;

                    for (var i = 0; i < Reticles.Count(); i++)
                    {
                        var ret      = Reticles[i];
                        var distance = Vector3.Distance(ret.gameobj.Position, Player.Position);
                        if (distance < closestDistance)
                        {
                            closestIndex    = i;
                            closestDistance = distance;
                        }
                        closestToPlayer = Reticles[closestIndex];
                    }
                }
            }
            else
            {
                _orbWalkPos = new Vector3();
                if (UsingLXOrbwalker)
                {
                    LXOrbwalker.CustomOrbwalkMode = false;
                }
                else if (orbwalker != null)
                {
                    orbwalker.SetOrbwalkingPoint(new Vector3());
                }
            }

            if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 0)
            {
                if (closestToMouse.CreateTime != -1)
                {
                    var qMouseDistance = Vector3.Distance(closestToMouse.gameobj.Position, Game.CursorPos);
                    var qHeroDistance  = Vector3.Distance(closestToMouse.gameobj.Position, Player.Position) - Player.BoundingRadius;
                    var canReach       = DateTime.Now.Ticks + qHeroDistance / Player.MoveSpeed < closestToMouse.ExpireTime;
                    var qMouseRadius   = Config.SubMenu("Reticle").Item("MouseRadius").GetValue <Slider>().Value;
                    var qPlayerRadius  = Config.SubMenu("Reticle").Item("PlayerRadius").GetValue <Slider>().Value;

                    if ((force || canReach) && qMouseDistance < qMouseRadius && qHeroDistance > qPlayerRadius)
                    {
                        if (UsingLXOrbwalker)
                        {
                            LXOrbwalker.CustomOrbwalkMode = true;
                            LXOrbwalker.Orbwalk(closestToMouse.gameobj.Position, LXOrbwalker.GetPossibleTarget());
                        }
                        else if (orbwalker != null)
                        {
                            orbwalker.SetOrbwalkingPoint(closestToMouse.gameobj.Position);
                        }
                    }

                    /*else
                     * {
                     *  _orbWalkPos = new Vector3();
                     *  if (UsingLXOrbwalker)
                     *  {
                     *      LXOrbwalker.CustomOrbwalkMode = false;
                     *  }
                     *  else if (orbwalker != null)
                     *  {
                     *      orbwalker.SetOrbwalkingPoint(new Vector3());
                     *  }
                     *
                     * }*/
                }
            }
            else if (Config.SubMenu("Reticle").Item("Mode").GetValue <StringList>().SelectedIndex == 1)
            {
                if (closestToMouse.CreateTime != -1)
                {
                    var qHeroDistance = Vector3.Distance(closestToPlayer.gameobj.Position, Player.Position);
                    var canReach      = DateTime.Now.Ticks + qHeroDistance / Player.MoveSpeed < closestToMouse.ExpireTime;
                    if (!canReach && w && _W.IsReady())
                    {
                        _W.Cast();
                        canReach = true;
                    }

                    var qPlayerRadius = Config.SubMenu("Reticle").Item("PlayerRadius").GetValue <Slider>().Value;
                    if ((force || canReach) && qHeroDistance > qPlayerRadius)
                    {
                        _orbWalkPos = closestToPlayer.gameobj.Position;
                        if (UsingLXOrbwalker)
                        {
                            LXOrbwalker.CustomOrbwalkMode = true;
                            LXOrbwalker.Orbwalk(closestToPlayer.gameobj.Position, LXOrbwalker.GetPossibleTarget());
                        }
                        else if (orbwalker != null)
                        {
                            orbwalker.SetOrbwalkingPoint(closestToPlayer.gameobj.Position);
                        }
                    }

                    /*else
                     * {
                     *  _orbWalkPos = new Vector3();
                     *  if (UsingLXOrbwalker)
                     *  {
                     *      LXOrbwalker.CustomOrbwalkMode = false;
                     *  }
                     *  else if (orbwalker != null)
                     *  {
                     *      orbwalker.SetOrbwalkingPoint(new Vector3());
                     *  }
                     * }*/
                }
            }
            else
            {
                _orbWalkPos = new Vector3();
                if (UsingLXOrbwalker)
                {
                    LXOrbwalker.CustomOrbwalkMode = false;
                }
                else if (orbwalker != null)
                {
                    orbwalker.SetOrbwalkingPoint(new Vector3());
                }
            }
        }
Esempio n. 14
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            var orbwalkPos = GetOrbwalkPos();
            var cursor     = Game.CursorPos;

            if (orbwalkPos != cursor &&
                (ComboActive || LaneClearActive || LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Lasthit))
            {
                LXOrbwalker.CustomOrbwalkMode = true;
                LXOrbwalker.Orbwalk(orbwalkPos, LXOrbwalker.GetPossibleTarget());
            }
            else
            {
                LXOrbwalker.CustomOrbwalkMode = false;
            }

            //Combo
            var rtarget = SimpleTs.GetTarget(2000, SimpleTs.DamageType.Physical);

            if (ComboActive)
            {
                var target = SimpleTs.GetTarget(550, SimpleTs.DamageType.Physical);
                if (target == null)
                {
                    return;
                }
                if (W.IsReady() && Config.Item("UseWC").GetValue <bool>() &&
                    ObjectManager.Player.Buffs.FirstOrDefault(
                        buff => buff.Name == "dravenfurybuff" || buff.Name == "DravenFury") == null)
                {
                    W.Cast();
                }
                if (IsFleeing(target) && Config.Item("UseEC").GetValue <bool>())
                {
                    E.Cast(target);
                }

                try
                {
                    if (Config.Item("UseRC").GetValue <bool>() && R.GetHealthPrediction(target) <= 0)
                    {
                        R.Cast(target);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    throw;
                }
            }
            //Manual cast R
            if (Config.Item("RManualCast").GetValue <KeyBind>().Active)
            {
                R.Cast(rtarget);
            }


            //Peel from melees
            if (Config.Item("EPeel").GetValue <bool>()) //Taken from ziggs(by pq/esk0r)
            {
                foreach (var pos in from enemy in ObjectManager.Get <Obj_AI_Hero>()
                         where
                         enemy.IsValidTarget() &&
                         enemy.Distance(ObjectManager.Player) <=
                         enemy.BoundingRadius + enemy.AttackRange + ObjectManager.Player.BoundingRadius &&
                         enemy.IsMelee()
                         let direction =
                             (enemy.ServerPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized()
                             let pos = ObjectManager.Player.ServerPosition.To2D()
                                       select pos + Math.Min(200, Math.Max(50, enemy.Distance(ObjectManager.Player) / 2)) * direction)
                {
                    E.Cast(pos.To3D());
                }
            }
        }