示例#1
0
        private static void ComboUsage(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame || Game.IsChatOpen)
            {
                return;
            }

            Target = Me.ClosestToMouseTarget(ClosestToMouseRange.GetValue <Slider>().Value);
            if (Game.IsKeyDown(ComboKey.GetValue <KeyBind>().Key))
            {
                GetAbilities();

                if (Target == null || !Target.IsValid || !Target.IsVisible || Target.IsIllusion || !Target.IsAlive ||
                    Me.IsChanneling() || Target.IsInvul() || HasModifiers())
                {
                    return;
                }

                if (Target.IsLinkensProtected())
                {
                    PopLinkens(Cyclone);
                    PopLinkens(ForceStaff);
                    PopLinkens(Atos);
                    PopLinkens(Sheep);
                    PopLinkens(Orchid);
                    PopLinkens(Dagon);
                    PopLinkens(Silence);
                }
                else
                {
                    if (!Utils.SleepCheck("combosleep"))
                    {
                        return;
                    }

                    Orbwalk();

                    if (Target.Distance2D(Me.Position) < 700)
                    {
                        if (Utils.SleepCheck("ezkill"))
                        {
                            EzKill = IsEzKillable();
                            Utils.Sleep(5000, "ezkill");
                        }
                    }

                    if (Soulring != null && Soulring.CanBeCasted() && SoulRing.GetValue <bool>())
                    {
                        Soulring.UseAbility();
                    }

                    if (!Target.UnitState.HasFlag(UnitState.Hexed) && !Target.UnitState.HasFlag(UnitState.Stunned))
                    {
                        UseItem(Sheep, Sheep.GetCastRange());
                    }

                    UseBlink();
                    CastAbility(Silence, Silence.GetCastRange());
                    CastAbility(Bolt, Bolt.GetCastRange());
                    CastAbility(Slow, Slow.GetCastRange());

                    UseItem(Atos, Atos.GetCastRange(), 140);
                    UseItem(Medal, Medal.GetCastRange());
                    UseItem(Orchid, Orchid.GetCastRange());
                    UseItem(Bloodthorn, Bloodthorn.GetCastRange());
                    UseItem(Veil, Veil.GetCastRange());
                    UseItem(Ethereal, Ethereal.GetCastRange());

                    UseDagon();

                    CastUltimate();

                    UseItem(Shivas, Shivas.GetCastRange());

                    Utils.Sleep(150, "combosleep");
                }
            }

            if (Game.IsKeyDown(HarassKey.GetValue <KeyBind>().Key))
            {
                GetAbilities();
                if (Target == null || !Target.IsValid || !Target.IsVisible || Target.IsIllusion || !Target.IsAlive ||
                    Me.IsChanneling() || Target.IsInvul() || HasModifiers())
                {
                    return;
                }
                if (!Utils.SleepCheck("harasssleep"))
                {
                    return;
                }
                Orbwalk();
                CastAbility(Bolt, Bolt.GetCastRange());
                Utils.Sleep(150, "harasssleep");
            }
        }