Exemplo n.º 1
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            StateHandler.DrawProjection();
            var lowFps     = Config.Item("LowFPS").GetValue <bool>();
            var lowFpsMode = Config.Item("LowFPSMode").GetValue <StringList>().SelectedIndex + 1;

            if (Config.Item("DQ").GetValue <Circle>().Active)
            {
                Render.Circle.DrawCircle(
                    ObjectManager.Player.Position, CheckHandler._spells[SpellSlot.Q].Range,
                    Config.Item("DQ").GetValue <Circle>().Color, lowFps ? lowFpsMode : 5);
            }
            if (Config.Item("DW").GetValue <Circle>().Active)
            {
                Render.Circle.DrawCircle(
                    ObjectManager.Player.Position, CheckHandler._spells[SpellSlot.W].Range,
                    Config.Item("DW").GetValue <Circle>().Color, lowFps ? lowFpsMode : 5);
            }
            if (Config.Item("DE").GetValue <Circle>().Active)
            {
                Render.Circle.DrawCircle(
                    ObjectManager.Player.Position, CheckHandler._spells[SpellSlot.E].Range,
                    Config.Item("DE").GetValue <Circle>().Color, lowFps ? lowFpsMode : 5);
            }
            if (Config.Item("DR").GetValue <Circle>().Active)
            {
                Render.Circle.DrawCircle(
                    ObjectManager.Player.Position, CheckHandler._spells[SpellSlot.R].Range,
                    Config.Item("DR").GetValue <Circle>().Color, lowFps ? lowFpsMode : 5);
            }
            //Render.Circle.DrawCircle(StateHandler.GetFirstCollisionMinion(ObjectManager.Player, TargetSelector.GetTarget(1200f, TargetSelector.DamageType.Physical)).Position, 100f, Color.OrangeRed);
            WardjumpHandler.Draw();
            InsecHandler.Draw();
        }
Exemplo n.º 2
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            //StateHandler.SuperDuperUlt();

            if (CheckHandler.LastSpell + 3000 <= Environment.TickCount)
            {
                CheckHandler.PassiveStacks = 0;
            }
            if (Config.Item("starCombo").GetValue <KeyBind>().Active)
            {
                StateHandler.StarCombo();
                return;
            }
            if (Config.Item("insec").GetValue <KeyBind>().Active)
            {
                InsecHandler.DoInsec();
                return;
            }
            InsecHandler.FlashPos = new Vector3();
            InsecHandler.FlashR   = false;

            if (Config.Item("Wardjump").GetValue <KeyBind>().Active)
            {
                WardjumpHandler.DrawEnabled = Config.Item("DWJ").GetValue <bool>();
                WardjumpHandler.Jump(Game.CursorPos, Config.Item("alwaysJumpMaxRange").GetValue <bool>(), true);
                return;
            }
            WardjumpHandler.DrawEnabled = false;

            switch (_orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                StateHandler.Combo();
                return;

            case Orbwalking.OrbwalkingMode.LaneClear:
                StateHandler.JungleClear();
                return;

            case Orbwalking.OrbwalkingMode.Mixed:
                StateHandler.Harass();
                return;
            }
        }
Exemplo n.º 3
0
        public static void DoInsec()
        {
            if (_selectedEnemy == null && Program.Config.Item("insecOrbwalk").GetValue <bool>())
            {
                Orbwalking.Orbwalk(null, Game.CursorPos);
                return;
            }
            if (_selectedEnemy != null)
            {
                Orbwalking.Orbwalk(Orbwalking.InAutoAttackRange(_selectedEnemy) ? _selectedEnemy : null, Game.CursorPos);
            }
            if (!InsecPos().IsValid() || !_selectedEnemy.IsValidTarget() || !CheckHandler._spells[SpellSlot.R].IsReady())
            {
                return;
            }
            if (Player.Distance(InsecPos()) <= 120)
            {
                CheckHandler._spells[SpellSlot.R].CastOnUnit(_selectedEnemy);
                return;
            }
            if (Player.Distance(InsecPos()) < 600)
            {
                if (CheckHandler.WState && CheckHandler._spells[SpellSlot.W].IsReady() && CheckHandler.CheckQ)
                {
                    Obj_AI_Base unit =
                        ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(a => a.IsAlly && a.Distance(InsecPos()) < 120);
                    if (unit != null)
                    {
                        CheckHandler._spells[SpellSlot.W].CastOnUnit(unit);
                    }
                    else if (CheckHandler.LastWard + 500 < Environment.TickCount && Items.GetWardSlot() != null &&
                             Player.Distance(InsecPos()) < 600)
                    {
                        Player.Spellbook.CastSpell(Items.GetWardSlot().SpellSlot, InsecPos());
                    }
                    return;
                }
                if (!Program.Config.Item("flashInsec").GetValue <bool>() ||
                    CheckHandler.WState && CheckHandler._spells[SpellSlot.W].IsReady() && Items.GetWardSlot() != null ||
                    CheckHandler.LastW + 2000 > Environment.TickCount)
                {
                    return;
                }
                if (_selectedEnemy.Distance(Player) < CheckHandler._spells[SpellSlot.R].Range)
                {
                    CheckHandler._spells[SpellSlot.R].CastOnUnit(_selectedEnemy);
                    FlashPos = InsecPos();
                    FlashR   = true;
                }
                else
                {
                    if (InsecPos().Distance(Player.Position) < 400)
                    {
                        Player.Spellbook.CastSpell(Player.GetSpellSlot("summonerflash"), InsecPos());
                    }
                }
            }
            if (Player.Distance(_selectedEnemy) < CheckHandler._spells[SpellSlot.Q].Range && CheckHandler.QState &&
                CheckHandler._spells[SpellSlot.Q].IsReady())
            {
                StateHandler.CastQ(_selectedEnemy, true);
            }
            if (!CheckHandler.QState && _selectedEnemy.HasQBuff() ||
                (Program.Config.Item("q2InsecRange").GetValue <bool>() && CheckHandler.BuffedEnemy.IsValidTarget() &&
                 CheckHandler.BuffedEnemy.Distance(InsecPos()) < 500))
            {
                CheckHandler._spells[SpellSlot.Q].Cast();
            }

            if (Program.Config.Item("q1InsecRange").GetValue <bool>() || !CheckHandler.QState ||
                !CheckHandler._spells[SpellSlot.Q].IsReady() || !InsecPos().IsValid())
            {
                return;
            }
            foreach (Obj_AI_Base unit in
                     ObjectManager.Get <Obj_AI_Base>()
                     .Where(
                         a =>
                         a.IsEnemy && (a.IsValid <Obj_AI_Hero>() || a.IsValid <Obj_AI_Minion>()) &&
                         a.Distance(InsecPos()) < 400))
            {
                if (!unit.IsValidTarget())
                {
                    return;
                }
                CheckHandler._spells[SpellSlot.Q].Cast(unit);
            }
        }