Hello,
it works now.
But you need to answer with the MemorizeSpell(memspell->slot, 0xFFFFFFFF, memSpellScribing).
I think it has to do with the fact that when the client wants to write a valid spell to the spellbook it send the packet for scribing a spell.
So you need to answer with the correct packet i think.
Code:
// Custom - Used for disabling scribes more than given number
if (disableScribe)
{
// Count scribed spells
int iScribed = 0;
for (int i = 0; i < MAX_PP_SPELLBOOK; i++)
{
if (m_pp.spell_book[i] != 0xFFFFFFFF)
iScribed++;
}
// check if we reached the maximum client can scribe spells
if (iScribed >= numMaxScribeSpells)
{
MemorizeSpell(memspell->slot, 0xFFFFFFFF, memSpellScribing);
Message(13, "Maximum spells scribed. Please unscripe some spells.");
return;
}
}
This works now like i wanted.
The only side effect is that you see the answer unknown spell written etc...
But thats ok since i can send the information to the client whats the real problem.
Thank you very much for the nice hint Zaela_S.