Example #1
0
        public static void CampStealer()
        {
            var jungleMinions = MinionManager.GetMinions(
                Player.ServerPosition, Q.IsReady() ? Q.Range : 760, MinionTypes.All, MinionTeam.Neutral,
                MinionOrderTypes.MaxHealth);

            if (jungleMinions != null)
            {
                foreach (var jungleMinion in
                         jungleMinions.Where(
                             minion =>
                             Q.GetHealthPrediction(minion) <
                             Q.GetDamage(minion) + Q.GetDamage(minion, 1) +
                             Player.GetSummonerSpellDamage(minion, Damage.SummonerSpell.Smite))
                         .Where(
                             jungleMinion =>
                             JungleCamps.Any(j => jungleMinion.BaseSkinName.StartsWith(j)) ||
                             SmallMinionCamps.Any(j => jungleMinion.BaseSkinName.StartsWith(j)))
                         .Where(jungleMinion => LeeUtility.MenuParamBool(jungleMinion.BaseSkinName)))
                {
                    Q.Cast(jungleMinion);
                    var backPos = Player.ServerPosition;
                    Utility.DelayAction.Add(250, () => Q.Cast());
                    var minion = jungleMinion;
                    Utility.DelayAction.Add(
                        (int)((Player.Distance(jungleMinion) - 725) / Q.Speed * 1000) + 300 + Game.Ping, () =>
                    {
                        Player.GetSummonerSpellDamage(minion, Damage.SummonerSpell.Smite);
                        LeeUtility.WardJump(backPos);
                    });
                    Player.SummonerSpellbook.CastSpell(LeeSinSharp.SmiteSlot, jungleMinion);
                }
            }
        }
Example #2
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            try
            {
                if (Config.Menu.Item("wardJump").GetValue <KeyBind>().Active)
                {
                    LeeMethods.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    LeeUtility.WardJump(Game.CursorPos);
                }

                if (SmiteSlot != SpellSlot.Unknown && Config.Menu.Item("stealCamp").GetValue <KeyBind>().Active)
                {
                    LeeMethods.CampStealer();
                }
                if (SmiteSlot != SpellSlot.Unknown && Config.Menu.Item("smiteEnabled").GetValue <KeyBind>().Active)
                {
                    LeeMethods.Smite();
                }
                //Console.WriteLine(LeeUtility.MenuParamBool("enabledKS"));
                if (Config.Menu.Item("enabledKS").GetValue <KeyBind>().Active)
                {
                    LeeMethods.KSer();
                }

                var target = SimpleTs.GetTarget(
                    LeeMethods.Q.IsReady() ? LeeMethods.Q.Range : LeeMethods.R.Range, SimpleTs.DamageType.Physical);
                LeeMethods.InsecCombo(target);
                switch (Config.Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                    LeeMethods.Combo(target);
                    break;

                case Orbwalking.OrbwalkingMode.Mixed:
                    LeeMethods.Harass(target);
                    break;

                case Orbwalking.OrbwalkingMode.LastHit:
                    break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                    LeeMethods.LaneClear();
                    break;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Example #3
0
        public static void Harass(Obj_AI_Hero targetHero, bool useW = true)
        {
            if (!targetHero.IsValidTarget())
            {
                _harassStage = HarassStage.Nothing;
                return;
            }
            switch (_harassStage)
            {
            case HarassStage.Nothing:
                _harassStage = HarassStage.Started;
                break;

            case HarassStage.Started:
                _harassStage = HarassStage.Doing;
                if (E.IsReady() &&
                    Vector3.DistanceSquared(Player.ServerPosition, targetHero.ServerPosition) <= 350 * 350 &&
                    LeeUtility.MenuParamBool("UseE1H"))
                {
                    E.Cast();
                    if (LeeUtility.MenuParamBool("UseE2H"))
                    {
                        Utility.DelayAction.Add(
                            250 - Game.Ping / 2 + 10, () =>
                        {
                            E.Cast(Player, true);
                            _harassStage = LeeUtility.MenuParamBool("UseQ1H") && Q.IsReady()
                                        ? HarassStage.Doing
                                        : HarassStage.Finished;
                        });
                    }
                }
                else
                {
                    _harassStage = HarassStage.Finished;
                }
                if (Q.IsReady() && LeeUtility.MenuParamBool("UseQ1H"))
                {
                    //LeeUtility.CastQ(targetHero, QMode.Harass);
                    if (LeeUtility.CastQ(targetHero, QMode.Harass) && LeeUtility.MenuParamBool("UseQ2H"))
                    {
                        var delay = (int)(targetHero.Distance(Player) / Q.Speed * 1000) + 300 + Game.Ping;
                        Utility.DelayAction.Add(
                            delay, () =>
                        {
                            if (Vector3.DistanceSquared(_harassInitialVector3, Player.ServerPosition) <= 600 * 600)
                            {
                                _harassInitialVector3 = Player.ServerPosition;
                            }
                            Q.Cast(targetHero);
                        });
                        Utility.DelayAction.Add(delay * 2, () => _harassStage = HarassStage.Finished);
                    }
                    else
                    {
                        _harassStage = HarassStage.Finished;
                    }
                }
                else
                {
                    _harassStage = HarassStage.Finished;
                }
                break;

            case HarassStage.Doing:
                break;

            case HarassStage.Finished:
                if (LeeUtility.MenuParamBool("UseWH") && useW)
                {
                    LeeUtility.WardJump(_harassInitialVector3, LeeUtility.MenuParamBool("UseWardWH"));
                }
                _harassStage = HarassStage.Nothing;
                break;
            }
        }
Example #4
0
        public static void InsecCombo(Obj_AI_Hero targetHero)
        {
            if (((!W.IsReady() || Items.GetWardSlot() == null) &&
                 Player.SummonerSpellbook.CanUseSpell(LeeSinSharp.FlashSlot) != SpellState.Ready) || !R.IsReady() ||
                !Q.IsReady() || Q.Instance.Name != "BlindMonkQOne")
            {
                if (Config.Menu.Item("insec1").GetValue <KeyBind>().Active ||
                    Config.Menu.Item("insec2").GetValue <KeyBind>().Active)
                {
                    Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                }
                return;
            }
            if (!targetHero.IsValidTarget())
            {
                return;
            }
            var useFlash = LeeUtility.MenuParamBool("useFlashInsec") &&
                           ((Config.Menu.Item("insecMode").GetValue <StringList>().SelectedIndex == 0 &&
                             (!W.IsReady() || Items.GetWardSlot() == null)) ||
                            (Config.Menu.Item("insecMode").GetValue <StringList>().SelectedIndex == 1 &&
                             Player.SummonerSpellbook.CanUseSpell(LeeSinSharp.FlashSlot) == SpellState.Ready));
            //Console.WriteLine(Game.Time + useFlash.ToString());
            //useFlash = true;

            var pos  = Player.ServerPosition.To2D();
            var qPos = Q.GetPrediction(targetHero);

            if (Config.Menu.Item("insec1").GetValue <KeyBind>().Active)
            {
                if (LeeUtility.CastQ(targetHero, QMode.Insec))
                {
                    var delay = (int)(Player.Distance(qPos.UnitPosition) / Q.Speed * 1000) + 300 + Game.Ping;
                    Utility.DelayAction.Add(delay, () => Q.Cast());
                    if (useFlash)
                    {
                        Utility.DelayAction.Add(
                            (int)(delay * 1.2), () =>
                        {
                            if (Vector3.DistanceSquared(targetHero.ServerPosition, Player.ServerPosition) <=
                                375 * 375)
                            {
                                R.Cast(targetHero);
                                //Console.WriteLine("casted R");
                                Utility.DelayAction.Add(
                                    200 - Game.Ping,
                                    () =>
                                    Player.SummonerSpellbook.CastSpell(
                                        LeeSinSharp.FlashSlot, LeeUtility.GetInsecVector3(targetHero, true, pos)));
                            }
                        });
                    }
                    else
                    {
                        Utility.DelayAction.Add(
                            (int)(delay * 1.1), () =>
                        {
                            var wardJumpPos = LeeUtility.GetInsecVector3(targetHero, false, pos);
                            if (Vector3.DistanceSquared(wardJumpPos, Player.ServerPosition) <= 600 * 600)
                            {
                                LeeUtility.WardJump(wardJumpPos, true, false);
                                //Utility.DelayAction.Add(300 + Game.Ping, () => LeeUtility.WardJump(wardJumpPos, true, false));
                                Utility.DelayAction.Add(
                                    250 + Game.Ping, () =>
                                {
                                    if (Vector3.DistanceSquared(wardJumpPos, Player.ServerPosition) <= 100 * 100)
                                    {
                                        R.Cast(targetHero, LeeUtility.MenuParamBool("packetCast"));
                                    }
                                });
                            }
                        });
                    }
                }
                else
                {
                    Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                }
            }
            else if (Config.Menu.Item("insec2").GetValue <KeyBind>().Active)
            {
                var insecPos   = LeeUtility.GetInsecVector3(targetHero, useFlash, pos);
                var inDistance = Player.Distance(insecPos) <= (useFlash ? 400 : 600);
                if (useFlash)
                {
                    if (inDistance &&
                        Vector3.DistanceSquared(Player.ServerPosition, targetHero.ServerPosition) <= 375 * 375)
                    {
                        R.Cast(targetHero);
                        Utility.DelayAction.Add(
                            200 - Game.Ping, () => Player.SummonerSpellbook.CastSpell(LeeSinSharp.FlashSlot, insecPos));
                        Utility.DelayAction.Add(
                            250, () =>
                        {
                            Q.Cast(targetHero);
                            var delay = (int)(Player.Distance(targetHero) / Q.Speed * 1000) + 300 + Game.Ping;
                            Utility.DelayAction.Add(delay + 500, () => Q.Cast(targetHero));
                        });
                    }
                    else
                    {
                        Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                }
                else
                {
                    if (inDistance)
                    {
                        LeeUtility.WardJump(insecPos);
                        Utility.DelayAction.Add(250 + Game.Ping, () => R.Cast(targetHero, false));
                        Utility.DelayAction.Add(
                            250, () =>
                        {
                            var delay = (int)(Player.Distance(targetHero) / Q.Speed * 1000) + 300 + Game.Ping;
                            Q.Cast(targetHero);
                            Utility.DelayAction.Add(delay + 500, () => Q.Cast(targetHero));
                        });
                    }
                    else
                    {
                        Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                }
            }
        }