Exemple #1
0
        private static void CastW(Obj_AI_Hero target)
        {
            if (!HasEnergy(new[] { SpellSlot.W, SpellSlot.Q }))
            {
                return;
            }
            if (ShadowManager.WShadow.IsUsable)
            {
                if (_spells[SpellSlot.W].IsReady() && WShadowSpell.ToggleState == 0 &&
                    Environment.TickCount - _spells[SpellSlot.W].LastCastAttemptT > 0)
                {
                    Vector2 position = Player.ServerPosition.To2D()
                                       .Extend(target.ServerPosition.To2D(), _spells[SpellSlot.W].Range);
                    if (position.Distance(target) <= _spells[SpellSlot.Q].Range)
                    {
                        if (IsPassWall(Player.ServerPosition, target.ServerPosition))
                        {
                            return;
                        }

                        _spells[SpellSlot.W].Cast(position);
                        _spells[SpellSlot.W].LastCastAttemptT = Environment.TickCount + 500;
                    }
                }
            }
            if (ShadowManager.CanGoToShadow(ShadowManager.WShadow) && WShadowSpell.ToggleState == 2)
            {
                if (Menu.Item("com.idz.zed.combo.swapw").GetValue <bool>() &&
                    ShadowManager.WShadow.ShadowObject.Distance(target.ServerPosition) <
                    Player.Distance(target.ServerPosition))
                {
                    _spells[SpellSlot.W].Cast();
                }
            }
        }
Exemple #2
0
 private static void OnFlee()
 {
     if (!MenuHelper.GetKeybindValue("fleeActive"))
     {
         return;
     }
     Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
     if (_spells[SpellSlot.W].IsReady() && ShadowManager.WShadow.IsUsable)
     {
         _spells[SpellSlot.W].Cast(Game.CursorPos);
     }
     if (ShadowManager.WShadow.Exists && ShadowManager.CanGoToShadow(ShadowManager.WShadow))
     {
         _spells[SpellSlot.W].Cast();
     }
     CastE();
 }
Exemple #3
0
        /// <summary>
        ///     TODO The on create object.
        /// </summary>
        /// <param name="sender">
        ///     TODO The sender.
        /// </param>
        /// <param name="args">
        ///     TODO The args.
        /// </param>
        private static void OnCreateObject(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_GeneralParticleEmitter))
            {
            }

            if (getCheckBoxItem(comboMenu, "com.idz.zed.combo.swapr"))
            {
                if (sender.Name == "Zed_Base_R_buf_tell.troy")
                {
                    // _deathmarkKilled = true;
                    if (RShadowSpell.ToggleState == 2 && ShadowManager.CanGoToShadow(ShadowManager.RShadow))
                    {
                        _spells[SpellSlot.R].Cast();
                    }
                }
            }
        }
Exemple #4
0
        /// <summary>
        ///     TODO The on flee.
        /// </summary>
        private static void OnFlee()
        {
            if (!getKeyBindItem(fleeMenu, "fleeActive") ||
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                return;
            }

            EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            if (_spells[SpellSlot.W].IsReady() && ShadowManager.WShadow.IsUsable)
            {
                _spells[SpellSlot.W].Cast(Game.CursorPos);
            }

            if (ShadowManager.WShadow.Exists && ShadowManager.CanGoToShadow(ShadowManager.WShadow))
            {
                _spells[SpellSlot.W].Cast();
            }

            CastE();
        }
Exemple #5
0
        /// <summary>
        ///     TODO The cast w.
        /// </summary>
        /// <param name="target">
        ///     TODO The target.
        /// </param>
        private static void CastW(AIHeroClient target)
        {
            if (!HasEnergy(new[] { SpellSlot.W, SpellSlot.Q }))
            {
                return;
            }

            if (ShadowManager.WShadow.IsUsable)
            {
                if (_spells[SpellSlot.W].IsReady() && WShadowSpell.ToggleState == 0 &&
                    Environment.TickCount - _spells[SpellSlot.W].LastCastAttemptT > 0)
                {
                    var position = Player.ServerPosition.LSTo2D()
                                   .LSExtend(target.ServerPosition.LSTo2D(), _spells[SpellSlot.W].Range);
                    if (position.LSDistance(target) <= _spells[SpellSlot.Q].Range)
                    {
                        if (IsPassWall(Player.ServerPosition, target.ServerPosition))
                        {
                            return;
                        }

                        _spells[SpellSlot.W].Cast(position);
                        _spells[SpellSlot.W].LastCastAttemptT = Environment.TickCount + 500;
                    }
                }
            }

            if (ShadowManager.CanGoToShadow(ShadowManager.WShadow) && WShadowSpell.ToggleState == 2)
            {
                if (getCheckBoxItem(comboMenu, "com.idz.zed.combo.swapw") &&
                    ShadowManager.WShadow.ShadowObject.LSDistance(target.ServerPosition)
                    < Player.LSDistance(target.ServerPosition))
                {
                    _spells[SpellSlot.W].Cast();
                }
            }
        }
Exemple #6
0
        /// <summary>
        ///     TODO The do line combo.
        /// </summary>
        /// <param name="target">
        ///     TODO The target.
        /// </param>
        private static void DoLineCombo(AIHeroClient target)
        {
            if (ShadowManager.RShadow.IsUsable)
            {
                if (getCheckBoxItem(miscMenu, "checkQWE"))
                {
                    if (_spells[SpellSlot.Q].IsReady() && _spells[SpellSlot.W].IsReady() &&
                        _spells[SpellSlot.E].IsReady())
                    {
                        if (_spells[SpellSlot.R].IsReady() && _spells[SpellSlot.R].IsInRange(target))
                        {
                            _spells[SpellSlot.R].Cast(target);
                        }
                    }
                }
                else
                {
                    if (_spells[SpellSlot.R].IsReady() && _spells[SpellSlot.R].IsInRange(target))
                    {
                        _spells[SpellSlot.R].Cast(target);
                    }
                }
            }

            if (GetMarkedTarget() != null)
            {
                target = GetMarkedTarget();
            }

            if (ShadowManager.RShadow.Exists && ShadowManager.WShadow.IsUsable)
            {
                var wCastLocation = Player.ServerPosition
                                    - Vector3.Normalize(target.ServerPosition - Player.ServerPosition) * 400;

                if (ShadowManager.WShadow.IsUsable && WShadowSpell.ToggleState == 0 &&
                    Environment.TickCount - _spells[SpellSlot.W].LastCastAttemptT > 0)
                {
                    _spells[SpellSlot.W].Cast(wCastLocation);

                    // Maybe add a delay giving the target a chance to flash / zhonyas then it will place w at best location for more damage
                    _spells[SpellSlot.W].LastCastAttemptT = Environment.TickCount + 500;
                }
            }

            if (ShadowManager.WShadow.Exists && ShadowManager.RShadow.Exists)
            {
                CastQ(target);
                CastE();
            }
            else if (ShadowManager.RShadow.Exists && !ShadowManager.WShadow.IsUsable && !ShadowManager.WShadow.Exists)
            {
                CastQ(target);
                CastE();
            }

            if (ShadowManager.CanGoToShadow(ShadowManager.WShadow) && WShadowSpell.ToggleState == 2)
            {
                // && !_deathmarkKilled)
                if (getCheckBoxItem(comboMenu, "com.idz.zed.combo.swapw") &&
                    ShadowManager.WShadow.ShadowObject.LSDistance(target.ServerPosition)
                    < Player.LSDistance(target.ServerPosition))
                {
                    _spells[SpellSlot.W].Cast();
                }
            }
        }
Exemple #7
0
        /// <summary>
        /// TODO The do line combo.
        /// </summary>
        /// <param name="target">
        /// TODO The target.
        /// </param>
        private static void DoLineCombo(Obj_AI_Hero target)
        {
            if (ShadowManager.RShadow.IsUsable)
            {
                if (MenuHelper.IsMenuEnabled("checkQWE"))
                {
                    if (_spells[SpellSlot.Q].IsReady() && _spells[SpellSlot.W].IsReady() &&
                        _spells[SpellSlot.E].IsReady())
                    {
                        if (_spells[SpellSlot.R].IsReady() && _spells[SpellSlot.R].IsInRange(target))
                        {
                            _spells[SpellSlot.R].Cast(target);
                        }
                    }
                }
                else
                {
                    if (Menu.Item("dontult:" + target.ChampionName).GetValue <bool>())
                    {
                        return;
                    }
                    if (_spells[SpellSlot.R].IsReady() && _spells[SpellSlot.R].IsInRange(target))
                    {
                        _spells[SpellSlot.R].Cast(target);
                    }
                }
            }

            if (GetMarkedTarget() != null)
            {
                target = GetMarkedTarget();
            }

            ItemManager.UseDeathmarkItems();
            ItemManager.UseSummonerSpells();

            if (ShadowManager.RShadow.Exists && ShadowManager.WShadow.IsUsable)
            {
                var wCastLocation = Player.ServerPosition
                                    - Vector3.Normalize(target.ServerPosition - Player.ServerPosition) * 400;

                if (ShadowManager.WShadow.IsUsable && WShadowSpell.ToggleState == 0 &&
                    Environment.TickCount - _spells[SpellSlot.W].LastCastAttemptT > 0)
                {
                    _spells[SpellSlot.W].Cast(wCastLocation);

                    // Maybe add a delay giving the target a chance to flash / zhonyas then it will place w at best location for more damage
                    _spells[SpellSlot.W].LastCastAttemptT = Environment.TickCount + 500;
                }
            }

            if (ShadowManager.WShadow.Exists && ShadowManager.RShadow.Exists)
            {
                CastQ(target);
                CastE();
            }
            else if (ShadowManager.RShadow.Exists && !ShadowManager.WShadow.IsUsable && !ShadowManager.WShadow.Exists)
            {
                CastQ(target);
                CastE();
            }

            if (ShadowManager.CanGoToShadow(ShadowManager.WShadow) && WShadowSpell.ToggleState == 2)
            {
                // && !_deathmarkKilled)
                if (MenuHelper.IsMenuEnabled("com.idz.zed.combo.swapw") &&
                    ShadowManager.WShadow.ShadowObject.Distance(target.ServerPosition)
                    < Player.Distance(target.ServerPosition))
                {
                    _spells[SpellSlot.W].Cast();
                }
            }
        }