private static void ECast(Obj_AI_Base target)
 {
     if (EReady && IsValid(E, target) && Checker.ComboUseE)
     {
         E.Cast(target);
     }
 }
 private static void RCast(Obj_AI_Base target)
 {
     if (RReady && IsRooted(target) && IsValid(W, target) && Checker.ComboUseR)
     {
         R.Cast();
     }
 }
 private static void QCast(Obj_AI_Base target)
 {
     if (QReady && IsValid(Q, target) && Checker.ComboUseQ)
     {
         Q.Cast(target);
     }
 }
 private static void WCast(Obj_AI_Base target)
 {
     if (WReady && IsValid(W, target) && Checker.ComboUseW)
     {
         W.Cast(target);
     }
 }
示例#5
0
        private void CastQE(Vector3 position)
        {
            LastCast = Game.Time;
            gatePos  = extend(Hero.Position, position, MiscMenu["GateDistance"].Cast <Slider>().CurrentValue, true); // in front, horizontal
            switch (MiscMenu["GateMode"].Cast <ComboBox>().CurrentValue)
            {
            case 0:     // vertical fast
                Qcharge.Cast(position);
                gatePos = new Vector3(Hero.Position.Y + Hero.Position.X - gatePos.Y, Hero.Position.Y - Hero.Position.X + gatePos.X, Hero.Position.Z);
                break;

            case 2:     // horizontal slow
                E2.Cast(gatePos);
                break;
            }
            Qcharge.Cast(position);
        }
示例#6
0
 public static bool TryToCast(this Spell.SpellBase spell, Obj_AI_Base target, Menu m)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCast(spell, m) && spell.Cast(target));
 }
示例#7
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);
         }
     }
 }
示例#8
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);
         }
     }
 }
示例#9
0
文件: Jayce.cs 项目: tekintr/Elobuddy
        private static void CastQE(Vector3 position)
        {
            LastCast = Game.Time;
            gatePos  = Helper.extend(hero.Position, position, MiscMenu["jayce.gatedistance"].Cast <Slider>().CurrentValue, 1); // in front, horizontal

            if (MiscMenu["jayce.parallel"].Cast <CheckBox>().CurrentValue)
            {
                gatePos = new Vector3(hero.Position.Y + hero.Position.X - gatePos.Y, hero.Position.Y - hero.Position.X + gatePos.X, hero.Position.Z);
            }
            QE.Cast(position);
        }
示例#10
0
        public static void CastE2(this Spell.SpellBase spell)
        {
            if (spell.Slot != SpellSlot.E)
            {
                return;
            }

            if (Player.Instance.CountEnemyChampionsInRange(E.Range) > 0)
            {
                spell.Cast();
            }
        }
示例#11
0
 /// <summary>
 /// It will only cast the spell if it can
 /// </summary>
 /// <param name="spell">Active Spell</param>
 /// <param name="target">Target to cast the spell</param>
 public static bool TryCast(this Spell.SpellBase spell, Obj_AI_Base target)
 {
     if (spell != null)
     {
         var spellSlot = spell.Slot.ToString()[spell.Slot.ToString().Length - 1];
         if (target.CanCast(spell) &&
             !OKTR_Core.OKTRSpellTargetSelectorMenu.GetCheckBoxValue(OKTR_Core.OKTRSpellTargetSelectorMenuID + spellSlot + target.BaseSkinName))
         {
             return(spell.Cast(target));
         }
     }
     return(false);
 }
示例#12
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);
            }
        }
示例#13
0
文件: Spells.cs 项目: spall9/T2N1
 public static bool TryToCast(this Spell.SpellBase spell, Obj_AI_Base target, Menu m)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower()) && spell.Cast(target));
 }
示例#14
0
        /// <summary>
        ///     Casting Logic.
        /// </summary>
        public static void Casting(Spell.SpellBase spellBase, Obj_AI_Base target, bool enabled = true)
        {
            if (spellBase == null || target == null || !enabled)
            {
                return;
            }

            if (spellBase.DontWaste() && ModesManager.CurrentMode == ModesManager.Modes.LaneClear || ModesManager.CurrentMode == ModesManager.Modes.Harass)
            {
                return;
            }

            if (spellBase.IsDangerDash() && target.CountAllyHeros(1000) >= target.CountEnemyHeros(1000) && ModesManager.CurrentMode != ModesManager.Modes.LaneClear &&
                (target.PredictPosition().UnderEnemyTurret() && Misc.SafeToDive || !target.PredictPosition().UnderEnemyTurret()))
            {
                if (target.Position.IsSafe() && target.Position.SafeDive())
                {
                    spellBase.Cast(target);
                }
                return;
            }

            if (spellBase.IsDangerDash())
            {
                return;
            }

            if (spellBase.IsDash())
            {
                if (target.Distance(Player.Instance) > 400 && Player.Instance.PredictHealthPercent() > 50)
                {
                    var chargeable = spellBase as Spell.Chargeable;
                    if (chargeable != null)
                    {
                        if (!chargeable.IsCharging)
                        {
                            if (target.Position.IsSafe() && target.Position.SafeDive())
                            {
                                chargeable.StartCharging();
                            }
                            return;
                        }
                        if (chargeable.IsInRange(target))
                        {
                            if (target.Position.IsSafe() && target.Position.SafeDive())
                            {
                                chargeable.Cast(target);
                            }
                            return;
                        }
                        return;
                    }
                    var pos = target.PredictPosition().Extend(Player.Instance, 300).To3D();
                    if (pos.IsSafe() && pos.SafeDive())
                    {
                        spellBase.Cast(target.PredictPosition().Extend(Player.Instance, 300).To3D());
                    }
                }
                else
                {
                    var pos = Player.Instance.ServerPosition.Extend(ObjectsManager.AllySpawn, 300).To3D();
                    if (pos.IsSafe() && pos.SafeDive())
                    {
                        spellBase.Cast(pos);
                    }
                }
                return;
            }

            if (spellBase.IsToggle())
            {
                if (spellBase is Spell.Active)
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                        return;
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                        return;
                    }
                }
                else
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(target);
                        return;
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(Game.CursorPos);
                        return;
                    }
                }
            }

            if (spellBase is Spell.Active)
            {
                spellBase.Cast();
                return;
            }

            if ((spellBase is Spell.Skillshot || spellBase is Spell.Targeted || spellBase is Spell.Ranged) && !(spellBase is Spell.Chargeable))
            {
                spellBase.Cast(target);
                return;
            }

            if (spellBase is Spell.Chargeable)
            {
                var chargeable = spellBase as Spell.Chargeable;

                if (!chargeable.IsCharging)
                {
                    chargeable.StartCharging();
                    return;
                }
                if (chargeable.IsInRange(target))
                {
                    chargeable.Cast(target);
                }
            }
        }
示例#15
0
        /// <summary>
        ///     Casting Logic.
        /// </summary>
        public static void Casting(Spell.SpellBase spellBase, Obj_AI_Base target)
        {
            if (spellBase == null || target == null)
            {
                return;
            }

            if (spellBase.IsDash())
            {
                spellBase.Cast(target.ServerPosition.Extend(Player.Instance, 200).To3D());
                return;
            }

            if (spellBase.IsToggle())
            {
                if (spellBase is Spell.Active)
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                    }
                }
                else
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(target);
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(Game.CursorPos);
                    }
                }
            }

            if (spellBase is Spell.Active)
            {
                spellBase.Cast();
                return;
            }

            if ((spellBase is Spell.Skillshot || spellBase is Spell.Targeted || spellBase is Spell.Ranged) && !(spellBase is Spell.Chargeable))
            {
                spellBase.Cast(target);
                return;
            }

            if (spellBase is Spell.Chargeable)
            {
                var Chargeable = spellBase as Spell.Chargeable;

                if (!Chargeable.IsCharging)
                {
                    Chargeable.StartCharging();
                    return;
                }
                if (Chargeable.IsInRange(target))
                {
                    Chargeable.Cast(target);
                }
            }
        }
        /// <summary>
        ///     Casting Logic.
        /// </summary>
        public static void Casting(Spell.SpellBase spellBase, Obj_AI_Base target, bool enabled = true)
        {
            if (spellBase == null || target == null || !enabled)
            {
                return;
            }

            if (spellBase.DontWaste() && ModesManager.LaneClear)
            {
                return;
            }

            if (spellBase.IsDangerDash() && target.CountAlliesInRange(1000) >= target.CountEnemiesInRange(1000) &&
                (target.PredictPosition().UnderEnemyTurret() && Misc.SafeToDive || !target.PredictPosition().UnderEnemyTurret()))
            {
                spellBase.Cast(target);
                return;
            }

            if (spellBase.IsDangerDash())
            {
                return;
            }

            if (spellBase.IsDash())
            {
                spellBase.Cast(target.PredictPosition().Extend(Player.Instance, 300).To3D());
                return;
            }

            if (spellBase.IsToggle())
            {
                if (spellBase is Spell.Active)
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                        return;
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast();
                        return;
                    }
                }
                else
                {
                    if (spellBase.Handle.ToggleState != 2 && target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(target);
                        return;
                    }
                    if (spellBase.Handle.ToggleState == 2 && !target.IsValidTarget(spellBase.Range))
                    {
                        spellBase.Cast(Game.CursorPos);
                        return;
                    }
                }
            }

            if (spellBase is Spell.Active)
            {
                spellBase.Cast();
                return;
            }

            if ((spellBase is Spell.Skillshot || spellBase is Spell.Targeted || spellBase is Spell.Ranged) && !(spellBase is Spell.Chargeable))
            {
                spellBase.Cast(target);
                return;
            }

            if (spellBase is Spell.Chargeable)
            {
                var chargeable = spellBase as Spell.Chargeable;

                if (!chargeable.IsCharging)
                {
                    chargeable.StartCharging();
                    return;
                }
                if (chargeable.IsInRange(target))
                {
                    chargeable.Cast(target);
                }
            }
        }
示例#17
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();
                        }
                    }
                }
            }
        }
示例#18
0
        public static bool CastOnBestTarget(this Spell.SpellBase spell)
        {
            var target = spell.GetTarget();

            return(target != null && spell.Cast(target));
        }
示例#19
0
文件: Spells.cs 项目: spall9/T2N1
 public static bool TryToCast(this Spell.SpellBase spell, Vector3 pos, Menu m)
 {
     if (pos == Vector3.Zero)
     {
         return(false);
     }
     return(pos.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower()) && spell.Cast(pos));
 }
示例#20
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);
        }
示例#21
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
        }