var target = TargetSelector.GetTarget(SpellSlot.Q, TargetSelector.DamageType.Physical); if (Q.IsInRange(target)) { Console.WriteLine("Target is within Q range"); }
var target = TargetSelector.GetTarget(SpellSlot.W, TargetSelector.DamageType.Magical); if (W.IsInRange(target)) { W.Cast(target); }Overall, the LeagueSharp.Common package library is a helpful tool for League of Legends scripting, and the Spell class provides several useful methods such as IsInRange.