Esempio n. 1
0
 public static bool willColide(Skillshot ss, Vector2 from, float speed, Vector2 direction, float radius)
 {
     Vector2 ssVel = ss.Direction.Normalized() * ss.SpellData.MissileSpeed;
     Vector2 dashVel = direction * speed;
     Vector2 a = ssVel - dashVel;
     Vector2 realFrom = from.Extend(direction, ss.SpellData.Delay + speed);
     if (!ss.IsAboutToHit((int)((dashVel.Length() / 475) * 1000) + Game.Ping + 100, ObjectManager.Player))
         return false;
     if (ss.IsAboutToHit(1000, ObjectManager.Player) && interCir(ss.MissilePosition, ss.MissilePosition.Extend(ss.MissilePosition + a, ss.SpellData.Range + 50), from,
         radius))
         return true;
     return false;
 }
Esempio n. 2
0
        public static void useWSmart(Skillshot skillShot)
        {
            //try douge with E if cant windWall
            var delay = SubMenu["aShots"]["smartWD"].Cast<Slider>().CurrentValue;
            if (skillShot.IsAboutToHit(delay, myHero))
            {
                if (!W.IsReady() || skillShot.SpellData.Type == SkillShotType.SkillshotRing)
                    return;

                var sd = SpellDatabase.GetByMissileName(skillShot.SpellData.MissileSpellName);
                if (sd == null)
                    return;

                //If enabled
                if (!EvadeSpellEnabled(sd.MenuItemName))
                    return;

                //if only dangerous
                if (SubMenu["aShots"]["wwDanger"].Cast<CheckBox>().CurrentValue &&
                    !skillShotIsDangerous(sd.MenuItemName))
                    return;

                myHero.Spellbook.CastSpell(SpellSlot.W, skillShot.Start.To3D(), skillShot.End.To3D());
            }
        }