Beispiel #1
0
        private void Cast_R()
        {
            var R_Target = SimpleTs.GetTarget(R.Level > 2 ? R.Range : 675, SimpleTs.DamageType.Magical);

            if (R_Target != null)
            {
                if (Menu.Item("Dont_R" + R_Target.BaseSkinName) != null)
                {
                    if (!Menu.Item("Dont_R" + R_Target.BaseSkinName).GetValue <bool>())
                    {
                        if (Menu.Item("R_Overkill_Check").GetValue <bool>())
                        {
                            if (MyHero.GetSpellDamage(R_Target, SpellSlot.Q) > R_Target.Health)
                            {
                            }
                            else if (Get_Ult_Dmg(R_Target) > R_Target.Health + 20 && R_Target.Distance(MyHero) < R.Range)
                            {
                                if (DFG.IsReady())
                                {
                                    Use_DFG(R_Target);
                                }

                                R.CastOnUnit(R_Target, UsePackets());
                            }
                        }
                        else if (Get_Ult_Dmg(R_Target) > R_Target.Health - 20 && R_Target.Distance(MyHero) < R.Range)
                        {
                            if (DFG.IsReady())
                            {
                                Use_DFG(R_Target);
                            }

                            R.CastOnUnit(R_Target, UsePackets());
                        }
                    }
                }
            }
        }
        public static Obj_AI_Base GetLaneMinion(Spell daSpell)
        {
            IEnumerable <Obj_AI_Minion> minions = daSpell.GetLaneMinions();

            if (minions.IsEmpty())
            {
                return(null);
            }

            Obj_AI_Minion temp = minions.FirstOrDefault();

            if (temp.Equals(LastMinion))
            {
                if (!(minions.Count() > 1))
                {
                    return(null);
                }

                temp = minions.ElementAt(1);
            }

            if (!temp.IsValidTarget())
            {
                return(null);
            }

            if (MyHero.CanAttack && MyHero.GetAutoAttackDamage(temp) >= MyMinionHealthPrediction(temp, daSpell))
            {
                return(null);
            }

            if (!(daSpell.GetDamage(temp) >= MyMinionHealthPrediction(temp, daSpell)))
            {
                return(null);
            }

            LastMinion = temp; return(temp);
        }
Beispiel #3
0
 public void DoKillSteal()
 {
     if (!RootM["killsteal"]["ks"].As <MenuBool>().Enabled)
     {
         return;
     }
     foreach (var hptarget in GameObjects.EnemyHeroes.Where(a => a.IsValidTarget(1200) && !a.IsDead))
     {
         if (!hptarget.IsValid || hptarget.IsDead || hptarget == null)
         {
             return;
         }
         var Health = hptarget.Health;
         var dmgE   = MyHero.GetSpellDamage(hptarget, SpellSlot.E);
         if (MyHero.Distance(hptarget) < SpellManager.E.Range && Health < dmgE && !GlobalKeys.ComboKey.Active &&
             RootM["killsteal"]["useE"].As <MenuBool>().Enabled)
         {
             this.CastE();
         }
         var dmgQ = MyHero.GetSpellDamage(hptarget, SpellSlot.Q);
         if (MyHero.Distance(hptarget) < SpellManager.Q.Range && Health < dmgQ && !GlobalKeys.ComboKey.Active &&
             RootM["killsteal"]["useQ"].As <MenuBool>().Enabled)
         {
             this.CastQ(hptarget);
         }
         if (!SpellManager.IsIgnite)
         {
             continue;
         }
         var dmgI = (50 + ((MyHero.Level) * 20));
         if (MyHero.Distance(hptarget) < SpellManager.Q.Range && Health < dmgI && !GlobalKeys.ComboKey.Active &&
             RootM["killsteal"]["useI"].As <MenuBool>().Enabled)
         {
             SpellManager.Ignite.CastOnUnit(hptarget);
         }
         this.DoOneShotCombo(hptarget);
     }
 }
Beispiel #4
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("ShadowFiend", "zaioShadowFiend", false, "npc_dota_hero_nevermore", true);

            heroMenu.AddItem(new MenuItem("zaioShadowFiendAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioShadowFiendAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioShadowFiendKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioShadowFiendKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            OnLoadMenuItems(supportedStuff, supportedKillsteal);

            _razeAbilities[0] = MyHero.GetAbilityById(AbilityId.nevermore_shadowraze1);
            _razeAbilities[1] = MyHero.GetAbilityById(AbilityId.nevermore_shadowraze2);
            _razeAbilities[2] = MyHero.GetAbilityById(AbilityId.nevermore_shadowraze3);

            _drawRazesItem               = new MenuItem("zaioShadowFiendDrawRazes", "Draw Razes").SetValue(true);
            _drawRazesItem.Tooltip       = "Draws the hitbox of each raze with a circle.";
            _drawRazesItem.ValueChanged += _drawRazesItem_ValueChanged;
            heroMenu.AddItem(_drawRazesItem);


            ToggleRazeEffects(_drawRazesItem.GetValue <bool>());

            ZaioMenu.LoadHeroSettings(heroMenu);

            _ultAbility = MyHero.GetAbilityById(AbilityId.nevermore_requiem);

            GameDispatcher.OnIngameUpdate += GameDispatcher_OnIngameUpdate;
        }
Beispiel #5
0
        private void Cast_E(bool stun, bool slow, bool behind)
        {
            if (!E.IsReady())
            {
                return;
            }

            foreach (var unit in AllHerosEnemy.Where(x => x.IsValidTarget(E.Range) && !x.IsDead && x.IsEnemy))
            {
                if (stun && E.GetPrediction(unit).Hitchance == HitChance.Immobile)
                {
                    E.Cast(unit.ServerPosition, UsePackets());
                    return;
                }

                if (slow && unit.HasBuffOfType(BuffType.Slow))
                {
                    var E_Pred_Slow       = E.GetPrediction(unit);
                    var E_Behind_Vec_Slow = E_Pred_Slow.CastPosition +
                                            Vector3.Normalize(unit.ServerPosition - MyHero.ServerPosition) * 100;
                    if (MyHero.Distance(E_Behind_Vec_Slow) < E.Range)
                    {
                        E.Cast(E_Behind_Vec_Slow, UsePackets());
                        return;
                    }
                }

                var E_Behind_Distance = Menu.Item("E_Behind_Distance").GetValue <Slider>().Value;
                var E_Pred            = E.GetPrediction(unit);
                var E_Behind_Vec      = E_Pred.CastPosition +
                                        Vector3.Normalize(E_Pred.CastPosition - MyHero.ServerPosition) * E_Behind_Distance;

                if (E.IsReady() && behind && MyHero.Distance(E_Behind_Vec) < E.Range)
                {
                    E.Cast(E_Behind_Vec);
                }
            }
        }
Beispiel #6
0
        private float GetComboDamage(Obj_AI_Base enemy)
        {
            var damage = 0d;

            if (Q.IsReady())
            {
                damage += MyHero.GetSpellDamage(enemy, SpellSlot.Q);
            }

            if (E.IsReady())
            {
                damage += MyHero.GetSpellDamage(enemy, SpellSlot.E) + MyHero.GetAutoAttackDamage(enemy);
            }

            if (R.IsReady())
            {
                damage += MyHero.GetSpellDamage(enemy, SpellSlot.R);
            }

            damage += MyHero.GetAutoAttackDamage(enemy, true);

            return((float)damage);
        }
Beispiel #7
0
        private double getSimpleDmg(Obj_AI_Hero target)
        {
            double dmg = 0;

            if (Q.IsReady())
            {
                dmg += MyHero.GetSpellDamage(target, SpellSlot.Q) + MyHero.GetSpellDamage(target, SpellSlot.Q, 1);
            }
            if (HasBuff(target, "AkaliMota"))
            {
                dmg += MyHero.GetSpellDamage(target, SpellSlot.Q, 1);
            }
            if (E.IsReady())
            {
                dmg += MyHero.GetSpellDamage(target, SpellSlot.E);
            }
            if (R.IsReady())
            {
                dmg += MyHero.GetSpellDamage(target, SpellSlot.R) * GetRStacks();
            }

            return(dmg);
        }
        private Obj_AI_Minion Get_Nearest_orb()
        {
            var Orb =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(obj => obj.IsValid && obj.Team == ObjectManager.Player.Team && obj.Name == "Seed")
                .ToList()
                .OrderBy(x => MyHero.Distance(x))
                .FirstOrDefault();

            if (Orb != null)
            {
                return(Orb);
            }
            if (!Menu.Item("W_Only_Orb").GetValue <bool>())
            {
                var minion = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(x => x.IsValidTarget(W.Range));
                if (minion != null)
                {
                    return(minion);
                }
            }
            return(null);
        }
Beispiel #9
0
        private void Q_Check()
        {
            if (!Q.IsReady())
            {
                return;
            }

            var Q_Range = 525 + (50 + 25 * Q.Level);
            var target  = SimpleTs.GetTarget(Q_Range, SimpleTs.DamageType.Physical);

            if (target != null)
            {
                if (!IsFishBoneActive() && MyHero.Distance(target.ServerPosition) < 525 + MyHero.BoundingRadius + target.BoundingRadius)
                {
                    Q.Cast();
                    return;
                }
                if (IsFishBoneActive() && MyHero.Distance(target.ServerPosition) > 25 + MyHero.BoundingRadius + target.BoundingRadius)
                {
                    Q.Cast();
                }
            }
        }
Beispiel #10
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Sniper", "zaioSniper", false, "npc_dota_hero_sniper", true);

            heroMenu.AddItem(new MenuItem("zaioSniperAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioSniperAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioSniperKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioSniperKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _shrapnelAbility = MyHero.GetAbilityById(AbilityId.sniper_shrapnel);
            _ultAbility      = MyHero.GetAbilityById(AbilityId.sniper_assassinate);
        }
Beispiel #11
0
        private void Cast_E()
        {
            var target = SimpleTs.GetTarget(E.Range + 500, SimpleTs.DamageType.Magical);

            if (E.IsReady() && target != null && Menu.Item("E_On_Killable").GetValue <bool>())
            {
                if (MyHero.GetSpellDamage(target, SpellSlot.E) > target.Health + 25)
                {
                    if (Menu.Item("E_On_Safe").GetValue <bool>())
                    {
                        var ePos = E.GetPrediction(target);
                        if (ePos.UnitPosition.CountEnemysInRange(500) < 2)
                        {
                            E.Cast(ePos.UnitPosition, UsePackets());
                        }
                    }
                    else
                    {
                        E.Cast(target, UsePackets());
                    }
                }
            }
        }
Beispiel #12
0
 public static void UpdateCreeps()
 {
     try
     {
         Creeps = ObjectManager.GetEntitiesParallel <Unit>()
                  .Where(
             x =>
             (x.IsValid && x.ClassId == ClassId.CDOTA_BaseNPC_Tower ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Lane ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Creep ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Neutral ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Siege ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Additive ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Barracks ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Building ||
              x.ClassId == ClassId.CDOTA_BaseNPC_Creature) && x.IsAlive && x.IsVisible &&
             x.Distance2D(Me) < MenuVariables.Outrange + MyHero.AttackRange()).ToList();
     }
     catch (Exception e)
     {
         Console.WriteLine(e + "Update Creeps Error");
     }
 }
Beispiel #13
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Axe", "zaioAxe", false, "npc_dota_hero_axe", true);

            heroMenu.AddItem(new MenuItem("zaioAxeAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioAxeAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioAxeKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioAxeKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _callAbility = MyHero.GetAbilityById(AbilityId.axe_berserkers_call);
            _ultAbility  = MyHero.GetAbilityById(AbilityId.axe_culling_blade);
        }
Beispiel #14
0
        public void DoCombo()
        {
            if (target == null || !target.IsValid || MyHero.ManaPercent() <
                RootM["combo"]["Mana"].As <MenuSliderBool>().Value ||
                RootM["combo"]["blacklist"]["use" + target.ChampionName.ToLower()].As <MenuBool>().Enabled)
            {
                return;
            }

            if (RootM["combo"]["combologics"]["rlogic"].As <MenuList>().Value == 0)
            {
                NewComboLogic();
            }

            if (RootM["combo"]["combologics"]["rlogic"].As <MenuList>().Value == 2)
            {
                ManualCombo();
            }
            else
            {
                DynamicCombo();
            }
        }
Beispiel #15
0
 protected override void PermaActive()
 {
     Range          = Q.Range + Q.Width;
     Target         = TargetSelector.GetTarget(UnitManager.ValidEnemyHeroesInRange, DamageType.Magical);
     MissileIsValid = QMissile != null && QMissile.IsValid && !QMissile.IsDead;
     if (QMissile != null && MissileIsValid)
     {
         Q.SourceObject = QMissile;
     }
     else
     {
         Q.SourceObject = MyHero;
     }
     if (MissileIsValid)
     {
         if (Core.GameTickCount - LastMissileVectorTime > 0)
         {
             if (!LastMissileVector.IsZero)
             {
                 Q.Speed =
                     (int)
                     (1000 * Q.Source.Distance(LastMissileVector) / (Core.GameTickCount - LastMissileVectorTime));
             }
             LastMissileVector     = new Vector3(Q.Source.Position.X, Q.Source.Position.Y, Q.Source.Position.Z);
             LastMissileVectorTime = Core.GameTickCount;
         }
         Q.CastDelay = 0;
         Q.Range     = (int)(825 + MyHero.GetDistance(Q.Source));
     }
     else
     {
         Q.CastDelay = 250;
         Q.Speed     = 1640;
         Q.Range     = 825;
     }
     base.PermaActive();
 }
Beispiel #16
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("StormSpirit", "zaioStormSpirit", false, "npc_dota_hero_storm_spirit", true);

            heroMenu.AddItem(new MenuItem("zaioStormSpiritAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioStormSpiritAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioStormSpiritKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioStormSpiritKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            this._maxChaseDistance =
                new MenuItem("zaioMaxUltDistance", "Maximum distance for ult").SetValue(new Slider(1000, 0, 10000));
            this._maxChaseDistance.Tooltip = "Maximum number of yards between you and your target before you ult";
            heroMenu.AddItem(this._maxChaseDistance);

            this._minMana =
                new MenuItem("zaioMinMana", "Min Mana after ult").SetValue(new Slider(1, 0, (int)MyHero.Mana));
            this._minMana.Tooltip = "Min Mana after ult to catch up";
            heroMenu.AddItem(this._minMana);

            OnLoadMenuItems(supportedStuff, supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _qAbility   = MyHero.GetAbilityById(AbilityId.storm_spirit_static_remnant);
            _wAbility   = MyHero.GetAbilityById(AbilityId.storm_spirit_electric_vortex);
            _eAbility   = MyHero.GetAbilityById(AbilityId.storm_spirit_overload);
            _ultAbility = MyHero.GetAbilityById(AbilityId.storm_spirit_ball_lightning);
        }
Beispiel #17
0
 public void CastE(Obj_AI_Base target)
 {
     if (E.IsReady && target != null && !IsWaitingShadow)
     {
         var heroDistance    = MyHero.GetDistanceSqr(target);
         var wShadowDistance = WShadowIsValid ? target.GetDistanceSqr(WShadow) : 16000000f;
         var rShadowDistance = RShadowIsValid ? target.GetDistanceSqr(RShadow) : 16000000f;
         var min             = Math.Min(Math.Min(rShadowDistance, wShadowDistance), heroDistance);
         if (Math.Abs(min - wShadowDistance) < float.Epsilon)
         {
             E.SourceObject = WShadow;
         }
         else if (Math.Abs(min - rShadowDistance) < float.Epsilon)
         {
             E.SourceObject = RShadow;
         }
         else
         {
             E.SourceObject = MyHero;
         }
         E.RangeCheckSourceObject = E.Source;
         var hero = target as AIHeroClient;
         var pred = E.GetPrediction(target);
         if (pred.HitChancePercent >= E.HitChancePercent)
         {
             if (hero != null)
             {
                 if (WillDie(hero, E.GetDamage(target)))
                 {
                     SwapByCountingEnemies();
                     return;
                 }
             }
             E.Cast();
         }
     }
 }
Beispiel #18
0
        public void CastW(Obj_AI_Base target)
        {
            var pred = W.GetPrediction(target);

            if (IsCastingR)
            {
                return;
            }
            if (W.IsReady && target != null && !IsCastingR && target.IsValidTarget(W.Range) && !W.WillHitYasuoWall(pred.CastPosition) && !MyHero.IsInAutoAttackRange(target) || pred.HitChance >= HitChance.Immobile && !IsCastingR && target.IsValidTarget(W.Range) && !W.WillHitYasuoWall(pred.CastPosition) && !MyHero.IsInAutoAttackRange(target))
            {
                if (Core.GameTickCount - LastBlockTick < 650)
                {
                    return;
                }
                if (Core.GameTickCount - WShouldWaitTick < 650)
                {
                    return;
                }
                if (MyHero.CountEnemiesInRange(350) != 0)
                {
                    return;
                }
                var hero = target as AIHeroClient;

                if (hero != null)
                {
                    if (MyHero.IsInAutoAttackRange(target) && !TargetHaveEBuff(hero))
                    {
                        if ((Orbwalker.CanAutoAttack || (E.IsReady && E.InRange(hero))))
                        {
                            return;
                        }
                    }
                }
                W.Cast(target);
            }
        }
Beispiel #19
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Windrunner", "zaioWindrunner", false, "npc_dota_hero_windrunner", true);

            heroMenu.AddItem(new MenuItem("zaioWindrunnerAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioWindrunnerAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioWindrunnerKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioWindrunnerKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            OnLoadMenuItems(supportedStuff, supportedKillsteal);

            _branchShackle         = new MenuItem("zaioBranchShackle", "Use Shackle -> Blink -> Branch").SetValue(true);
            _branchShackle.Tooltip = "Will use the shackle -> blink -> branch trick if suitable.";
            heroMenu.AddItem(_branchShackle);

            _orbwalkWhileUlt         = new MenuItem("zaioOrbwalkWhileUlt", "Enable Ult-Orbwalking").SetValue(false);
            _orbwalkWhileUlt.Tooltip = "Enables orbwalking while being under the effect of focus fire.";
            heroMenu.AddItem(_orbwalkWhileUlt);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _shackleAbility   = MyHero.GetAbilityById(AbilityId.windrunner_shackleshot);
            _powerShotAbility = MyHero.GetAbilityById(AbilityId.windrunner_powershot);
            _ultAbility       = MyHero.GetAbilityById(AbilityId.windrunner_focusfire);

            NewTargetAcquired     += OnNewTargetAcquired;
            Player.OnExecuteOrder += Player_OnExecuteOrder;
        }
Beispiel #20
0
        private void Cast_Q(Obj_AI_Base target = null)
        {
            if (!Q.IsReady())
            {
                return;
            }

            if (target != null)
            {
                if (!(target.IsMinion || target is Obj_AI_Hero))
                {
                    return;
                }
                Q.Cast();
                MyHero.IssueOrder(GameObjectOrder.AttackUnit, target);
                _LastQCast = Environment.TickCount;
            }
            else
            {
                target = xSLxOrbwalker.GetPossibleTarget();
                if (target == null)
                {
                    return;
                }
                if (!(target.IsMinion || target is Obj_AI_Hero))
                {
                    return;
                }
                if (!(Environment.TickCount - _LastQCast < xSLxOrbwalker.GetNextAATime()))
                {
                    return;
                }
                Q.Cast();
                MyHero.IssueOrder(GameObjectOrder.AttackUnit, target);
                _LastQCast = Environment.TickCount;
            }
        }
Beispiel #21
0
        private async Task BlinkShackleFindPos(Unit target, Item blink,
                                               CancellationToken tk = default(CancellationToken))
        {
            var speed  = _shackleAbility.GetAbilityData("arrow_speed");
            var radius = _shackleAbility.GetCastRange() / 2;

            var time         = radius / speed * 1000.0f + _shackleAbility.FindCastPoint() * 1000.0f;
            var predictedPos = Prediction.Prediction.PredictPosition(target, (int)time);

            var shackleAngle = _shackleAbility.GetAbilityData("shackle_angle");
            var dir          = (MyHero.NetworkPosition - predictedPos).Normalized();


            for (float angle = 0; angle < 360.0f; angle += shackleAngle)
            {
                var myPos = dir;
                myPos.X += radius * (float)Math.Cos(Utils.DegreeToRadian(angle));
                myPos.Y += radius * (float)Math.Sin(Utils.DegreeToRadian(angle));

                myPos += predictedPos;

                var shackleUnit = FindShackleTarget(target, myPos);
                if (shackleUnit != null)
                {
                    Log.Debug($"using blink-shackle on {myPos}");
                    blink.UseAbility(myPos);
                    await Await.Delay((int)(MyHero.GetTurnTime(myPos) * 1000) + ItemDelay, tk);

                    _shackleAbility.UseAbility(shackleUnit);
                    Log.Debug($"using shackle after blink on {shackleUnit.Name}");
                    await Await.Delay(GetAbilityDelay(shackleUnit, _shackleAbility) + 50, tk);

                    return;
                }
            }
            Log.Debug($"couldn't find a valid blink pos for shackle");
        }
Beispiel #22
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Lion", "zaioLion", false, "npc_dota_hero_lion", true);

            heroMenu.AddItem(new MenuItem("zaioLionAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioLionAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioLionKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioLionKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _ultAbility  = MyHero.GetAbilityById(AbilityId.lion_finger_of_death);
            _manaAbility = MyHero.GetAbilityById(AbilityId.lion_mana_drain);
            _stunAbility = MyHero.GetAbilityById(AbilityId.lion_impale);
        }
Beispiel #23
0
        protected override async Task <bool> Killsteal()
        {
            if (await base.Killsteal())
            {
                return(true);
            }

            if (MyHero.IsSilenced())
            {
                return(false);
            }

            if (_ultAbility.CanBeCasted())
            {
                var threshold =
                    _ultAbility.GetAbilityData(MyHero.HasItem(ClassID.CDOTA_Item_UltimateScepter)
                        ? "kill_threshold_scepter"
                        : "kill_threshold");

                var enemy = ObjectManager.GetEntitiesParallel <Hero>().FirstOrDefault(
                    x =>
                    x.IsValid && x.IsAlive && x.Team != MyHero.Team && !x.IsIllusion &&
                    _ultAbility.CanBeCasted(x) && _ultAbility.CanHit(x) && x.Health < threshold &&
                    !x.IsLinkensProtected() &&
                    !x.CantBeAttacked() && !x.CantBeKilledByAxeUlt());
                if (enemy != null)
                {
                    Log.Debug($"using ult on {enemy.Name}: {enemy.Health} < {threshold}");
                    _ultAbility.UseAbility(enemy);
                    await Await.Delay(GetAbilityDelay(enemy, _ultAbility));

                    return(true);
                }
            }
            return(false);
        }
Beispiel #24
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Sven", "zaioSven", false, "npc_dota_hero_sven", true);

            heroMenu.AddItem(new MenuItem("zaioSvenAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioSvenAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioSvenKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioSvenKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _stormboltAbility = MyHero.GetAbilityById(AbilityId.sven_storm_bolt);
            _warcryAbility    = MyHero.GetAbilityById(AbilityId.sven_warcry);
            _ultAbility       = MyHero.GetAbilityById(AbilityId.sven_gods_strength);
        }
Beispiel #25
0
        protected override async Task <bool> Killsteal()
        {
            if (await base.Killsteal())
            {
                return(true);
            }

            if (MyHero.IsSilenced())
            {
                return(false);
            }

            var spellAmp = GetSpellAmp();

            foreach (var razeAbility in _razeAbilities)
            {
                if (await UseKillstealRaze(razeAbility, spellAmp))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #26
0
Datei: Zeus.cs Projekt: Mej0/a
        public override async Task ExecuteComboAsync(Unit target, CancellationToken tk = new CancellationToken())
        {
            await HasNoLinkens(target, tk);
            await UseItems(target, tk);
            await DisableEnemy(target, tk);

            if (!MyHero.IsSilenced())
            {
                if (_wAbility.IsAbilityEnabled() && _wAbility.CanBeCasted(target) && _wAbility.CanHit(target))
                {
                    Log.Debug($"use W");
                    _wAbility.UseAbility(target);
                    await Await.Delay(GetAbilityDelay(target, _wAbility), tk);
                }

                if (_qAbility.IsAbilityEnabled() && _qAbility.CanBeCasted(target) && _qAbility.CanHit(target))
                {
                    Log.Debug($"use Q");
                    _qAbility.UseAbility(target);
                    await Await.Delay(GetAbilityDelay(target, _qAbility), tk);
                }
            }


            // check if we are near the enemy
            if (!await MoveOrBlinkToEnemy(target, tk))
            {
                Log.Debug($"return because of blink");
                return;
            }

            if (ZaioMenu.ShouldUseOrbwalker)
            {
                Orbwalk();
            }
        }
Beispiel #27
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Lina", "zaioLinak", false, "npc_dota_hero_lina", true);

            heroMenu.AddItem(new MenuItem("zaioLinaAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioLinaAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioLinaKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioLinaKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _stunAbility  = MyHero.GetAbilityById(AbilityId.lina_light_strike_array);
            _slaveAbility = MyHero.GetAbilityById(AbilityId.lina_dragon_slave);
            _ultAbility   = MyHero.GetAbilityById(AbilityId.lina_laguna_blade);
        }
Beispiel #28
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Legion", "zaioLegion", false, "npc_dota_hero_legion_commander", true);

            heroMenu.AddItem(new MenuItem("zaioLegionAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioLegionAbilities", string.Empty);
            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioLegionKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioLegionKillstealAbilities", string.Empty);
            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            OnLoadMenuItems(supportedStuff, supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _oddsAbility = MyHero.GetAbilityById(AbilityId.legion_commander_overwhelming_odds);
            _duelAbility = MyHero.GetAbilityById(AbilityId.legion_commander_duel);
            _pressTheAttackAbility = MyHero.GetAbilityById(AbilityId.legion_commander_press_the_attack);
        }
Beispiel #29
0
        public override void OnLoad()
        {
            base.OnLoad();

            var heroMenu = new Menu("Nyx", "zaioNyx", false, "npc_dota_hero_nyx_assassin", true);

            heroMenu.AddItem(new MenuItem("zaioNyxAbilitiesText", "Supported Abilities"));
            var supportedStuff = new MenuItem("zaioNyxAbilities", string.Empty);

            supportedStuff.SetValue(new AbilityToggler(SupportedAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedStuff);

            heroMenu.AddItem(new MenuItem("zaioNyxKillstealAbilitiesText", "Supported Killsteal Abilities"));
            var supportedKillsteal = new MenuItem("zaioNyxKillstealAbilities", string.Empty);

            supportedKillsteal.SetValue(new AbilityToggler(KillstealAbilities.ToDictionary(x => x, y => true)));
            heroMenu.AddItem(supportedKillsteal);

            ZaioMenu.LoadHeroSettings(heroMenu);

            _ultAbility      = MyHero.GetAbilityById(AbilityId.nyx_assassin_vendetta);
            _manaBurnAbility = MyHero.GetAbilityById(AbilityId.nyx_assassin_mana_burn);
            _stunAbility     = MyHero.GetAbilityById(AbilityId.nyx_assassin_impale);
        }
Beispiel #30
0
        private void Cast_R()
        {
            if (!R.IsReady())
            {
                return;
            }

            if (Menu.Item("Misc_useR_ifStun").GetValue <bool>())
            {
                foreach (var target in AllHerosEnemy.Where(hero => hero.IsValidTarget(R.Width)))
                {
                    CastRToCollision(GetCollision(target));
                }
            }

            if (Menu.Item("Misc_useR_ifcanKill").GetValue <bool>())
            {
                var target = SimpleTs.GetTarget(390, SimpleTs.DamageType.Physical);
                if (target.Health < GetComboDamage(target) && target.IsValidTarget(MyHero.Distance(R.GetPrediction(target).CastPosition)))
                {
                    R.Cast(V2E(MyHero.Position, R.GetPrediction(target).CastPosition, -50), UsePackets());
                }
            }
        }