Morrowind Mod:AddSpell
AddSpell
AddSpell, SpellID Where SpellID = Spell you wish to add to the target (known or affect spells). Type: Magic Returns: none Example: player->AddSpell, "alit bite" (add to known spell list) AddSpell, "ash woe blight" (add curse to spells affecting target) "adairan lalansour"->AddSpell, "Ogrul's_Lucky_Again" Scripts: CorprusOnPC diseaseChills
This function adds the given spell to the calling object. If the spell is a normal spell, it will be added to the list of the actor's known spells. If the spell is a curse/disease it will be added to the list of spells currently affecting the calling actor. Use RemoveSpell to remove spells added by AddSpell.
A bug related to this function is that if you add a curse type spell to a creature, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call RemoveSpell in an OnDeath clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: RemoveSpell