Example #1
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Program.Menu.Item("WSpells").IsActive() || !SpellManager.W.IsReady())
            {
                return;
            }

            foreach (var skillshot in
                     Evade.GetSkillshotsAboutToHit(
                         ObjectManager.Player, (int)(SpellManager.W.Delay * 1000f + Game.Ping / 2f)))
            {
                if (!SpellManager.W.IsReady())
                {
                    return;
                }

                var enemy = skillshot.Unit as Obj_AI_Hero;
                if (enemy == null)
                {
                    continue;
                }

                List <BlockedSpell> spells;
                BlockedSpells.TryGetValue(enemy.ChampionName, out spells);

                if (spells == null || spells.Count == 0)
                {
                    continue;
                }

                foreach (var spell in spells)
                {
                    var item = Menu.Item(enemy.ChampionName + spell.MenuName);
                    if (item == null || !item.IsActive())
                    {
                        continue;
                    }

                    if (!spell.PassesSlotCondition(skillshot.SpellData.Slot))
                    {
                        continue;
                    }

                    if (spell.IsAutoAttack || !spell.PassesBuffCondition(enemy) || !spell.PassesModelCondition(enemy))
                    {
                        continue;
                    }

                    if (!spell.PassesSpellCondition(skillshot.SpellData.SpellName))
                    {
                        continue;
                    }

                    Program.CastW(skillshot.Unit);
                }
            }
        }
Example #2
0
        public static float GetPredictedHealthPercent(this Obj_AI_Hero hero)
        {
            var dmg = 0d;

            foreach (var skillshot in Evade.GetSkillshotsAboutToHit(hero, 400))
            {
                try
                {
                    dmg += skillshot.Unit.GetDamageSpell(hero, skillshot.SpellData.SpellName).CalculatedDamage;
                }
                catch {}
            }

            return((float)((hero.Health - dmg) / hero.MaxHealth * 100));
        }
Example #3
0
 private static bool WillSkillshotHit(float time)
 {
     return(Evade.GetSkillshotsAboutToHit(Player, (int)time).Any());
 }