Esempio n. 1
0
        /*private static void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
        {
            Chat.Print("Failed Downloading: " + e.Error);
            AllahAkbar = new SoundPlayer
            {
                SoundLocation =
                    SandboxConfig.DataDirectory + @"\JinXXX\" + "Allahu_Akbar_Sound_Effect_Download_Link.wav"
            };
            AllahAkbar.Load();
        }*/
        /// <summary>
        /// Called Before Attack
        /// </summary>
        /// <param name="target">The Target</param>
        /// <param name="args">The Args</param>
        private static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            #region Combo

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var useQ = Config.ComboMenu["useQ"].Cast<CheckBox>().CurrentValue;

                // If the player has the rocket
                if (useQ && Program.Q.IsReady() && Essentials.FishBones())
                {
                    //var target = TargetSelector.GetTarget(Essentials.FishBonesRange(), DamageType.Physical);

                    if (target != null && target.IsValidTarget())
                    {
                        if (Player.Instance.Distance(target) <= Essentials.MinigunRange &&
                            target.CountEnemiesInRange(100) <
                            Config.ComboMenu["qCountC"].Cast<Slider>().CurrentValue)
                        {
                            Program.Q.Cast();
                            Orbwalker.ForcedTarget = target;
                        }
                    }
                }
            }

            #endregion

            #region LastHit

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                var useQ = Config.LastHitMenu["useQ"].Cast<CheckBox>().CurrentValue;
                var manaQ = Config.LastHitMenu["manaQ"].Cast<Slider>().CurrentValue;
                var qCountM = Config.LastHitMenu["qCountM"].Cast<Slider>().CurrentValue;

                // Force Minigun if there is a lasthittable minion in minigun range and there is no targets more than the setting amount.
                var kM = Orbwalker.LastHitMinionsList.Where(
                    t => t.IsEnemy &&
                         t.Health <= (Player.Instance.GetAutoAttackDamage(t) * 0.9) && t.IsValidTarget() &&
                         t.Distance(Player.Instance) <= Essentials.MinigunRange);
                if (useQ && Essentials.FishBones() && kM.Count() < qCountM)
                {
                    Program.Q.Cast();
                }
            }

            #endregion

            #region Lane Clear

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                var minion = EntityManager.MinionsAndMonsters.GetLaneMinions(
                    EntityManager.UnitTeam.Enemy,
                    Player.Instance.ServerPosition,
                    Essentials.FishBonesRange()).OrderByDescending(t => t.Health);

                if (Essentials.FishBones())
                {
                    foreach (var m in minion)
                    {
                        var minionsAoe =
                            EntityManager.MinionsAndMonsters.EnemyMinions.Count(
                                t => t.IsValidTarget() && t.Distance(m) <= 100);

                        if (m.Distance(Player.Instance) <= Essentials.MinigunRange && m.IsValidTarget() &&
                            (minionsAoe < Config.LaneClearMenu["qCountM"].Cast<Slider>().CurrentValue ||
                             m.Health > (Player.Instance.GetAutoAttackDamage(m))))
                        {
                            Q.Cast();
                            Orbwalker.ForcedTarget = m;
                        }
                        else if (m.Distance(Player.Instance) <= Essentials.MinigunRange &&
                                 !Orbwalker.LastHitMinionsList.Contains(m))
                        {
                            Q.Cast();
                            Orbwalker.ForcedTarget = m;
                        }
                        else
                        {
                            foreach (
                                var kM in
                                    Orbwalker.LastHitMinionsList.Where(
                                        kM =>
                                            kM.IsValidTarget() &&
                                            kM.Health <= (Player.Instance.GetAutoAttackDamage(kM)*0.9) &&
                                            kM.Distance(Player.Instance) <= Essentials.MinigunRange))
                            {
                                Q.Cast();
                                Orbwalker.ForcedTarget = kM;
                            }
                        }
                    }
                }
            }

            #endregion

            if (Essentials.FishBones() && target.IsStructure() &&
                target.Distance(Player.Instance) <= Essentials.MinigunRange)
            {
                Q.Cast();
            }
        }
Esempio n. 2
0
        /*private static void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
         * {
         *  Chat.Print("Failed Downloading: " + e.Error);
         *  AllahAkbar = new SoundPlayer
         *  {
         *      SoundLocation =
         *          SandboxConfig.DataDirectory + @"\JinXXX\" + "Allahu_Akbar_Sound_Effect_Download_Link.wav"
         *  };
         *  AllahAkbar.Load();
         * }*/

        /// <summary>
        /// Called Before Attack
        /// </summary>
        /// <param name="target">The Target</param>
        /// <param name="args">The Args</param>
        private static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            #region Combo

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var useQ = Config.ComboMenu["useQ"].Cast <CheckBox>().CurrentValue;

                // If the player has the rocket
                if (useQ && Program.Q.IsReady() && Essentials.FishBones())
                {
                    //var target = TargetSelector.GetTarget(Essentials.FishBonesRange(), DamageType.Physical);

                    if (target != null && target.IsValidTarget())
                    {
                        if (Player.Instance.Distance(target) <= Essentials.MinigunRange &&
                            target.CountEnemiesInRange(100) <
                            Config.ComboMenu["qCountC"].Cast <Slider>().CurrentValue)
                        {
                            Program.Q.Cast();
                            Orbwalker.ForcedTarget = target;
                        }
                    }
                }
            }

            #endregion

            #region LastHit

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                var useQ    = Config.LastHitMenu["useQ"].Cast <CheckBox>().CurrentValue;
                var manaQ   = Config.LastHitMenu["manaQ"].Cast <Slider>().CurrentValue;
                var qCountM = Config.LastHitMenu["qCountM"].Cast <Slider>().CurrentValue;

                // Force Minigun if there is a lasthittable minion in minigun range and there is no targets more than the setting amount.
                var kM = Orbwalker.LastHitMinionsList.Where(
                    t => t.IsEnemy &&
                    t.Health <= (Player.Instance.GetAutoAttackDamage(t) * 0.9) && t.IsValidTarget() &&
                    t.Distance(Player.Instance) <= Essentials.MinigunRange);
                if (useQ && Essentials.FishBones() && kM.Count() < qCountM)
                {
                    Program.Q.Cast();
                }
            }

            #endregion

            #region Lane Clear

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                var minion = EntityManager.MinionsAndMonsters.GetLaneMinions(
                    EntityManager.UnitTeam.Enemy,
                    Player.Instance.ServerPosition,
                    Essentials.FishBonesRange()).OrderByDescending(t => t.Health);

                if (Essentials.FishBones())
                {
                    foreach (var m in minion)
                    {
                        var minionsAoe =
                            EntityManager.MinionsAndMonsters.EnemyMinions.Count(
                                t => t.IsValidTarget() && t.Distance(m) <= 100);

                        if (m.Distance(Player.Instance) <= Essentials.MinigunRange && m.IsValidTarget() &&
                            (minionsAoe < Config.LaneClearMenu["qCountM"].Cast <Slider>().CurrentValue ||
                             m.Health > (Player.Instance.GetAutoAttackDamage(m))))
                        {
                            Q.Cast();
                            Orbwalker.ForcedTarget = m;
                        }
                        else if (m.Distance(Player.Instance) <= Essentials.MinigunRange &&
                                 !Orbwalker.LastHitMinionsList.Contains(m))
                        {
                            Q.Cast();
                            Orbwalker.ForcedTarget = m;
                        }
                        else
                        {
                            foreach (
                                var kM in
                                Orbwalker.LastHitMinionsList.Where(
                                    kM =>
                                    kM.IsValidTarget() &&
                                    kM.Health <= (Player.Instance.GetAutoAttackDamage(kM) * 0.9) &&
                                    kM.Distance(Player.Instance) <= Essentials.MinigunRange))
                            {
                                Q.Cast();
                                Orbwalker.ForcedTarget = kM;
                            }
                        }
                    }
                }
            }

            #endregion

            if (Essentials.FishBones() && target.IsStructure() &&
                target.Distance(Player.Instance) <= Essentials.MinigunRange)
            {
                Q.Cast();
            }
        }