Without delving into scripts at all, creation kit has many condition functions you can run on actors and other forms to get information.
Some of these condition functions have no papyrus counterpart, for example:
GetCurrentCastingType: this determines whether the spell is concentration, fire and forget or constant on a specified actor
Is there any way to use these functions in scripts?