Yes, what are you trying to do? If all you want is to remove a spell from your book to make room for another one, you can do that manually in the game itself. I don't see the point in coming up with a script in order to do it.
There's an opcode for it, so you can do it by casting a custom spell. You can take a look at Minor Spell Sequencer in my mod for an example (I think it's /sob/wizard/spwi420.spl in my mod folder. It erases itself from the spellbook after casting.
Also most of my priest kits have an effect applied every level that removes certain spells from their "spellbook."
Yes, what are you trying to do? If all you want is to remove a spell from your book to make room for another one, you can do that manually in the game itself. I don't see the point in coming up with a script in order to do it.
I am working on a mod for specialized mage, I created 8 innate abilities, each one of them should link to a script, and as a class ability for each kind of specialized mage. When a mage learn a new specialized spell, he can use this innate ability to activate the script, and the script will change their specialized spells to a more powerful version(Saving throw penalty, magic resist piercing and etc. ). I know there is an opcode can remove spell from spellbook, but to achieve it, I am not just have to make new spells but also have to make a "remove spell "spell for each spells, that is...too much for me.
Comments
I am working on a mod for specialized mage, I created 8 innate abilities, each one of them should link to a script, and as a class ability for each kind of specialized mage. When a mage learn a new specialized spell, he can use this innate ability to activate the script, and the script will change their specialized spells to a more powerful version(Saving throw penalty, magic resist piercing and etc. ).
I know there is an opcode can remove spell from spellbook, but to achieve it, I am not just have to make new spells but also have to make a "remove spell "spell for each spells, that is...too much for me.