Пример #1
0
 public static void SpellRange(this Spell.SpellBase spell, Color Colors, bool draw = false)
 {
     if (draw)
     {
         Circle.Draw(spell.IsReady() ? new ColorBGRA(Colors.R, Colors.G, Colors.B, Colors.A) : (ColorBGRA)SharpDX.Color.Red, spell.Range, Player.Instance);
     }
 }
Пример #2
0
        public static float GetDamage(this Spell.SpellBase Spell, Obj_AI_Base target)
        {
            if (Spell.Name.ToLower().Contains("smite"))
            {
                return(Player.Instance.CalculateDamageOnUnit(target, DamageType.True, SmiteDamage(target)));
            }

            if (!Database.Exists(s => s.slot == Spell.Slot && Player.GetSpell(s.slot).IsReady))
            {
                return(Player.Instance.GetSpellDamage(target, Spell.Slot));
            }

            var spell  = Database.FirstOrDefault(s => s.slot == Spell.Slot);
            var dmg    = 0f;
            var AP     = Player.Instance.FlatMagicDamageMod;
            var AD     = Player.Instance.FlatPhysicalDamageMod;
            var sLevel = Spell.Level - 1;
            var ready  = Spell.IsLearned && Spell.IsReady();

            if (ready)
            {
                dmg = spell.Floats[sLevel] + (target.MaxHealth * spell.MaxHP[sLevel]) + (spell.AD * AD) + (spell.AP * AP);
            }

            if (Player.Instance.Hero == Champion.LeeSin && Spell.Slot == SpellSlot.Q && target.Buffs.Any(b => b.Name.ToLower().Contains("qone")))
            {
                var missinghealth = target.MaxHealth - target.Health;
                dmg += 0.08f * missinghealth;
            }

            return(ready ? Player.Instance.CalculateDamageOnUnit(target, spell.DamageType, dmg - 15) : 0);
        }
Пример #3
0
 public static Obj_AI_Base GetKStarget(this Spell.SpellBase spell)
 {
     return(spell.IsReady()
                ? EntityManager.Heroes.Enemies.Where(e => e.IsKillable() && e.IsKillable(spell.Range) && kCore.ks.checkbox(e.ID()))
            .FirstOrDefault(enemy => spell.GetDamage(enemy) >= Prediction.Health.GetPrediction(enemy, (int)spell.TravelTime(enemy)))
                : null);
 }
Пример #4
0
 /// <summary>
 /// Check if can cast the spell on the target
 /// </summary>
 /// <param name="target">Target to check</param>
 /// <param name="spell">Any spell</param>
 /// <returns></returns>
 public static bool CanCast(this Obj_AI_Base target, Spell.SpellBase spell)
 {
     if (spell != null)
     {
         return(spell.IsReady() && target.IsValidTarget(spell.Range) && target.IsNotNull());
     }
     return(false);
 }
Пример #5
0
 public static bool CanCast(this Obj_AI_Base target, Spell.SpellBase spell, Menu m)
 {
     if (spell == null || target == null)
     {
         return(false);
     }
     return(target.IsValidTarget(spell.Range) && spell.IsReady() && m.GetCheckBoxValue(spell.Slot.ToString().ToLower() + "Use"));
 }
Пример #6
0
 public static bool CanCastSpell(this Obj_AI_Base target, Spell.SpellBase spell)
 {
     if (spell == null || target == null)
     {
         return(false);
     }
     return(target.IsValidTarget(spell.Range) && spell.IsReady());
 }
Пример #7
0
 public static bool CanCastSpell(this Vector3 target, Spell.SpellBase spell)
 {
     if (spell == null || target == null)
     {
         return(false);
     }
     return(target.IsInRange(Player.Instance, spell.Range) && spell.IsReady());
 }
Пример #8
0
 /// <summary>
 ///     Casts spell with selected hitchance.
 /// </summary>
 public static void Cast(this Spell.SpellBase spell, Obj_AI_Base target, HitChance hitChance)
 {
     if (target != null && spell.IsReady() && target.IsKillable(spell.Range))
     {
         var pred = spell.GetPrediction(target);
         if (pred.HitChance >= hitChance || target.IsCC())
         {
             spell.Cast(pred.CastPosition);
         }
     }
 }
Пример #9
0
 /// <summary>
 ///     Casts spell with selected hitchancepercent.
 /// </summary>
 public static void Cast(this Spell.SpellBase spell, Obj_AI_Base target, float hitchancepercent)
 {
     if (target != null && spell.IsReady() && target.IsKillable(spell.Range))
     {
         var pred = ((Spell.Skillshot)spell).GetPrediction(target);
         if (pred.HitChancePercent >= hitchancepercent || target.IsCC())
         {
             spell.Cast(pred.CastPosition);
         }
     }
 }
Пример #10
0
 public static bool CanCast(this Obj_AI_Base target, Spell.SpellBase spell, Menu m)
 {
     if (spell == null)
     {
         return(false);
     }
     if (m != ComboMenu)
     {
         //if (Player.Instance.ManaPercent < m.GetSliderValue("manaSlider")) return false;
     }
     return(target.IsValidTarget(spell.Range) && spell.IsReady() && m.GetCheckBoxValue(spell.Slot.ToString().ToLower() + "Use"));
 }
Пример #11
0
        /// <summary>
        ///     Casts <paramref name="spell" /> with selected hitchance.
        /// </summary>
        public static void Cast(this Spell.SpellBase spell, Obj_AI_Base target, HitChance hitChance)
        {
            if (target == null || !spell.IsReady() || !target.IsKillable(spell.Range))
            {
                return;
            }

            var pred = spell.GetPrediction(target);

            if (pred.HitChance >= hitChance || target.IsCc())
            {
                spell.Cast(pred.CastPosition);
            }
        }
Пример #12
0
        public void DrawSpell(Spell.SpellBase spell, Color spellColor)
        {
            if (spell != null)
            {
                var ready      = DrawMenu.GetCheckBoxValue(DrawMenuID + "whenready");
                var spellSlot  = spell.Slot.ToString()[spell.Slot.ToString().Length - 1];
                var check      = DrawMenu.GetCheckBoxValue(DrawMenuID + spellSlot);
                var colorSharp = new SharpDX.Color(spellColor.R, spellColor.G, spellColor.B, spellColor.A);

                if (check && ready ? spell.IsReady() : check)
                {
                    Circle.Draw(colorSharp, spell.Range, Player.Instance);
                }
            }
        }
Пример #13
0
        internal static double GetDamage(this Spell.SpellBase spell, Obj_AI_Base target)
        {
            if (!spell.IsReady())
            {
                return(0);
            }

            double dmg = 0d;

            switch (spell.Slot)
            {
            case SpellSlot.Q:
                dmg = GetRealQDamage(target);
                break;

            case SpellSlot.W:
                dmg =
                    new double[] { 0, 80, 100, 120, 140, 160 }[ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level] +
                0.2 * ObjectManager.Player.TotalMagicalDamage +
                0.01 *
                (ObjectManager.Player.MaxMana - 400 - 50 * ObjectManager.Player.Level);
                break;

            case SpellSlot.E:
                dmg =
                    new double[] { 0, 50, 75, 100, 125, 150 }[ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level] +
                0.3 * ObjectManager.Player.TotalMagicalDamage +
                0.02 *
                (ObjectManager.Player.MaxMana - 400 - 50 * ObjectManager.Player.Level);
                break;

            case SpellSlot.R:
                dmg = 0d;
                break;
            }

            if (dmg > 0)
            {
                return(ObjectManager.Player.CalculateDamageOnUnit(target, DamageType.Physical, (float)dmg));
            }

            return(0d);
        }
Пример #14
0
        private static void Combo()
        {
            foreach (var Enemy in EntityManager.Heroes.Enemies)
            {
                if (Enemy.IsValidTarget())
                {
                    if (Smite != null && Smite.IsReady() && ComboSmite.CurrentValue)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(700, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && (target.Position - Player.Position).Length() < 500)
                        {
                            Smite.Cast(target);
                        }
                        else
                        {
                            Smite.Cast(target);
                        }
                    }
                    if (Cutlass.IsOwned() && Cutlass.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(550, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && Cutlass.IsInRange(target))
                        {
                            Cutlass.Cast(target);
                        }
                        else
                        {
                            Cutlass.Cast(target);
                        }
                    }
                    if (Botrk.IsOwned() && Botrk.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        var target = TargetSelector.SelectedTarget == null
                            ? TargetSelector.GetTarget(550, DamageType.Physical)
                            : TargetSelector.SelectedTarget;

                        if (target != null && target.IsValidTarget() && !target.IsDead && Botrk.IsInRange(target))
                        {
                            Botrk.Cast(target);
                        }
                        else
                        {
                            Botrk.Cast(target);
                        }
                    }
                    if (Youmuu.IsOwned() && Youmuu.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(500) > 0)
                        {
                            Youmuu.Cast();
                        }
                    }
                    if (Ravenous_Hydra.IsOwned() && Ravenous_Hydra.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Ravenous_Hydra.Cast();
                        }
                    }
                    if (Tiamat.IsOwned() && Tiamat.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Tiamat.Cast();
                        }
                    }
                    if (Titanic_Hydra.IsOwned() && Titanic_Hydra.IsReady() && ComboItems.CurrentValue && !Player.IsDead)
                    {
                        if (Player.CountEnemyChampionsInRange(385) > 0)
                        {
                            Titanic_Hydra.Cast();
                        }
                    }
                    if (!ComboQAA.CurrentValue && ComboQ.CurrentValue && Q.IsReady() && Enemy.IsValidTarget(E.Range))
                    {
                        Q.Cast();
                    }
                    if (!Enemy.IsDead && Enemy != null && Enemy.IsValidTarget(E.Range) && ComboE.CurrentValue)
                    {
                        if ((Enemy.Position - Player.Position).Length() > ComboEmin.CurrentValue)
                        {
                            E.Cast(Enemy);
                        }
                        if (E.GetSpellDamage(Enemy) >= Enemy.TotalShieldHealth())
                        {
                            E.Cast(Enemy);
                        }
                        if (Enemy.IsDashing())
                        {
                            E.Cast(Enemy);
                        }
                        if (Enemy.HealthPercent < 15)
                        {
                            E.Cast(Enemy);
                        }
                    }
                    if (ComboW.CurrentValue && W.IsReady())
                    {
                        var target = TargetSelector.GetTarget(250, DamageType.Physical);
                        if (target != null)
                        {
                            W.Cast();
                        }
                    }
                    if (ComboR.CurrentValue && R.IsReady())
                    {
                        var RDamage = R.GetSpellDamage(Enemy);
                        if (Player.CountEnemyChampionsInRange(R.Range) >= ComboRmin.CurrentValue)
                        {
                            if (Enemy.HasBuff("xenzhaointimidate"))
                            {
                                R.Cast();
                            }
                        }
                        if (Enemy.TotalShieldHealth() < RDamage)
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Пример #15
0
        internal static double GetRealDamage(this Spell.SpellBase spell, Obj_AI_Base target, bool havetoler = false, float tolerDMG = 0)
        {
            if (target != null && !target.IsDead && target.Buffs.Any(a => a.Name.ToLower().Contains("kalistaexpungemarker")))
            {
                if (target.HasBuff("KindredRNoDeathBuff"))
                {
                    return(0);
                }

                if (target.HasBuff("UndyingRage") && target.GetBuff("UndyingRage").EndTime - Game.Time > 0.3)
                {
                    return(0);
                }

                if (target.HasBuff("JudicatorIntervention"))
                {
                    return(0);
                }

                if (target.HasBuff("ChronoShift") && target.GetBuff("ChronoShift").EndTime - Game.Time > 0.3)
                {
                    return(0);
                }

                if (target.HasBuff("FioraW"))
                {
                    return(0);
                }

                if (target.HasBuff("ShroudofDarkness"))
                {
                    return(0);
                }

                if (target.HasBuff("SivirShield"))
                {
                    return(0);
                }

                var damage = 0d;

                damage += spell.IsReady()
                    ? spell.GetDamage(target)
                    : 0d + (havetoler ? tolerDMG : 0) - target.HPRegenRate;

                if (target.CharData.BaseSkinName == "Morderkaiser")
                {
                    damage -= target.Mana;
                }

                if (ObjectManager.Player.HasBuff("SummonerExhaust"))
                {
                    damage = damage * 0.6f;
                }

                if (target.HasBuff("BlitzcrankManaBarrierCD") && target.HasBuff("ManaBarrier"))
                {
                    damage -= target.Mana / 2f;
                }

                if (target.HasBuff("GarenW"))
                {
                    damage = damage * 0.7f;
                }

                if (target.HasBuff("ferocioushowl"))
                {
                    damage = damage * 0.7f;
                }

                return(damage);
            }

            return(0d);
        }
Пример #16
0
 public static string ready(Spell.SpellBase spell)
 {
     return(spell.IsReady() ? ": Ready" : ": CoolDown");
 }
Пример #17
0
 public static System.Drawing.Color c(Spell.SpellBase spell)
 {
     return(spell.IsReady() ? System.Drawing.Color.White : System.Drawing.Color.OrangeRed);
 }
Пример #18
0
        private void DrawDamageIndicator()
        {
            const int width  = 103;
            const int height = 9;

            foreach (var enemy in EntityManager.Heroes.Enemies)
            {
                var xOffset = enemy.HPBarXOffset;
                if (!enemy.IsHPBarRendered)
                {
                    continue;
                }
                var   barPosition = enemy.HPBarPosition;
                float drawDamage = 0, drawQ = 0, drawW = 0, drawE = 0, drawR = 0;

                if (_q.IsReady())
                {
                    drawDamage += Player.GetSpellDamage(enemy, SpellSlot.Q);
                }
                if (_w.IsReady())
                {
                    drawDamage += Player.GetSpellDamage(enemy, SpellSlot.W);
                }
                if (_e.IsReady())
                {
                    drawDamage += Player.GetSpellDamage(enemy, SpellSlot.E);
                }
                if (_r.IsReady())
                {
                    drawDamage += Player.GetSpellDamage(enemy, SpellSlot.R);
                }

                if (_q.IsReady())
                {
                    drawQ = (Player.GetSpellDamage(enemy, SpellSlot.Q) / drawDamage);
                }
                if (_w.IsReady())
                {
                    drawW = (Player.GetSpellDamage(enemy, SpellSlot.W) / drawDamage);
                }
                if (_e.IsReady())
                {
                    drawE = (Player.GetSpellDamage(enemy, SpellSlot.E) / drawDamage);
                }
                if (_r.IsReady())
                {
                    drawR = (Player.GetSpellDamage(enemy, SpellSlot.R) / drawDamage);
                }

                var hpleft         = Math.Max(0, enemy.Health - drawDamage) / enemy.MaxHealth;
                var yPos           = barPosition.Y + enemy.HPBarYOffset + 5;
                var xPosDamage     = barPosition.X + xOffset + width * hpleft;
                var xPosCurrentHp  = barPosition.X + xOffset + width * enemy.Health / enemy.MaxHealth;
                var differenceInHp = xPosCurrentHp - xPosDamage;
                var pos1           = barPosition.X + xOffset + (107 * hpleft);
                for (var i = 0; i < differenceInHp; i++)
                {
                    if (_q.IsReady() && i < drawQ * differenceInHp)
                    {
                        Drawing.DrawLine(pos1 + i, yPos, pos1 + i, yPos + height, 1, Color.Turquoise);
                    }
                    else if (_w.IsReady() && i < (drawQ + drawW) * differenceInHp)
                    {
                        Drawing.DrawLine(pos1 + i, yPos, pos1 + i, yPos + height, 1, Color.Chartreuse);
                    }
                    else if (_e.IsReady() && i < (drawQ + drawW + drawE) * differenceInHp)
                    {
                        Drawing.DrawLine(pos1 + i, yPos, pos1 + i, yPos + height, 1, Color.Gold);
                    }
                    else if (_r.IsReady() && i < (drawQ + drawW + drawE + drawR) * differenceInHp)
                    {
                        Drawing.DrawLine(pos1 + i, yPos, pos1 + i, yPos + height, 1, Color.OrangeRed);
                    }
                }
            }
        }
Пример #19
0
 public static bool CanCast(this Spell.SpellBase spell)
 =>
 spell.IsLearned && spell.IsReady() &&
 Player.Instance.Mana >= Player.Instance.Spellbook.GetSpell(spell.Slot).SData.Mana;
Пример #20
0
 public static bool IsBackRange(this Spell.SpellBase spell, Orbwalker.ActiveModes mode)
 {
     return(spell.IsEnabled(mode) && spell.IsReady());
 }
Пример #21
0
        public static bool SmartCast(this Spell.SpellBase spell, int hitChance = 75, Obj_AI_Base target = null)
        {
            if (!spell.IsReady())
            {
                return(false);
            }

            var mode = Orbwalker.ActiveModesFlags;

            var skillShot = spell as Spell.Skillshot;

            #region Combo
            //Combo logic
            if (mode.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                //Get target if null
                if (target == null)
                {
                    target = spell.GetTgt();
                }

                if (target == null)
                {
                    return(false);
                }

                //IsSkillshot
                if (skillShot != null)
                {
                    if (skillShot.AllowedCollisionCount > 1)
                    {
                        var enemyCount = Player.Instance.CountEnemiesInRange(spell.Range + 100);
                        if (enemyCount >= 2)
                        {
                            skillShot.CastIfItWillHit(1, hitChance);
                            return(true);
                        }

                        if (enemyCount >= 3)
                        {
                            skillShot.CastIfItWillHit(2, hitChance);
                            return(true);
                        }
                    }
                    skillShot.CastMinimumHitchance(target, hitChance);
                    return(true);
                }

                if (target.IsValidTarget(spell.Range))
                {
                    spell.Cast(target);
                    return(true);
                }
            }
            #endregion Combo

            #region Harass
            //Harass logic
            if (mode.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                //Get target if null
                if (target == null)
                {
                    target = spell.GetTgt();
                }

                if (target == null)
                {
                    return(false);
                }

                //IsSkillshot
                if (skillShot != null)
                {
                    if (skillShot.AllowedCollisionCount > 1)
                    {
                        if (Player.Instance.CountEnemiesInRange(spell.Range + 100) >= 2)
                        {
                            skillShot.CastIfItWillHit(1, hitChance);
                            return(true);
                        }

                        if (Player.Instance.CountEnemiesInRange(spell.Range + 100) >= 3)
                        {
                            skillShot.CastIfItWillHit(2, hitChance);
                            return(true);
                        }
                    }

                    skillShot.CastMinimumHitchance(target, hitChance);
                    return(true);
                }

                if (target.IsValidTarget(spell.Range))
                {
                    spell.Cast(target);
                    return(true);
                }
            }
            #endregion Harass

            #region JungleClear

            if (mode.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                if (target == null)
                {
                    target =
                        EntityManager.MinionsAndMonsters.GetJungleMonsters().OrderByDescending(m => m.MaxHealth)
                        .ThenBy(m => m.Distance(Player.Instance)).FirstOrDefault(
                            m => m.IsValidTarget(spell.Range));
                }

                if (target != null && target.IsValidTarget(spell.Range))
                {
                    //IsSkillshot
                    skillShot?.CastMinimumHitchance(target, hitChance);
                    spell.Cast(target);
                }
            }

            #endregion JungleClear

            #region LaneClear
            if (mode.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                //IsSkillShot
                if (skillShot != null)
                {
                    if (skillShot.AllowedCollisionCount > 1)
                    {
                        var minionCount = Player.Instance.CountEnemyMinionsInRange(spell.Range + 100);
                        if (minionCount >= 2)
                        {
                            skillShot.CastOnBestFarmPosition(1);
                            return(true);
                        }

                        if (minionCount >= 3)
                        {
                            skillShot.CastOnBestFarmPosition(2);
                            return(true);
                        }
                    }

                    if (target == null)
                    {
                        return(false);
                    }

                    skillShot.CastMinimumHitchance(target, hitChance);
                    return(true);
                }
                if (target != null && target.IsValidTarget(spell.Range))
                {
                    spell.Cast(target);
                    return(true);
                }
            }
            #endregion LaneClear

            return(false);
        }
Пример #22
0
        public static void OnSkillShotDetected_OnDetect(DetectedSkillshotData args)
        {
            if (args.Caster == null || !args.Caster.IsEnemy || !args.WillHit(Player.Instance) || !Program.SubMenu["enabled"].Cast <CheckBox>().CurrentValue)
            {
                return;
            }

            var hero   = args.Caster as AIHeroClient;
            var player = Player.Instance;

            #region Skillshots

            foreach (var shot in Shots.Where(shot => args.Data.MissileName == shot))
            {
                if (player.BaseSkinName == "Zyra")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    E = new Spell.SimpleSkillshot(SpellSlot.E);
                    {
                        if (hero != null && W.IsReady() && E.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                            E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Sivir")
                {
                    E = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Heimerdinger")
                {
                    Q = new Spell.SimpleSkillshot(SpellSlot.Q);
                    {
                        if (hero != null && Q.IsReady())
                        {
                            Q.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Leblanc")
                {
                    R  = new Spell.Active(SpellSlot.R);
                    R1 = new Spell.SimpleSkillshot(SpellSlot.R);
                    {
                        if (hero != null && R.IsReady())
                        {
                            if (player.Spellbook.Spells[3].Name == "LeblancR")
                            {
                                R.Cast();
                                R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                            }
                            else
                            {
                                R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                            }
                        }
                    }
                }

                if (player.BaseSkinName == "Shaco")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Fiora")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast(hero.ServerPosition);
                        }
                    }
                }

                if (player.BaseSkinName == "Fizz")
                {
                    W = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady() && E.ToggleState != 1)
                        {
                            E.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Malzahar")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "MonkeyKing")
                {
                    W = new Spell.Active(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Yasuo")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 5));
                        }
                    }
                }

                if (player.BaseSkinName == "Nocturne")
                {
                    E = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }
            }

            #endregion

            #region Hooks

            foreach (var hook in Hooks.Where(hook => args.Data.MissileName == hook))
            {
                if (player.BaseSkinName == "Zyra")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    E = new Spell.SimpleSkillshot(SpellSlot.E);
                    {
                        if (hero != null && W.IsReady() && E.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                            E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Sivir")
                {
                    E = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Anivia")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            Core.DelayAction(() => W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50)), (int)player.Distance(hero) / 2);
                        }
                    }
                }

                if (player.BaseSkinName == "Heimerdinger")
                {
                    Q = new Spell.SimpleSkillshot(SpellSlot.Q);
                    {
                        if (hero != null && Q.IsReady())
                        {
                            Q.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Leblanc")
                {
                    R  = new Spell.Active(SpellSlot.R);
                    R1 = new Spell.SimpleSkillshot(SpellSlot.R);
                    {
                        if (hero != null && R.IsReady())
                        {
                            if (player.Spellbook.Spells[3].Name == "LeblancR")
                            {
                                R.Cast();
                                R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                            }
                            else
                            {
                                R1.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50));
                            }
                        }
                    }
                }

                if (player.BaseSkinName == "Shaco")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Fiora")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast(hero.ServerPosition);
                        }
                    }
                }

                if (player.BaseSkinName == "Fizz")
                {
                    E = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady() && E.ToggleState != 1)
                        {
                            E.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Malzahar")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 80));
                        }
                    }
                }

                if (player.BaseSkinName == "Trundle")
                {
                    E = new Spell.SimpleSkillshot(SpellSlot.E, 1000);
                    {
                        if (hero != null && E.IsReady())
                        {
                            Core.DelayAction(() => E.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 50)), (int)player.Distance(hero) / 2);
                        }
                    }
                }

                if (player.BaseSkinName == "MonkeyKing")
                {
                    W = new Spell.Active(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast();
                        }
                    }
                }

                if (player.BaseSkinName == "Yasuo")
                {
                    W = new Spell.SimpleSkillshot(SpellSlot.W);
                    {
                        if (hero != null && W.IsReady())
                        {
                            W.Cast((Vector3)player.ServerPosition.Extend(hero.ServerPosition, 5));
                        }
                    }
                }

                if (player.BaseSkinName == "Nocturne")
                {
                    E = new Spell.Active(SpellSlot.E);
                    {
                        if (hero != null && E.IsReady())
                        {
                            E.Cast();
                        }
                    }
                }
            }

            #endregion
        }