Artson Posted February 29 Share Posted February 29 I'm trying to make a script for quest so that when you pick up any spell tome you automatically learn the spell it teaches, and when the spell tome is removed from your bags you automatically unlearn the spell it teaches. I've searched google far and wide with only one hit that kind of touches on this (https://www.reddit.com/r/skyrimmods/comments/ke07t5/removing_spell_tomes_removes_spells/?utm_source=share&utm_medium=web2x&context=3), but its very vague and I'm not grasping the instructions very well (still learning papyrus). Any help would be immensely appreciated. Should the mod be finished proper credit would be given. Link to comment Share on other sites More sharing options...
xkkmEl Posted March 1 Share Posted March 1 Not having tried this myself, I cannot vouch for the veracity of the tips you are referring to... In a nutshell, it is suggesting that you (1) catch OnItemAdded and OnItemRemoved events on the player, then (2) use AddSpell and RemoveSpell to adjust the players spell inventory. You would typically catch the events in a ReferenceAlias script placed on an alias referring to the player. You know the item added or removed is a spellbook because its GetSpell method returns something. You'll also need GetItemCount to test if it was the last instance of the book that was removed. Link to comment Share on other sites More sharing options...
Artson Posted March 1 Author Share Posted March 1 At work at the moment, will give this a whirl when I get home. Link to comment Share on other sites More sharing options...
Recommended Posts