Пример #1
0
        /// <summary>
        /// This event is triggered every tick of the game
        /// </summary>
        /// <param name="args"></param>
        ///



        private static void Game_OnTick(EventArgs args)
        {
            if (Extensions.doubleClickReset <= Environment.TickCount && Extensions.clickCount != 0)
            {
                Extensions.doubleClickReset = float.MaxValue;
                Extensions.clickCount       = 0;
            }

            if (Extensions.clickCount >= 2)
            {
                Extensions.resetTime       = Environment.TickCount + 3000;
                Extensions.ClicksecEnabled = true;
                Extensions.InsecClickPos   = Game.CursorPos;
                Extensions.clickCount      = 0;
            }


            if (Extensions.passiveTimer <= Environment.TickCount)
            {
                Extensions.PassiveStacks = 0;
            }

            if (Extensions.resetTime <= Environment.TickCount && !InsecMenu.GetKeyBindValue("insec") &&
                Extensions.ClicksecEnabled)
            {
                Extensions.ClicksecEnabled = false;
            }

            if (Extensions.q2Timer <= Environment.TickCount)
            {
                Extensions.q2Done = false;
            }

            if (myHero.IsDead || MenuGUI.IsChatOpen || myHero.IsRecalling())
            {
                return;
            }


            if ((InsecMenu.GetCheckBoxValue("insecMode") ? TargetSelector.SelectedTarget
                     : TargetSelector.GetTarget(SpellsManager.Q.Range, DamageType.Physical)) == null)
            {
                Extensions.insecComboStep = Extensions.InsecComboStepSelect.None;
            }

            if (ComboMenu.GetKeyBindValue("starCombo"))
            {
                WardCombo.Execute();
            }

            if (MiscMenu.GetCheckBoxValue("igniteks"))
            {
                var newTarget = TargetSelector.GetTarget(600, DamageType.True);

                if (newTarget != null && SpellsManager.igniteSlot != SpellSlot.Unknown &&
                    myHero.Spellbook.CanUseSpell(SpellsManager.igniteSlot) == SpellState.Ready &&
                    ObjectManager.Player.GetSummonerSpellDamage(newTarget, DamageLibrary.SummonerSpells.Ignite) > newTarget.Health)
                {
                    myHero.Spellbook.CastSpell(SpellsManager.igniteSlot, newTarget);
                }
            }

            if (InsecMenu.GetKeyBindValue("insec") && SpellsManager.R.IsReady())
            {
                if (InsecMenu.GetCheckBoxValue("insecorbw"))
                {
                    Extensions.Orbwalk(Game.CursorPos);
                }

                var newTarget = InsecMenu.GetCheckBoxValue("insecMode") ? TargetSelector.SelectedTarget : TargetSelector.GetTarget(SpellsManager.Q.Range, DamageType.Physical);

                if (newTarget != null)
                {
                    Insec.InsecCombo(newTarget);
                }
            }
            else
            {
                Extensions.isNullInsecPos = true;
                Extensions.wardJumped     = false;
            }

            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Extensions.insecComboStep = Extensions.InsecComboStepSelect.None;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                LaneClear.Execute();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                JungleClear.Execute();
            }

            Killsteal.Execute();


            if (WardJumpMenu.GetKeyBindValue("wardjump"))
            {
                WardJumper.WardjumpToMouse();
            }

            if (InsecMenu.GetKeyBindValue("insecflash"))
            {
                Extensions.Orbwalk(Game.CursorPos);

                var target = TargetSelector.GetTarget(SpellsManager.R.Range, DamageType.Physical);
                if (target == null)
                {
                    return;
                }

                if (SpellsManager.R.IsReady() && !target.IsZombie &&
                    SpellsManager.Flash.IsReady() &&
                    target.IsValidTarget(SpellsManager.R.Range))
                {
                    SpellsManager.R.Cast(target);
                }
            }


            if (!ComboMenu.GetCheckBoxValue("rkickkill") || !SpellsManager.R.IsReady())
            {
                return;
            }

            AIHeroClient t =
                EntityManager.Heroes.Enemies.Find(
                    e =>
                    e.IsValidTarget(SpellsManager.Q.Range + SpellsManager.W.Range) && !e.IsDead && !e.IsZombie &&
                    e.Distance(Game.CursorPos) < e.Distance(ObjectManager.Player.Position) &&

                    !e.IsValidTarget(myHero.GetAutoAttackRange(null) + 65) && e.Health < e.MaxHealth * 0.14);

            if (t == null)
            {
                return;
            }

            foreach (var enemy in EntityManager.Heroes.Enemies.Where(e => e.Distance(t.Position) < 800 && e.NetworkId != t.NetworkId && ObjectManager.Player.Distance(e) < ObjectManager.Player.Distance(t)))
            {
                toPolygon = new Geometry2.Rectangle(t.Position.To2D(), t.Position.To2D().Extend(ObjectManager.Player.Position.To2D(), 800), 100).ToPolygon();
                toPolygon.Draw(Color.Blue, 3);

                if (toPolygon.IsInside(enemy.Position.To2D()))
                {
                    SpellsManager.R.Cast(enemy);
                }
            }


            if (ComboMenu.GetCheckBoxValue("rkick"))
            {
                float leeSinRKickDistance = 700;
                float leeSinRKickWidth    = 100;
                var   minREnemies         = ComboMenu.GetSliderValue("rkickcount");
                foreach (var enemy in EntityManager.Heroes.Enemies)
                {
                    var startPos  = enemy.ServerPosition;
                    var endPos    = myHero.ServerPosition.Extend(startPos, myHero.Distance(enemy) + leeSinRKickDistance);
                    var rectangle = new Geometry.Polygon.Rectangle(startPos, endPos, leeSinRKickWidth);

                    if (EntityManager.Heroes.Enemies.Count(x => rectangle.IsInside(x)) >= minREnemies)
                    {
                        SpellsManager.R.Cast(enemy);
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Normal drawings
        /// </summary>
        /// <param name="args"></param>
        private static void Drawing_OnDraw(EventArgs args)
        {
            var newTarget = InsecMenu.GetCheckBoxValue("insecMode") ? TargetSelector.SelectedTarget : TargetSelector.GetTarget(Q.Range, DamageType.Physical);


            if (Extensions.ClicksecEnabled && InsecMenu.GetCheckBoxValue("clickInsec"))
            {
                Drawing.DrawCircle(Extensions.InsecClickPos, 100, Color.DeepSkyBlue);
            }

            var playerPos = Drawing.WorldToScreen(ObjectManager.Player.Position);

            if (InsecMenu.GetKeyBindValue("insecflash"))
            {
                Drawing.DrawText(playerPos.X - 55, playerPos.Y + 40, Color.Yellow, "Flash Insec enabled");
            }

            if (DrawingsMenu.GetCheckBoxValue("drawinseclines") && R.IsReady())
            {
                if (newTarget != null && newTarget.IsVisible && newTarget.IsValidTarget() && !newTarget.IsDead && myHero.Distance(newTarget) < 3000)
                {
                    Vector2 targetPos = Drawing.WorldToScreen(newTarget.Position);
                    Drawing.DrawLine(
                        Extensions.InsecLinePos.X,
                        Extensions.InsecLinePos.Y,
                        targetPos.X,
                        targetPos.Y,
                        3,
                        Color.Gold);

                    Drawing.DrawText(
                        Drawing.WorldToScreen(newTarget.Position).X - 40,
                        Drawing.WorldToScreen(newTarget.Position).Y + 10,
                        Color.White,
                        "Selected Target");

                    Drawing.DrawCircle(Extensions.GetInsecPos(newTarget), 100, Color.DeepSkyBlue);
                }
            }

            if (!DrawingsMenu.GetCheckBoxValue("drawsenabled"))
            {
                return;
            }



            if (WardJumpMenu.GetKeyBindValue("wardjump") && DrawingsMenu.GetCheckBoxValue("drawwardjump"))
            {
                Drawing.DrawCircle(Extensions.JumpPos.To3D(), 20, Color.Red);
                Drawing.DrawCircle(myHero.Position, 600, Color.Red);
            }
            var readyDraw = DrawingsMenu.GetCheckBoxValue("readyDraw");

            if (DrawingsMenu.GetCheckBoxValue("qDraw") && readyDraw ? Q.IsReady() : DrawingsMenu.GetCheckBoxValue("qDraw"))
            {
                Circle.Draw(QColorSlide.GetSharpColor(), Q.Range, 1f, Player.Instance);
            }

            if (DrawingsMenu.GetCheckBoxValue("wDraw") && readyDraw ? W.IsReady() : DrawingsMenu.GetCheckBoxValue("wDraw"))
            {
                Circle.Draw(WColorSlide.GetSharpColor(), W.Range, 1f, Player.Instance);
            }

            if (DrawingsMenu.GetCheckBoxValue("eDraw") && readyDraw ? E.IsReady() : DrawingsMenu.GetCheckBoxValue("eDraw"))
            {
                Circle.Draw(EColorSlide.GetSharpColor(), E.Range, 1f, Player.Instance);
            }

            if (DrawingsMenu.GetCheckBoxValue("rDraw") && readyDraw ? R.IsReady() : DrawingsMenu.GetCheckBoxValue("rDraw"))
            {
                Circle.Draw(RColorSlide.GetSharpColor(), R.Range, 1f, Player.Instance);
            }
        }