Exemple #1
0
        public static bool LogicReturn(bool w2 = false)
        {
            var enemiesBeingE =
                EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget(E.Range) && IsBeingE(t))
                .ToArray();

            if (enemiesBeingE.Any())
            {
                return(false);
            }

            if (!enemiesBeingE.Any() && E.IsReady() && Player.Instance.CountEnemiesInRange(E.Range) > 0)
            {
                return(false);
            }

            var enemiesNearLastPosition    = LastWPosition.CountEnemiesInRange(Player.Instance.AttackRange);
            var enemiesNearCurrentPosition = Player.Instance.CountEnemiesInRange(Player.Instance.AttackRange);
            var alliesNearLastPosition     = LastWPosition.CountAlliesInRange(Player.Instance.AttackRange);
            var alliesNearCurrentPosition  = Player.Instance.CountAlliesInRange(Player.Instance.AttackRange);

            if (enemiesNearCurrentPosition < enemiesNearLastPosition ||
                alliesNearCurrentPosition > alliesNearLastPosition ||
                !Player.Instance.IsUnderTurret() && LastWPosition.IsUnderTurret())
            {
                return(false);
            }

            if (w2)
            {
                if (RReturn.IsReady() &&
                    Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() != "leblancslidereturnm")
                {
                    RReturn.Cast();
                    return(true);
                }
                return(false);
            }

            if (WReturn.IsReady() &&
                Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
            {
                WReturn.Cast();
                return(true);
            }
            return(false);
        }
Exemple #2
0
        /// <summary>
        /// Called whenever the game is being runned.
        /// </summary>
        /// <param name="args"></param>
        private static void Game_OnUpdate(System.EventArgs args)
        {
            if (Config.MiscMenu["pet"].Cast <CheckBox>().CurrentValue)
            {
                Pet.MovePet();
            }
            if (Config.KillStealMenu["toggle"].Cast <CheckBox>().CurrentValue)
            {
                if (!LastWEndPosition.IsZero &&
                    Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslide")
                {
                    LastWEndPosition = Vector3.Zero;
                }
                if (!LastWUltimateEndPosition.IsZero &&
                    Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidem")
                {
                    LastWUltimatePosition = Vector3.Zero;
                }
                if (Modes.KillSteal.ResetW && Player.Instance.ServerPosition.IsInRange(LastWEndPosition, 100))
                {
                    if (!E.IsReady())
                    {
                        var eEnemies =
                            EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget(E.Range) && Extension.IsBeingE(t))
                            .ToArray();

                        if (eEnemies.Any())
                        {
                            var shouldUse = eEnemies.Any(t => LastWPosition.Distance(t) <= E.Range);

                            if (!shouldUse)
                            {
                                return;
                            }

                            if (WReturn.IsReady() &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                            {
                                WReturn.Cast();
                                LastWEndPosition = Vector3.Zero;
                                KillSteal.ResetW = false;
                                return;
                            }
                        }
                        else
                        {
                            if (WReturn.IsReady() &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                            {
                                WReturn.Cast();
                                LastWEndPosition       = Vector3.Zero;
                                Modes.KillSteal.ResetW = false;
                                return;
                            }
                        }
                    }

                    if (WReturn.IsReady() &&
                        Player.Instance.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "leblancslidereturn")
                    {
                        WReturn.Cast();
                        LastWEndPosition       = Vector3.Zero;
                        Modes.KillSteal.ResetW = false;
                        return;
                    }
                }
                if (Modes.KillSteal.ResetW && Player.Instance.ServerPosition.IsInRange(LastWUltimateEndPosition, 100))
                {
                    if (!E.IsReady())
                    {
                        var eEnemies =
                            EntityManager.Heroes.Enemies.Where(t => t.IsValidTarget(E.Range) && Extension.IsBeingE(t))
                            .ToArray();

                        if (eEnemies.Any())
                        {
                            var shouldUse = eEnemies.Any(t => LastWUltimatePosition.Distance(t) <= E.Range);

                            if (!shouldUse)
                            {
                                return;
                            }

                            if (RReturn.IsReady() &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                            {
                                RReturn.Cast();
                                LastWEndPosition = Vector3.Zero;
                                KillSteal.ResetW = false;
                                return;
                            }
                        }
                        else
                        {
                            if (RReturn.IsReady() &&
                                Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                            {
                                RReturn.Cast();
                                LastWUltimateEndPosition = Vector3.Zero;
                                Modes.KillSteal.ResetW   = false;
                                return;
                            }
                        }
                    }


                    if (RReturn.IsReady() &&
                        Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name.ToLower() == "leblancslidereturnm")
                    {
                        RReturn.Cast();
                        LastWUltimateEndPosition = Vector3.Zero;
                        Modes.KillSteal.ResetW   = false;
                        return;
                    }
                }
                Modes.KillSteal.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Modes.Combo.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Modes.Harass.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                Modes.LaneClear.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Modes.JungleClear.Execute();
            }
        }