Currently the only way I have found to do this is by checking the perk assigned to the spell. This is very flawed though and I can't get shouts this way. Plus the powers array fills up with a bunch of racials and other (mod added?) permanent buffs.
Spoiler
Function Spells() Alteration = New Form[62] Conjuration = New Form[62] Destruction = New Form[62] Illusion = New Form[62] Restoration = New Form[62] Powers = New Form[62] Shouts = New Form[62] int s = 0 int a = 0 int c = 0 int d = 0 int i = 0 int r = 0 int p = 0 int sh = 0 int z = player.GetSpellCount() While s &--#60; z Form Spell_ = player.GetNthSpell(s) as Form If Spell_.gettype() == 22 Perk Perk_ = player.GetNthSpell(s).GetPerk() String PerkStr = "" If Perk_ != None PerkStr = Perk_.getname() endif If StringUtil.Find(PerkStr, "Alter") &--#62; -1 && a &--#60; Alteration.length Alteration[a] = Spell_ a += 1 elseif StringUtil.Find(PerkStr, "Conjur") &--#62; -1 && c &--#60; Conjuration.length Conjuration[c] = Spell_ c += 1 elseif StringUtil.Find(PerkStr, "Destru") &--#62; -1 && d &--#60; Destruction.length Destruction[d] = Spell_ d += 1 elseif StringUtil.Find(PerkStr, "Illus") &--#62; -1 && i &--#60; Illusion.length Illusion[i] = Spell_ i += 1 elseif StringUtil.Find(PerkStr, "Restor") &--#62; -1 && r &--#60; Restoration.length Restoration[r] = Spell_ r += 1 elseif p &--#60; Powers.length Powers[p] = Spell_ p += 1 endif elseif Spell_.gettype() == 119 && sh &--#60; Shouts.length Shouts[sh] = Spell_ sh += 1 endif s += 1 endwhileEndFunction
Any help would be greatly appreciated.
Thank You
EDIT: Just found GetAssociatedSkill()... smh
Just have to figure out shouts now.