This is untested, but I think this should work, or should be very close to working if it was added to the source:
questmgr.cpp
Code:
void QuestManager::unscribespell(int spell_id, bool update_client=true) {
int i;
for(i = 0; i < MAX_PP_SPELLBOOK; i++)
{
if(m_pp.spell_book[i] == spell_id)
UnscribeSpell(i, update_client);
}
}
questmgr.h
Code:
void unscribespell(int spell_id, bool update_client=true);
perlparser.cpp
Code:
XS(XS__unscribespell);
XS(XS__unscribespell)
{
dXSARGS;
if (items != 0)
Perl_croak(aTHX_ "Usage: unscribespell(spell_id)");
int spell_id;
quest_manager.unscribespell(spell_id);
XSRETURN_EMPTY;
}
Code:
newXS(strcpy(buf, "unscribespell"), XS__unscribespells, file);
Then, you should be able to just do quest::unscribespell(spell_id); to do it. I think you could even do it without giving the message that they are being removed by using quest::unscribespell(spell_id, false); if I am reading the code correctly.