Example #1
0
        private static void GameOnOnUpdate(EventArgs args)
        {
            JumpTarget = CommonTargetSelector.GetTarget(Q.Range*3, TargetSelector.DamageType.Physical);
            if (ModeConfig.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                return;
            }

            if (!JumpTarget.IsValidTarget())
            {
                return;
            }

            if (!JumpObject.IsValidTarget(Q.Range))
            {
                return;
            }

            if (!Q.IsReady())
            {
                return;
            }

            if (!MenuLocal.Item("Jump.Enabled").GetValue<KeyBind>().Active)
            {
                return;
            }
            var jumpMode = MenuLocal.Item("Jump.Mode").GetValue<StringList>().SelectedIndex;
            if (jumpMode != 0)
            {

                switch (jumpMode)
                {
                    case 1:
                    {
                        Q.CastOnUnit(JumpObject);
                        break;
                    }
                    case 2:
                        {
                            if (JumpTarget.CanStun())
                            {
                                Q.CastOnUnit(JumpObject);
                            }
                            break;
                        }
                    case 3:
                        {
                            if (JumpTarget.Health < CommonMath.GetComboDamage(JumpTarget))
                            {
                                Q.CastOnUnit(JumpObject);
                            }
                            break;
                        }
                    case 4:
                        {
                            if (JumpTarget.CanStun() || JumpTarget.Health < CommonMath.GetComboDamage(JumpTarget))
                            {
                                Q.CastOnUnit(JumpObject);
                            }
                            break;
                        }
                }

            }

            //if (!JumpTarget.IsValidTarget(Q.Range) && !JumpTarget.IsValidTarget(Q.Range + Orbwalking.GetRealAutoAttackRange(null) + 65))
            //{
            //    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, JumpTarget);
            //}

            return;

            if (JumpTarget.UnderTurret(true) && MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex == 0)
            {
                return;
            }

            if (JumpTarget.UnderTurret(true)
                && MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex == 1
                && JumpTarget.Health < Common.CommonMath.GetComboDamage(JumpTarget))
            {
                Q.CastOnUnit(JumpObject);
            }

            var jumpQ = MenuLocal.Item("Jump.TurretControl").GetValue<StringList>().SelectedIndex;

            switch (jumpQ)
            {
                case 0:
                {
                    Q.CastOnUnit(JumpObject);
                    break;
                }

                case 1:
                {
                    if (JumpTarget.CanStun())
                    {
                        Q.CastOnUnit(JumpObject);
                    }
                    break;
                }

                case 2:
                {
                    if (JumpTarget.Health < Common.CommonMath.GetComboDamage(JumpTarget))
                    {
                        Q.CastOnUnit(JumpObject);
                    }
                    break;
                }
                case 3:
                {
                    if (JumpTarget.CanStun() && JumpTarget.Health < Common.CommonMath.GetComboDamage(JumpTarget))
                    {
                        Q.CastOnUnit(JumpObject);
                    }
                    break;
                }
            }
        }