isdisctome() is actually kinda funny to read. It checks if the name of the item starts with "Tome ", an int caster can't use it, the spell scroll effect is a valid spell, and an int caster can't cast the spell.
traindisc() does a similar check to see if the name starts with "Tome ", you're not an int caster, your class can use the item, the spell scroll effect is a valid spell, your class can use the spell, you're high enough level, and you don't know it already, then it teaches it to you.
|