Spell scribing is done via dialogue, so you can apply all of the normal triggers to restrict it (variables, DV checks, &c.). However, the code as I've written it doesn't support adding triggers, but it should be easy to adapt.
If there's interest, I can certainly generalize the code to support custom triggers.