当前位置: 首页>>代码示例>>C#>>正文


C# Item.CanBeCasted方法代码示例

本文整理汇总了C#中System.Item.CanBeCasted方法的典型用法代码示例。如果您正苦于以下问题:C# Item.CanBeCasted方法的具体用法?C# Item.CanBeCasted怎么用?C# Item.CanBeCasted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Item的用法示例。


在下文中一共展示了Item.CanBeCasted方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Game_OnUpdate

        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsChatOpen || Game.IsWatchingGame || !Utils.SleepCheck("updaterate"))
                return;

            if (me.IsChanneling() || me.IsInvisible() || !Menu.Item("toggle").GetValue<KeyBind>().Active) return;
            dagon = me.GetDagon();
            target = ObjectManager.GetEntitiesParallel<Hero>().FirstOrDefault(CheckTarget);

            if (dagon == null || target == null || !me.CanUseItems() || !dagon.CanBeCasted()) return;
            dagon.UseAbility(target);
            Utils.Sleep(100, "updaterate");
        }
开发者ID:Splinter-,项目名称:EnsageSharp,代码行数:13,代码来源:Program.cs

示例2: Game_OnUpdate

 public static void Game_OnUpdate(EventArgs args)
 {
     if (!Game.IsInGame) return;
     _me = ObjectMgr.LocalHero;
     if (_me == null || _me.ClassID != ClassID.CDOTA_Unit_Hero_Morphling)
     {
         return;
     }
     if (!_activated) return;
     if ((_target == null || !_target.IsVisible) && !_me.IsChanneling())
         _me.Move(Game.MousePosition);
     if (_target == null || _me.Distance2D(_target) > 500)
         _target = _me.ClosestToMouseTarget(1000);
     //Skills & Items
     waveform = _me.Spellbook.Spell1;
     adapt = _me.Spellbook.Spell2;
     eblade = _me.FindItem("item_ethereal_blade");
     bkb = _me.FindItem("item_black_king_bar");
     if (_target != null && _target.IsAlive && !_target.IsInvul())
     {
         if (!Utils.SleepCheck("Morph_Wait")) return;
         var targetDistance = _me.Distance2D(_target);
         var attackRange = 1000;
         if (targetDistance <= attackRange && waveform != null && waveform.CanBeCasted() && Utils.SleepCheck("waveform"))
         {
             waveform.UseAbility(_target.Position);
             Utils.Sleep(150 + Game.Ping, "waveform");
         }
         else if (bkb !=null && _bkbToggle && Utils.SleepCheck("BKB"))
         {
             bkb.UseAbility();
             Utils.Sleep(150 + Game.Ping, "BKB");
         }
         else if (eblade != null && eblade.CanBeCasted() && Utils.SleepCheck("eblade"))
         {
             eblade.UseAbility(_target);
             Utils.Sleep(150 + Game.Ping, "eblade");
         }
         else if (adapt != null && adapt.CanBeCasted() && Utils.SleepCheck("adapt"))
         {
             adapt.UseAbility(_target);
             Utils.Sleep(150 + Game.Ping, "adapt");
         }
     }
 }
开发者ID:potassiumsquare,项目名称:Morph,代码行数:45,代码来源:Program.cs

示例3: Tick

        public static void Tick(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
                return;
            me = ObjectMgr.LocalHero;
            target = ObjectMgr.GetEntities<Hero>().Where(x => x.Health <= 100 && x.Distance2D(me) <= 950 && !x.IsIllusion && x.IsAlive && x.Team != me.Team).ToList();
            if (me == null || target.FirstOrDefault() == null)
                return;
            urn_of_shadows = me.FindItem("item_urn_of_shadows");

            if (!me.IsChanneling() && target.FirstOrDefault() != null && urn_of_shadows != null && (!me.IsInvisible() || me.ClassID == ClassID.CDOTA_Unit_Hero_Riki))
            {
                if (me.CanCast() && urn_of_shadows.CanBeCasted() && Utils.SleepCheck("urn"))
                {
                    urn_of_shadows.UseAbility(target.FirstOrDefault());
                    Utils.Sleep(200, "urn");
                }
            }
        }
开发者ID:jaddyknight,项目名称:EnsageSharp,代码行数:19,代码来源:AutoUrn.cs

示例4: Combo

        public void Combo()
        {
            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);

            if (Menu.Item("keyW").GetValue<KeyBind>().Active)
            {
                var HealingWard = ObjectManager.GetEntities<Unit>().Where(x => (x.ClassID == ClassID.CDOTA_BaseNPC_Additive)
                    && x.IsAlive && x.IsControllable && x.Team == me.Team).ToList();
                if (HealingWard.Count >= 1)
                {
                    for (int i = 0; i < HealingWard.Count(); ++i)
                    {
                        if (me.Position.Distance2D(HealingWard[i].Position) > 5 && Utils.SleepCheck(HealingWard[i].Handle.ToString()))
                        {
                            HealingWard[i].Move(me.Predict(310));
                            Utils.Sleep(50, HealingWard[i].Handle.ToString());
                        }
                    }
                }
            }
            Q = me.Spellbook.SpellQ;
            W = me.Spellbook.SpellW;
            R = me.Spellbook.SpellR;

            mom = me.FindItem("item_mask_of_madness");
            urn = me.FindItem("item_urn_of_shadows");
            dagon = me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
            ethereal = me.FindItem("item_ethereal_blade");
            halberd = me.FindItem("item_heavens_halberd");
            mjollnir = me.FindItem("item_mjollnir");
            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
            abyssal = me.FindItem("item_abyssal_blade");
            mail = me.FindItem("item_blade_mail");
            bkb = me.FindItem("item_black_king_bar");
            satanic = me.FindItem("item_satanic");
            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
            Shiva = me.FindItem("item_shivas_guard");
            manta = me.FindItem("item_manta");
            var v =
                ObjectManager.GetEntities<Hero>()
                    .Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
                    .ToList();
            e = Toolset.ClosestToMouse(me);

            if (e == null) return;
            if (Active && me.Distance2D(e) <= 1400 && me.HasModifier("modifier_juggernaut_blade_fury") && Utils.SleepCheck("move"))
            {
                me.Move(Prediction.InFront(e, 170));
                Utils.Sleep(150, "move");
            }
            if (Active && me.Distance2D(e) <= 1400)
            {
                if (Menu.Item("orbwalk").GetValue<bool>() && !me.HasModifier("modifier_juggernaut_blade_fury"))
                {
                    Orbwalking.Orbwalk(e, 0, 1600, true, true);
                }
                if ( // MOM
                    mom != null
                    && mom.CanBeCasted()
                    && me.CanCast()
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(mom.Name)
                    && Utils.SleepCheck("mom")
                    && me.Distance2D(e) <= 700
                    )
                {
                    mom.UseAbility();
                    Utils.Sleep(250, "mom");
                }
                if ( // Mjollnir
                    mjollnir != null
                    && mjollnir.CanBeCasted()
                    && me.CanCast()
                    && !e.IsMagicImmune()
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(mjollnir.Name)
                    && Utils.SleepCheck("mjollnir")
                    && me.Distance2D(e) <= 900
                    )
                {
                    mjollnir.UseAbility(me);
                    Utils.Sleep(250, "mjollnir");
                } // Mjollnir Item end
                if ((manta != null
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(manta.Name))
                    && manta.CanBeCasted() && me.IsSilenced() && Utils.SleepCheck("manta"))
                {
                    manta.UseAbility();
                    Utils.Sleep(400, "manta");
                }
                if ((manta != null && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(manta.Name))
                    && manta.CanBeCasted() && (e.Position.Distance2D(me.Position) <= me.GetAttackRange() + me.HullRadius)
                    && Utils.SleepCheck("manta"))
                {
                    manta.UseAbility();
                    Utils.Sleep(150, "manta");
                }
                if ( // Medall
                    medall != null
                    && medall.CanBeCasted()
                    && Utils.SleepCheck("Medall")
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(medall.Name)
//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:JuggernautController.cs

示例5: Game_OnUpdate

        public static void Game_OnUpdate(EventArgs args)
        {
            var me = ObjectMgr.LocalHero;

            var target = me.ClosestToMouseTarget(1200);

            if (target == null)
            {
                return;
            }
            if (activated && target.IsAlive && !target.IsInvul() && Game.MousePosition.Distance2D(target) <= 1000 || target.Distance2D(me) <= 600)
            {

                //spell
                var CheckStun = target.Modifiers.Any(y => y.Name == "modifier_centaur_hoof_stomp");
                var CheckSetka = target.Modifiers.Any(y => y.Name == "modifier_dark_troll_warlord_ensnare");
                var Neutrals = ObjectMgr.GetEntities<Creep>().Where(creep => (creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Lane || creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Siege || creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral || creep.ClassID == ClassID.CDOTA_BaseNPC_Invoker_Forged_Spirit || creep.ClassID == ClassID.CDOTA_BaseNPC_Creep &&
                 creep.IsAlive && creep.IsVisible && creep.IsSpawned) && creep.Team == me.GetEnemyTeam()).ToList();
                var Neutral = ObjectMgr.GetEntities<Creep>().Where(creep => ( creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral &&
                 creep.IsAlive ) && creep.Team == me.GetEnemyTeam()).ToList();

                var troll = ObjectMgr.GetEntities<Creep>().Where(unit => unit.Name == "npc_dota_neutral_dark_troll_warlord").ToList();
                if (troll == null)
                {
                    return;
                }
                    foreach (var v in troll)
                    {

                        if (target.Position.Distance2D(v.Position) < 550 && (!CheckSetka || !CheckStun || target.IsHexed() || target.IsStunned()) && v.Spellbook.SpellQ.CanBeCasted() &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Spellbook.SpellQ.UseAbility(target);
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                        if (target.Position.Distance2D(v.Position) < 1550 &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Attack(target);
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                    }

                var lizard = ObjectMgr.GetEntities<Creep>().Where(unit => unit.Name == "npc_dota_neutral_big_thunder_lizard").ToList();
                if (lizard == null)
                {
                    return;
                }

                    foreach (var v in lizard)
                    {

                        if (target.Position.Distance2D(v.Position) < 250 && v.Spellbook.SpellQ.CanBeCasted() &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Spellbook.SpellQ.UseAbility();
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                        if (target.Position.Distance2D(v.Position) < 550 && v.Spellbook.SpellQ.CanBeCasted() &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Spellbook.SpellW.UseAbility();
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                        if (target.Position.Distance2D(v.Position) < 1550 &&
                          Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Attack(target);
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                    }

                var centaur = ObjectMgr.GetEntities<Creep>().Where(unit => unit.Name == "npc_dota_neutral_centaur_khan").ToList();
                if (centaur == null)
                {
                    return;
                }
                    foreach (var v in centaur)
                    {

                        if (target.Position.Distance2D(v.Position) < 200 && (!CheckSetka || !CheckStun || target.IsHexed() || target.IsStunned()) && v.Spellbook.SpellQ.CanBeCasted() &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Spellbook.SpellQ.UseAbility();
                            Utils.Sleep(300, v.Handle.ToString());
                        }

                        if (target.Position.Distance2D(v.Position) < 1550 &&
                            Utils.SleepCheck(v.Handle.ToString()))
                        {
                            v.Attack(target);
                            Utils.Sleep(700, v.Handle.ToString());
                        }
                    }

                var satyr = ObjectMgr.GetEntities<Creep>().Where(unit => unit.Name == "npc_dota_neutral_satyr_hellcaller").ToList();
                if (satyr == null)
                {
                    return;
                }
//.........这里部分代码省略.........
开发者ID:EmptyMer1s0n,项目名称:ReworkAllScripts,代码行数:101,代码来源:Program.cs

示例6: Combo

        public void Combo()
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
                return;

            //manta (when silenced)

            target = me.ClosestToMouseTarget(2000);
            if (target == null) return;
            Active = Game.IsKeyDown(menu.Item("Combo Key").GetValue<KeyBind>().Key) && !Game.IsChatOpen;
            Q = me.Spellbook.SpellQ;

            W = me.Spellbook.SpellW;

            R = me.Spellbook.SpellR;

            // item
            sheep = target.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");

            satanic = me.FindItem("item_satanic");

            shiva = me.FindItem("item_shivas_guard");

            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));

            arcane = me.FindItem("item_arcane_boots");

            mom = me.FindItem("item_mask_of_madness");

            vail = me.FindItem("item_veil_of_discord");

            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");

            ethereal = me.FindItem("item_ethereal_blade");

            blink = me.FindItem("item_blink");

            soulring = me.FindItem("item_soul_ring");

            cheese = me.FindItem("item_cheese");

            halberd = me.FindItem("item_heavens_halberd");

            abyssal = me.FindItem("item_abyssal_blade");

            mjollnir = me.FindItem("item_mjollnir");
            var stoneModif = target.HasModifier("modifier_medusa_stone_gaze_stone");
            var linkens = target.IsLinkensProtected();
            var noBlade = target.HasModifier("modifier_item_blade_mail_reflect");
            if (Active && me.IsAlive && target.IsAlive)
            {
                if (target.IsVisible && me.Distance2D(target) <= 2300 && !noBlade)
                {
                    if (
                        me.Distance2D(target) <= 300 && (!me.IsAttackImmune() || !target.IsAttackImmune())
                        && me.NetworkActivity != NetworkActivity.Attack && me.CanAttack() && Utils.SleepCheck("attack")
                        )
                    {
                        me.Attack(target);
                        Utils.Sleep(190, "attack");
                    }
                    else if (
                         ((!me.CanAttack() && me.Distance2D(target) >= 0) || me.Distance2D(target) >= 300) && me.NetworkActivity != NetworkActivity.Attack &&
                         me.Distance2D(target) <= 1500 && Utils.SleepCheck("Move")
                         )
                    {
                        me.Move(target.Predict(350));
                        Utils.Sleep(350, "Move");
                    }
                    if (
                        R != null
                        && R.CanBeCasted()
                        && !me.HasModifier("modifier_nyx_assassin_vendetta")
                        && me.Distance2D(target) <= 1400
                        && menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name)
                        && Utils.SleepCheck("R")
                        )
                    {
                        R.UseAbility();
                        Utils.Sleep(200, "R");
                    }
                    if (me.HasModifier("modifier_nyx_assassin_vendetta"))
                        return;
                    if (!R.CanBeCasted() ||
                        R == null || !me.HasModifier("modifier_nyx_assassin_vendetta") || !menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name))
                    {
                        if (stoneModif) return;
                        float angle = me.FindAngleBetween(target.Position, true);
                        Vector3 pos = new Vector3((float)(target.Position.X - 100 * Math.Cos(angle)), (float)(target.Position.Y - 100 * Math.Sin(angle)), 0);
                        if (
                            blink != null
                            && Q.CanBeCasted()
                            && me.CanCast()
                            && blink.CanBeCasted()
                            && me.Distance2D(target) >= 300
                            && me.Distance2D(pos) <= 1180
                            && menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
                            && Utils.SleepCheck("blink")
                            )
                        {
//.........这里部分代码省略.........
开发者ID:Rulfy,项目名称:ReworkAllScripts,代码行数:101,代码来源:NyxAssassinController.cs

示例7: Combo

        public void Combo()
        {
            if (!Menu.Item("enabled").IsActive())
                return;

            e = Toolset.ClosestToMouse(me);
            if (e == null)
                return;
            Q = me.Spellbook.SpellQ;
            W = me.Spellbook.SpellW;
            R = me.Spellbook.SpellR;
            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);

            Shiva = me.FindItem("item_shivas_guard");
            ethereal = me.FindItem("item_ethereal_blade");
            mom = me.FindItem("item_mask_of_madness");
            urn = me.FindItem("item_urn_of_shadows");
            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
            halberd = me.FindItem("item_heavens_halberd");
            mjollnir = me.FindItem("item_mjollnir");
            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
            abyssal = me.FindItem("item_abyssal_blade");
            mail = me.FindItem("item_blade_mail");
            bkb = me.FindItem("item_black_king_bar");
            satanic = me.FindItem("item_satanic");
            blink = me.FindItem("item_blink");
            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
            cyclone = me.FindItem("item_cyclone");
            force = me.FindItem("item_force_staff");
            sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
            cheese = me.FindItem("item_cheese");
            soul = me.FindItem("item_soul_ring");
            arcane = me.FindItem("item_arcane_boots");
            stick = me.FindItem("item_magic_stick") ?? me.FindItem("item_magic_wand");
            phase = me.FindItem("item_phase_boots");
            var v =
                ObjectManager.GetEntities<Hero>()
                    .Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
                    .ToList();

            var stoneModif = e.Modifiers.Any(y => y.Name == "modifier_medusa_stone_gaze_stone");
            var modifR = e.Modifiers.Any(y => y.Name == "modifier_bloodseeker_rupture");
            var modifQ = e.HasModifier("modifier_bloodseeker_bloodrage");
            if (Active && me.Distance2D(e) <= 1400 && e != null && e.IsAlive)
            {
                if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900)
                {
                    Orbwalking.Orbwalk(e, 0, 1600, true, true);
                }
            }
            if (Active && me.Distance2D(e) <= 1400 && e != null && e.IsAlive && !me.IsInvisible())
            {
                if (cyclone != null && cyclone.CanBeCasted() && W.CanBeCasted()
                       && me.Distance2D(e) <= cyclone.GetCastRange() + 300
                       && Menu.Item("Item").GetValue<AbilityToggler>().IsEnabled(cyclone.Name)
                       && W.CanBeCasted()
                       && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
                       && Utils.SleepCheck(me.Handle.ToString()))
                {
                    cyclone.UseAbility(e);
                    Utils.Sleep(500, me.Handle.ToString());
                }
                if (
                       Q != null && Q.CanBeCasted() && me.Distance2D(e) <= 700
                       && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                       && !modifQ
                       && Utils.SleepCheck("Q")
                       )
                {
                    Q.UseAbility(me);
                    Utils.Sleep(200, "Q");
                }
                if (
                      W != null && W.CanBeCasted() && me.Distance2D(e) <= 700
                      &&
                      (!cyclone.CanBeCasted() || cyclone == null ||
                       !Menu.Item("Item").GetValue<AbilityToggler>().IsEnabled(cyclone.Name))
                      && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(W.Name)
                      && Utils.SleepCheck("W")
                      )
                {
                    W.UseAbility(e.Predict(300));
                    Utils.Sleep(200, "W");
                }

                if (
                    force != null
                    && force.CanBeCasted()
                    && me.Distance2D(e) < 800
                    && modifR
                    && e.IsSilenced()
                    && Menu.Item("Item").GetValue<AbilityToggler>().IsEnabled(force.Name)
                    && Utils.SleepCheck("force"))
                {
                    force.UseAbility(e);
                    Utils.Sleep(240, "force");
                }
                if (cyclone == null || !cyclone.CanBeCasted() || !Menu.Item("Item").GetValue<AbilityToggler>().IsEnabled(cyclone.Name))
                {

//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:BloodseekerController.cs

示例8: Game_OnUpdate

        public static void Game_OnUpdate(EventArgs args)
        {
            var me = ObjectMgr.LocalHero;

            if (!Game.IsInGame || me.ClassID != ClassID.CDOTA_Unit_Hero_Pugna || me == null)
            {
                return;
            }

            var target = me.ClosestToMouseTarget(2000);
            if (target == null)
            {
                return;
            }

            //spell
            Q = me.Spellbook.SpellQ;

            W = me.Spellbook.SpellW;

            E = me.Spellbook.SpellE;

            R = me.Spellbook.SpellR;

            // Item
            ethereal = me.FindItem("item_ethereal_blade");

            sheep = target.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");

            vail = me.FindItem("item_veil_of_discord");

            cheese = me.FindItem("item_cheese");

            ghost = me.FindItem("item_ghost");

            orchid = me.FindItem("item_orchid");

            atos = me.FindItem("item_rod_of_atos");

            soulring = me.FindItem("item_soul_ring");

            arcane = me.FindItem("item_arcane_boots");

            blink = me.FindItem("item_blink");

            shiva = me.FindItem("item_shivas_guard");

            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));

            var ModifRod = target.Modifiers.Any(y => y.Name == "modifier_rod_of_atos_debuff");
            var ModifEther = target.Modifiers.Any(y => y.Name == "modifier_item_ethereal_blade_slow");
            var ModifVail = target.Modifiers.Any(y => y.Name == "modifier_item_veil_of_discord_debuff");
            var stoneModif = target.Modifiers.Any(y => y.Name == "modifier_medusa_stone_gaze_stone");

            if (activated && me.IsAlive && target.IsAlive && Utils.SleepCheck("activated"))
            {
                var noBlade = target.Modifiers.Any(y => y.Name == "modifier_item_blade_mail_reflect");
                if (R.IsInAbilityPhase || me.Modifiers.Any(y => y.Name == "modifier_pugna_life_drain") )
                    return;
                if (target.IsVisible && me.Distance2D(target) <= 2300 && !noBlade)
                {
                    if ((!me.IsChanneling() && !me.AghanimState()) || me.AghanimState())
                    {
                        if (
                                         blink != null
                                         && W.CanBeCasted()
                                         && me.CanCast()
                                         && blinkToggle
                                         && blink.CanBeCasted()
                                         && me.Distance2D(target) > 600
                                         && me.Distance2D(target) < 1150
                                         && !stoneModif
                                         && Utils.SleepCheck("blink")
                               )
                        {
                            blink.UseAbility(target.Position);
                            Utils.Sleep(250, "blink");
                        }
                        if (
                                             W != null
                                             && W.CanBeCasted()
                                             && (target.IsLinkensProtected()
                                             || !target.IsLinkensProtected())
                                             && me.CanCast()
                                             && me.Distance2D(target) < 1400
                                             && !stoneModif
                                             && Utils.SleepCheck("W")
                               )
                        {
                            W.UseAbility(target);
                            Utils.Sleep(200, "W");
                        }
                        if ( // atos Blade
                                      atos != null
                                     && atos.CanBeCasted()
                                     && me.CanCast()
                                     && !target.IsLinkensProtected()
                                     && !target.IsMagicImmune()
                                     && Utils.SleepCheck("atos")
                                     && me.Distance2D(target) <= 2000
//.........这里部分代码省略.........
开发者ID:xzyxzy,项目名称:ReworkAllScripts,代码行数:101,代码来源:Program.cs

示例9: Combo

        public void Combo()
        {
            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);

            Q = me.Spellbook.SpellQ;
            W = me.Spellbook.SpellW;
            R = me.Spellbook.SpellR;

            mom = me.FindItem("item_mask_of_madness");
            urn = me.FindItem("item_urn_of_shadows");
            dagon = me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
            halberd = me.FindItem("item_heavens_halberd");
            mjollnir = me.FindItem("item_mjollnir");
            armlet = me.FindItem("item_armlet");
            abyssal = me.FindItem("item_abyssal_blade");
            mail = me.FindItem("item_blade_mail");
            bkb = me.FindItem("item_black_king_bar");
            blink = me.FindItem("item_blink");
            satanic = me.FindItem("item_satanic");
            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
            Shiva = me.FindItem("item_shivas_guard");
            manta = me.FindItem("item_manta");
            var v =
                ObjectManager.GetEntities<Hero>()
                    .Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
                    .ToList();
            e = Toolset.ClosestToMouse(me);
            if (e == null)
                return;
            var a = ObjectManager.GetEntities<Hero>()
                        .Where(x => x.Team == me.Team && x.IsAlive && x.IsVisible && x.IsIllusion && x.IsControllable).ToList();
            var illy = a.Count;
            if (illy >= 1)
            {
                for (int i = 0; i < illy; ++i)
                {
                    if (a[i].Distance2D(e) <= a[i].GetAttackRange() + a[i].HullRadius && !e.IsAttackImmune()
                        && !a[i].IsAttacking() && a[i].CanAttack() && Utils.SleepCheck(a[i].Handle + "Attack")
                        )
                    {
                        a[i].Attack(e);
                        Utils.Sleep(330, a[i].Handle + "Attack");
                    }
                    else if (a[i].Distance2D(e) <= 1000)
                    {
                        if ((!a[i].CanAttack() || a[i].Distance2D(e) >= 0)
                           && !a[i].IsAttacking()
                           && a[i].CanMove() && Utils.SleepCheck(a[i].Handle + "Move")
                           )
                        {
                            a[i].Move(Prediction.InFront(e, 100));
                            Utils.Sleep(400, a[i].Handle + "Move");
                        }
                    }
                }
            }
            if (Active)
            {
                if (Menu.Item("orbwalk").GetValue<bool>() && me.Distance2D(e) <= 1900)
                {
                    Orbwalking.Orbwalk(e, 0, 1600, true, true);
                }
            }
            if (Active && me.Distance2D(e) <= 1400 && e != null && e.IsAlive && !Toolset.invUnit(me))
            {
                float angle = me.FindAngleBetween(e.Position, true);
                Vector3 pos = new Vector3((float) (e.Position.X - 70*Math.Cos(angle)), (float) (e.Position.Y - 70*Math.Sin(angle)),
                    0);
                if (
                    blink != null
                    && Q.CanBeCasted()
                    && me.CanCast()
                    && blink.CanBeCasted()
                    && me.Distance2D(e) >= 490
                    && me.Distance2D(pos) <= 1180
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
                    && Utils.SleepCheck("blink")
                    )
                {
                    blink.UseAbility(pos);
                    Utils.Sleep(250, "blink");
                }
                if (
                    Q != null
                    && Q.CanBeCasted()
                    && me.Distance2D(e) <= 900
                    && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                    && Utils.SleepCheck("Q")
                    )
                {
                    Q.UseAbility(e);
                    Utils.Sleep(200, "Q");
                }
                if (armlet != null
                    && !armlet.IsToggled
                    && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(armlet.Name) &&
                    Utils.SleepCheck("armlet"))
                {
                    armlet.ToggleAbility();
                    Utils.Sleep(300, "armlet");
//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:ChaosKnightController.cs

示例10: Combo

        public void Combo()
        {
            //spell
            Q = me.Spellbook.SpellQ;
            W = me.FindSpell("earthshaker_enchant_totem");
            E = me.Spellbook.SpellE;
            R = me.Spellbook.SpellR;

            // Item
            ethereal = me.FindItem("item_ethereal_blade");
            vail = me.FindItem("item_veil_of_discord");
            cheese = me.FindItem("item_cheese");
            ghost = me.FindItem("item_ghost");
            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
            atos = me.FindItem("item_rod_of_atos");
            soul = me.FindItem("item_soul_ring");
            arcane = me.FindItem("item_arcane_boots");
            blink = me.FindItem("item_blink");
            shiva = me.FindItem("item_shivas_guard");
            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));

            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key) && !Game.IsChatOpen;

            if (Active && me.IsAlive && Utils.SleepCheck("activated"))
            {
                e = Toolset.ClosestToMouse(me);
                if (e == null) return; var modifEther = e.HasModifier("modifier_item_ethereal_blade_slow");
                var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
                var noBlade = e.HasModifier("modifier_item_blade_mail_reflect");
                sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
                if (e.IsAlive && e.IsVisible && me.Distance2D(e) <= 2300 && !noBlade)
                {
                    if (me.HasModifier("modifier_earthshaker_enchant_totem") && !me.IsAttacking() && me.Distance2D(e) <= 300 && Utils.SleepCheck("WMod"))
                    {
                        me.Attack(e);
                        Utils.Sleep(250, "WMod");
                    }
                    if ( // atos Blade
                        atos != null
                        && atos.CanBeCasted()
                        && me.CanCast()
                        && !e.IsLinkensProtected()
                        && !e.IsMagicImmune()
                        && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(atos.Name)
                        && me.Distance2D(e) <= 2000
                        && Utils.SleepCheck("atos")
                        )
                    {
                        atos.UseAbility(e);
                        Utils.Sleep(250, "atos");
                    } // atos Item end

                    if (
                        blink != null
                        && me.CanCast()
                        && blink.CanBeCasted()
                        && me.Distance2D(e) > 400
                        && me.Distance2D(e) <= 1180
                        && !stoneModif
                        && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
                        && Utils.SleepCheck("blink")
                        )
                    {
                        blink.UseAbility(e.Position);
                        Utils.Sleep(250, "blink");
                    }
                    if ( // orchid
                        orchid != null
                        && orchid.CanBeCasted()
                        && me.CanCast()
                        && !e.IsLinkensProtected()
                        && !e.IsMagicImmune()
                        && me.Distance2D(e) <= 1400
                        && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(orchid.Name)
                        && !stoneModif
                        && Utils.SleepCheck("orchid")
                        )
                    {
                        orchid.UseAbility(e);
                        Utils.Sleep(250, "orchid");
                    } // orchid Item end
                    if (!orchid.CanBeCasted() || orchid == null ||
                        !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(orchid.Name))
                    {
                        if ( // vail
                            vail != null
                            && vail.CanBeCasted()
                            && me.CanCast()
                            && !e.IsMagicImmune()
                            && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name)
                            && me.Distance2D(e) <= 1500
                            && Utils.SleepCheck("vail")
                            )
                        {
                            vail.UseAbility(e.Position);
                            Utils.Sleep(250, "vail");
                        } // orchid Item end
                        if (!vail.CanBeCasted() || vail == null ||
                            !Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(vail.Name))
                        {
//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:EarthshakerController.cs

示例11: Game_OnUpdate

        public static void Game_OnUpdate(EventArgs args)
        {
            me = ObjectMgr.LocalHero;

            if (me == null || !Game.IsInGame || Game.IsWatchingGame)
                return;

            if (me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
                return;

            // Ability init
            Laser = me.Spellbook.Spell1;
            Rocket = me.Spellbook.Spell2;
            Refresh = me.Spellbook.Spell4;

            // Item init
            Blink = me.FindItem("item_blink");
            Dagon = me.GetDagon();
            Hex = me.FindItem("item_sheepstick");
            Soulring = me.FindItem("item_soul_ring");
            Ethereal = me.FindItem("item_ethereal_blade");
            Veil = me.FindItem("item_veil_of_discord");
            Orchid = me.FindItem("item_orchid");
            Shiva = me.FindItem("item_shiva");

            // Manacost calculations
            var manaForCombo = Laser.ManaCost + Rocket.ManaCost;
            if (Dagon != null && Dagon.CanBeCasted())
                manaForCombo += 180;
            if (Hex != null && Hex.CanBeCasted())
                manaForCombo += 100;
            if (Ethereal != null && Ethereal.CanBeCasted())
                manaForCombo += 150;
            if (Veil != null && Veil.CanBeCasted())
                manaForCombo += 50;

            // Main combo
            if (active && toggle)
            {
                target = me.ClosestToMouseTarget(1000);
                if (target != null && target.IsAlive && !target.IsIllusion && !target.IsMagicImmune() && Utils.SleepCheck("refresh") && !Refresh.IsChanneling)
                {
                    if (Soulring != null && me.Mana < manaForCombo && Soulring.CanBeCasted() && me.Health > 400 && Utils.SleepCheck("soulring"))
                    {
                        Soulring.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "soulring");
                    }

                    // Blink
                    else if (Blink != null && Blink.CanBeCasted() && Utils.SleepCheck("blink"))
                    {
                        Utils.Sleep(300 + Game.Ping, "blink");
                        Utils.ChainStun(me, me.GetTurnTime(target) * 1000 + Game.Ping, null, false);
                        Blink.UseAbility(target.Position);
                    }

                    // Items
                    else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil"))
                    {
                        Veil.UseAbility(target.Position);
                        Utils.Sleep(150 + Game.Ping, "veil");
                        Utils.Sleep(300 + Game.Ping, "ve");
                        Utils.ChainStun(me, 170 + Game.Ping, null, false);
                    }

                    else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex"))
                    {
                        Hex.UseAbility(target);
                        Utils.Sleep(150 + Game.Ping, "hex");
                        Utils.Sleep(300 + Game.Ping, "h");
                        Utils.ChainStun(me, 170 + Game.Ping, null, false);
                    }

                    else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal"))
                    {
                        Ethereal.UseAbility(target);
                        Utils.Sleep(270 + Game.Ping, "ethereal");
                        Utils.ChainStun(me, 200 + Game.Ping, null, false);
                    }

                    else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("ethereal") && Utils.SleepCheck("h") && Utils.SleepCheck("dagon") && Utils.SleepCheck("veil"))
                    {
                        Dagon.UseAbility(target);
                        Utils.Sleep(270 + Game.Ping, "dagon");
                        Utils.ChainStun(me, 200 + Game.Ping, null, false);
                    }

                    // Skills
                    else if (Rocket != null && Rocket.CanBeCasted() && Utils.SleepCheck("rocket") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("veil"))
                    {
                        Rocket.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "rocket");
                        Utils.ChainStun(me, 150 + Game.Ping, null, false);
                    }

                    else if (Laser != null && Laser.CanBeCasted() && Utils.SleepCheck("laser") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("rocket"))
                    {
                        Laser.UseAbility(target);
                        Utils.Sleep(150 + Game.Ping, "laser");
                        Utils.ChainStun(me, 150 + Game.Ping, null, false);
//.........这里部分代码省略.........
开发者ID:Malicy,项目名称:EnsageSharp,代码行数:101,代码来源:Program.cs

示例12: RunScript


//.........这里部分代码省略.........
                        e = TargetSelector.ClosestToMouse(me, 5000);
                        break;
                    case 1:
                        var EnemyHero = ObjectManager.GetEntities<Hero>().Where(enemy => enemy.Team == me.GetEnemyTeam() && enemy.IsAlive && !enemy.IsIllusion && enemy.Distance2D(Game.MousePosition) <= TargetFindRange).ToList();
                        e = EnemyHero.MinOrDefault(x => x.Health);
                        break;
                }
            }
            if (Utils.SleepCheck("delay"))
            {
                if (me.IsAlive)
                {
                    var count = units.Count();
                    if (count <= 0) return;
                    for (int i = 0; i < count; ++i)
                    {
                        var v = ObjectManager.GetEntities<Hero>()
                                          .Where(x => x.Team == me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion).ToList();
                       if (units[i].Name == "npc_dota_juggernaut_healing_ward")

                            {
                                if (me.Position.Distance2D(units[i].Position) > 5 && Utils.SleepCheck(units[i].Handle.ToString()))
                                {
                                    units[i].Move(me.Position);
                                    Utils.Sleep(50, units[i].Handle.ToString());
                                }
                        }
                        else if (units[i].Name == "npc_dota_neutral_ogre_magi")
                        {
                            for (int z = 0; z < v.Count(); ++z)
                            {
                                var armor = units[i].Spellbook.SpellQ;

                                if ((!v[z].HasModifier("modifier_ogre_magi_frost_armor") || !me.HasModifier("modifier_ogre_magi_frost_armor")) && armor.CanBeCasted() && units[i].Position.Distance2D(v[z]) <= 900
                                    && Utils.SleepCheck(units[i].Handle.ToString()))
                                {
                                    armor.UseAbility(v[z]);
                                    Utils.Sleep(400, units[i].Handle.ToString());
                                }
                            }
                        }
                        else if (units[i].Name == "npc_dota_neutral_forest_troll_high_priest")
                        {
                            if (units[i].Spellbook.SpellQ.CanBeCasted())
                            {
                                for (int z = 0; z < v.Count(); ++z)
                                {
                                    if (units[i].Position.Distance2D(v[z]) <= 900
                                    && Utils.SleepCheck(units[i].Handle + "high_priest"))
                                    {
                                        units[i].Spellbook.SpellQ.UseAbility(v[z]);
                                        Utils.Sleep(350, units[i].Handle + "high_priest");
                                    }
                                }
                            }
                        }

                        if (e == null) return;

                        if (e.IsAlive && !e.IsInvul() && (holdKey || toggleKey))
                        {

                            //spell
                            var CheckStun = e.HasModifier("modifier_centaur_hoof_stomp");
                            var CheckSetka = e.HasModifier("modifier_dark_troll_warlord_ensnare");
                            if (units[i].Name == "npc_dota_neutral_dark_troll_warlord")
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:67,代码来源:CreepControl.cs

示例13: Combo

        public void Combo()
        {
            if (!Menu.Item("enabled").IsActive())
                return;
            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key) && !Game.IsChatOpen;

            Q = me.Spellbook.SpellQ;
            R = me.Spellbook.SpellR;
            Shiva = me.FindItem("item_shivas_guard");
            mom = me.FindItem("item_mask_of_madness");
            urn = me.FindItem("item_urn_of_shadows");
            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
            halberd = me.FindItem("item_heavens_halberd");
            mjollnir = me.FindItem("item_mjollnir");
            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
            abyssal = me.FindItem("item_abyssal_blade");
            mail = me.FindItem("item_blade_mail");
            bkb = me.FindItem("item_black_king_bar");
            ethereal = me.FindItem("item_ethereal_blade");
            glimmer = me.FindItem("item_glimmer_cape");
            vail = me.FindItem("item_veil_of_discord");
            satanic = me.FindItem("item_satanic");
            blink = me.FindItem("item_blink");
            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
            e = Toolset.ClosestToMouse(me);
            if (e == null) return;

            var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");

            if (me.IsChanneling() || R.IsInAbilityPhase || R.IsChanneling) return;
            var v =
                ObjectManager.GetEntities<Hero>()
                    .Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
                    .ToList();
            var modifInv = me.IsInvisible();
            if (Active && Utils.SleepCheck("Combo"))
            {
                if (me.HasModifier("modifier_sandking_sand_storm")) return;
                float angle = me.FindAngleBetween(e.Position, true);

                Vector3 pos = new Vector3((float)(e.Position.X - (Q.GetCastRange() - 100) * Math.Cos(angle)),
                    (float)(e.Position.Y - (Q.GetCastRange() - 100) * Math.Sin(angle)), 0);
                uint elsecount = 1;
                if (elsecount == 1 && (blink != null && blink.CanBeCasted() && me.Distance2D(pos) <= 1100 || blink == null && me.Distance2D(e) <= Q.GetCastRange() - 50))
                {
                    if (
                        R != null && R.CanBeCasted()
                        && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name)
                        && Utils.SleepCheck("R")
                        )
                    {
                        R.UseAbility();
                        Utils.Sleep(200, "R");
                        Utils.Sleep(300, "Combo");
                    }
                }

                if (!Utils.SleepCheck("Combo") || me.IsChanneling() || R.IsChanneling || R.IsInAbilityPhase) return;

                if (!Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name) || !R.CanBeCasted())
                {
                    if (
                        blink != null
                        && blink.CanBeCasted()
                        && me.Distance2D(e) >= (Q.CanBeCasted() ? Q.GetCastRange() : 450)
                        && me.Distance2D(pos) <= 1190
                        && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
                        && Utils.SleepCheck("blink")
                        )
                    {
                        blink.UseAbility(pos);
                        Utils.Sleep(250, "blink");
                    }
                    if (
                        blink != null
                        && blink.CanBeCasted()
                        && me.Distance2D(e) < 1180
                        && me.Distance2D(e) > (Q.CanBeCasted() ? Q.GetCastRange() : 450)
                        && Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(blink.Name)
                        && Utils.SleepCheck("blink")
                        )
                    {
                        blink.UseAbility(e.Position);
                        Utils.Sleep(250, "blink");
                    }

                    if (
                    Q != null && Q.CanBeCasted() && me.Distance2D(e) <= Q.GetCastRange() + 300
                    && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                    && Utils.SleepCheck("Q")
                    )
                    {
                        Q.UseAbility(e);
                        Utils.Sleep(200, "Q");
                    }
                }
                if (me.Distance2D(e) <= 2000 && e != null && e.IsAlive && !modifInv && !me.IsChanneling() && (!R.CanBeCasted() || !Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(R.Name)))
                {
                    if (ethereal != null && ethereal.CanBeCasted() && me.Distance2D(e) <= 700 &&
                    Menu.Item("Items").GetValue<AbilityToggler>().IsEnabled(ethereal.Name) &&
//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:SandKingController.cs

示例14: Combo

        /* Доп. функции скрипта
        -----------------------------------------------------------------------------*/
        public void Combo()
        {
            e = Toolset.ClosestToMouse(me);
            if (e.HasModifier("modifier_abaddon_borrowed_time")
            || e.HasModifier("modifier_item_blade_mail_reflect")
            || e.IsMagicImmune())
            {
                var enemies = ObjectManager.GetEntities<Hero>()
                        .Where(x => x.IsAlive && x.Team != me.Team && !x.IsIllusion && !x.IsMagicImmune()
                        && (!x.HasModifier("modifier_abaddon_borrowed_time")
                        || !x.HasModifier("modifier_item_blade_mail_reflect"))
                        && x.Distance2D(e) > 200).ToList();
                e = GetClosestToTarget(enemies, e) ?? null;
                if (Utils.SleepCheck("spam"))
                {
                    Utils.Sleep(5000, "spam");
                }
            }
            if (e == null) return;
            //spell
            Q = me.Spellbook.SpellQ;

            W = me.Spellbook.SpellW;

            E = me.Spellbook.SpellE;

            R = me.Spellbook.SpellR;
            // Item
            ethereal = me.FindItem("item_ethereal_blade");

            sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");

            vail = me.FindItem("item_veil_of_discord");

            cheese = me.FindItem("item_cheese");

            ghost = me.FindItem("item_ghost");

            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");

            atos = me.FindItem("item_rod_of_atos");

            soul = me.FindItem("item_soul_ring");

            arcane = me.FindItem("item_arcane_boots");

            blink = me.FindItem("item_blink");

            shiva = me.FindItem("item_shivas_guard");

            dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));

            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);

            Push = Game.IsKeyDown(Menu.Item("keyQ").GetValue<KeyBind>().Key);

            var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");
            A();
            if (Push && Q != null && Q.CanBeCasted())
            {
                if (
                    Q != null
                    && Q.CanBeCasted()
                    && (e.IsLinkensProtected()
                    || !e.IsLinkensProtected())
                    && me.CanCast()
                    && me.Distance2D(e) < Q.GetCastRange() + me.HullRadius + 24
                    && Utils.SleepCheck("Q")
                    )
                {
                    Q.UseAbility(e);
                    Utils.Sleep(200, "Q");
                }
            }
            if (Active && me.IsAlive && e.IsAlive && Utils.SleepCheck("activated"))
            {
                if (stoneModif) return;
                //var noBlade = e.HasModifier("modifier_item_blade_mail_reflect");
                if (e.IsVisible && me.Distance2D(e) <= 2300)
                {
                    var distance = me.IsVisibleToEnemies ? 1400 : E.GetCastRange() + me.HullRadius;
                    if (
                        Q != null
                        && Q.CanBeCasted()
                        && me.CanCast()
                        && e.IsLinkensProtected()
                        && !e.IsMagicImmune()
                        && me.Distance2D(e) < Q.GetCastRange() + me.HullRadius
                        && Menu.Item("Skills").GetValue<AbilityToggler>().IsEnabled(Q.Name)
                        && Utils.SleepCheck("Q")
                        )
                    {
                        Q.UseAbility(e);
                        Utils.Sleep(200, "Q");
                    }

                    if (
                        E != null
//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:SkywrathMageController.cs

示例15: Combo

        public void Combo()
        {
            Active = Game.IsKeyDown(Menu.Item("keyBind").GetValue<KeyBind>().Key);

            Push = Game.IsKeyDown(Menu.Item("keyEscape").GetValue<KeyBind>().Key);
            wKey = Game.IsKeyDown(Menu.Item("wKey").GetValue<KeyBind>().Key);
            oneULT = Menu.Item("oneult").IsActive();
            if (!Menu.Item("enabled").IsActive())
                return;

            e = Toolset.ClosestToMouse(me);
            if (Push)
            {
                Unit fount = ObjectManager.GetEntities<Unit>().FirstOrDefault(x => x.Team == me.Team && x.ClassID == ClassID.CDOTA_Unit_Fountain);
                var remnant = ObjectManager.GetEntities<Unit>().Where(unit => unit.IsValid && unit.IsAlive && unit.Team == me.Team && unit.Name == "npc_dota_ember_spirit_remnant").ToList();

                if (fount != null)
                {
                    float angle = me.FindAngleBetween(fount.Position, true);
                    Vector3 pos = new Vector3((float)(me.Position.X + R.GetCastRange() * Math.Cos(angle)),
                        (float)(me.Position.Y + R.GetCastRange() * Math.Sin(angle)), 0);

                    if (remnant.Count(x => x.Distance2D(me) <= 10000) == 0)
                    {
                        if (R != null && R.CanBeCasted()
                            && me.FindModifier("modifier_ember_spirit_fire_remnant_charge_counter").StackCount >= 1
                            && Utils.SleepCheck("z"))
                        {
                            R.UseAbility(pos);
                            Utils.Sleep(1000, "z");
                        }
                    }
                    if (remnant.Count(x => x.Distance2D(me) <= 10000) > 0)
                    {
                        if (D != null && D.CanBeCasted())
                        {
                            for (int i = 0; i < remnant.Count; ++i)
                            {
                                var kill =
                                    remnant[i].Modifiers.Where(y => y.Name == "modifier_ember_spirit_fire_remnant_thinker")
                                        .DefaultIfEmpty(null)
                                        .FirstOrDefault();

                                if (kill != null
                                    && kill.RemainingTime < 44
                                    && Utils.SleepCheck("Rem"))
                                {
                                    D.UseAbility(fount.Position);
                                    Utils.Sleep(300, "Rem");
                                }
                            }
                        }
                    }
                }
            }

            Q = me.Spellbook.SpellQ;

            W = me.Spellbook.SpellW;

            E = me.Spellbook.SpellE;

            R = me.Spellbook.SpellR;

            D = me.Spellbook.SpellD;

            ethereal = me.FindItem("item_ethereal_blade");
            mom = me.FindItem("item_mask_of_madness");
            urn = me.FindItem("item_urn_of_shadows");
            dagon =
                me.Inventory.Items.FirstOrDefault(
                    item =>
                        item.Name.Contains("item_dagon"));
            halberd = me.FindItem("item_heavens_halberd");
            mjollnir = me.FindItem("item_mjollnir");
            orchid = me.FindItem("item_orchid") ?? me.FindItem("item_bloodthorn");
            abyssal = me.FindItem("item_abyssal_blade");
            mail = me.FindItem("item_blade_mail");
            bkb = me.FindItem("item_black_king_bar");
            satanic = me.FindItem("item_satanic");
            blink = me.FindItem("item_blink");
            medall = me.FindItem("item_medallion_of_courage") ?? me.FindItem("item_solar_crest");
            if (e == null) return;
            sheep = e.ClassID == ClassID.CDOTA_Unit_Hero_Tidehunter ? null : me.FindItem("item_sheepstick");
            vail = me.FindItem("item_veil_of_discord");
            cheese = me.FindItem("item_cheese");
            ghost = me.FindItem("item_ghost");
            atos = me.FindItem("item_rod_of_atos");
            soul = me.FindItem("item_soul_ring");
            arcane = me.FindItem("item_arcane_boots");
            stick = me.FindItem("item_magic_stick") ?? me.FindItem("item_magic_wand");
            Shiva = me.FindItem("item_shivas_guard");

            var stoneModif = e.HasModifier("modifier_medusa_stone_gaze_stone");

            var v =
                ObjectManager.GetEntities<Hero>()
                    .Where(x => x.Team != me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune())
                    .ToList();

//.........这里部分代码省略.........
开发者ID:VickTheRock,项目名称:ReworkAllScripts,代码行数:101,代码来源:EmberSpiritController.cs


注:本文中的System.Item.CanBeCasted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。