예제 #1
0
        public void BeastMaster()
        {
            var     me    = ObjectManager.LocalHero;
            Ability zip   = me.Spellbook.Spell4;
            Hero    Beast = ObjectManager.GetEntities <Hero>().Where(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Beastmaster && x.Team != me.Team && x.IsAlive && !x.IsIllusion).FirstOrDefault();

            if (Beast != null)
            {
                Ability Ult           = Beast.Spellbook.SpellR;
                var     EnemyFacingto = ObjectManager.GetEntities <Hero>()
                                        .Where(x => Distance2D(x, Beast) < Ult.CastRange + 150 && x.Team == me.Team) // Valid targets within range (over slightly to account for movement during abilityphase)
                                        .OrderBy(x => RadiansToFace(Beast, x))                                       // Orders targets based on radians required to be facing exactly
                                        .FirstOrDefault();
                if (EnemyFacingto == me &&
                    me.Distance2D(Beast) <= 1000 &&
                    Ult.IsInAbilityPhase &&
                    Utils.SleepCheck("RoarDodge")
                    )
                {
                    var zipTarget = ZipZap.StartDodgeWhenInAbilityPhase_ZipTo(me, Beast, Ult);
                    PowerTread.changePowerTread();
                    zip.UseAbility(zipTarget);
                    Utils.Sleep(Game.Ping + 500, "RoarDodge");
                }
            }
        }
예제 #2
0
        public void Lina()
        {
            var     me   = ObjectManager.LocalHero;
            Ability zip  = me.Spellbook.Spell4;
            Hero    Lina = ObjectManager.GetEntities <Hero>().Where(x => x.ClassID == ClassID.CDOTA_Unit_Hero_Lina).FirstOrDefault();

            if (Lina != null)
            {
                if (!LagunaBladeOnMe && Lina.Spellbook.SpellR.IsInAbilityPhase)
                {
                    if (ObjectManager.GetEntities <Hero>()
                        .Where(x => Distance2D(x, Lina) < 1000 && x.Team == me.Team) // Valid targets within range (over slightly to account for movement during abilityphase)
                        .OrderBy(x => RadiansToFace(Lina, x))                        // Orders targets based on radians required to be facing exactly
                        .FirstOrDefault() == me)                                     //facing towards me when casting spells
                    {
                        if (!LagunaBladeOnMe)
                        {
                            stopwatch.Start();
                        }
                        LagunaBladeOnMe = true;
                    }
                }
                float distance = (float)SharpDX.Vector3.Distance(Lina.Position, me.Position);
                var   myHero   = ObjectManager.LocalHero;
                var   zipTarget_LagunaDodge = ZipZap.StartDodgeWhenInAbilityPhase_ZipTo(myHero, Lina, Lina.Spellbook.SpellR);
                if (IsFacing(Lina, me) && LagunaBladeOnMe && stopwatch.ElapsedMilliseconds >= (250 - 2 * Game.Ping - (me.GetTurnTime(zipTarget_LagunaDodge) * 1000)))
                {
                    stopwatch.Restart();
                    stopwatch.Stop();
                    if (LagunaBladeOnMe && Utils.SleepCheck("LagunaDodge"))
                    {
                        PowerTread.changePowerTread();
                        zip.UseAbility(zipTarget_LagunaDodge);
                        Utils.Sleep(1000, "LagunaDodge");
                    }
                    LagunaBladeOnMe = false;
                }
            }
        }