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;//true direction + speed Vector2 realFrom = from.LSExtend(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.LSExtend(ss.MissilePosition + a, ss.SpellData.Range + 50), from, radius)) return true; return false; }
public static void useWSmart(Skillshot skillShot) { //try douge with E if cant windWall var WDelay = getSliderItem(smartWMenu, "smartWDelay"); if (!W.IsReady() || skillShot.SpellData.Type == SkillShotType.SkillshotCircle || skillShot.SpellData.Type == SkillShotType.SkillshotRing) return; if (skillShot.IsAboutToHit(WDelay, myHero)) { var sd = SpellDatabase.GetByMissileName(skillShot.SpellData.MissileSpellName); if (sd == null) return; //If enabled if (!EvadeSpellEnabled(sd.MenuItemName)) return; //if only dangerous if (getCheckBoxItem(smartWMenu, "wwDanger") && skillShotIsDangerous(sd.MenuItemName)) { myHero.Spellbook.CastSpell(SpellSlot.W, skillShot.Start.To3D(), skillShot.Start.To3D()); } if (!getCheckBoxItem(smartWMenu, "wwDanger") && skillShotMenu["DangerLevel" + sd.MenuItemName] != null && skillShotMenu["DangerLevel" + sd.MenuItemName].Cast<Slider>().CurrentValue >= getSliderItem(smartWMenu, "smartWDanger")) { myHero.Spellbook.CastSpell(SpellSlot.W, skillShot.Start.To3D(), skillShot.Start.To3D()); } } }