GetSpellSchool

From The Elder Scrolls Construction Set Wiki

A command for Oblivion Script Extender

Syntax:

(magicSchool:short) GetSpellSchool spell:ref

Returns the school of the spell, determined by the most expensive effect item.

Magic School Codes:
 0:    Alteration
 1:    Conjuration
 2:    Destruction
 3:    Illusion
 4:    Mysticism
 5:    Restoration

[edit] Notes

  • Will return 0 if passed an enchantment instead of a spell
  • This function doesn't return the spell school as set manually in the CS: it only uses the most costly effect. Thus, for instance, scripted spell effects will return spell school 0 (Alteration) even if they are set to another school in the CS.