示例#1
0
        public static void Game_ProcessSpell(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args)
        {
            if (args == null || hero == null)
            {
                return;
            }
            Obj_AI_Hero targetW   = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
            var         spellName = args.SData.Name;
            Obj_AI_Hero target    = args.Target as Obj_AI_Hero;

            if (targetW != null)
            {
                hero = targetW;
            }
            if (target != null && (!hero.HasBuff("fiorarmark") || (hero.HasBuff("fiorarmark") && player.HealthPercent < 50)) &&
                (W.IsReady() && target.IsMe &&
                 (Orbwalking.IsAutoAttack(spellName) || CombatHelper.IsAutoattack(spellName)) &&
                 ((config.Item("usew", true).GetValue <bool>() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                   hero is Obj_AI_Hero &&
                   ((config.Item("usewDangerous", true).GetValue <bool>() &&
                     target.GetAutoAttackDamage(player, true) > player.Health * 0.1f) ||
                    !config.Item("usewDangerous", true).GetValue <bool>())) ||
                  config.Item("autoW", true).GetValue <bool>()) &&
                 !(hero is Obj_AI_Turret || hero.Name == "OdinNeutralGuardian") && player.Distance(hero) < 700))
            {
                var perc = config.Item("minmanaP", true).GetValue <Slider>().Value / 100f;
                if (player.Mana > player.MaxMana * perc && hero.TotalAttackDamage > 50 &&
                    ((player.UnderTurret(true) && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) ||
                     !player.UnderTurret(true)))
                {
                    W.Cast(hero, config.Item("packets").GetValue <bool>());
                }
            }
            if (config.Item("usewCC", true).GetValue <bool>())
            {
                if (spellName == "CurseofTheSadMummy")
                {
                    if (player.Distance(hero.Position) <= 600f)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (CombatHelper.IsFacing(target, player.Position) &&
                    (spellName == "EnchantedCrystalArrow" || spellName == "rivenizunablade" ||
                     spellName == "EzrealTrueshotBarrage" || spellName == "JinxR" || spellName == "sejuaniglacialprison"))
                {
                    if (player.Distance(hero.Position) <= W.Range - 60)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (spellName == "InfernalGuardian" || spellName == "UFSlash" ||
                    (spellName == "RivenW" && player.HealthPercent < 25))
                {
                    if (player.Distance(args.End) <= 270f)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (spellName == "BlindMonkRKick" || spellName == "SyndraR" || spellName == "VeigarPrimordialBurst" ||
                    spellName == "AlZaharNetherGrasp" || spellName == "LissandraR")
                {
                    if (args.Target.IsMe)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (spellName == "TristanaR" || spellName == "ViR")
                {
                    if (args.Target.IsMe || player.Distance(args.Target.Position) <= 100f)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (spellName == "GalioIdolOfDurand")
                {
                    if (player.Distance(hero.Position) <= 600f)
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
                if (target != null && target.IsMe)
                {
                    if (CombatHelper.isTargetedCC(spellName) && spellName != "NasusW" && spellName != "ZedUlt")
                    {
                        W.Cast(TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical));
                    }
                }
            }
        }