CICraftScribeScroll(object, int)

From NWN Lexicon
Jump to: navigation, search

Create and return a magic scroll for a specified spell.

object CICraftScribeScroll(
    object oCreator,
    int nSpellID


Object in whose inventory the newly created magic scroll is to be placed.
ID of the spell that is to be represented by the magic scroll.


This function creates a magic scroll with a specified SpellID on oCreator and returns the scroll object.

It checks if the oCreator has any material component required to scribe the scroll. If the check is successful, the first component found on oCreator (if one was required) will be destroyed and a scroll with the specified SpellID (nSpellID) will be created and placed into the inventory of oCreator.

If the scroll could be successfully created, the scroll item is returned; if the process fails, OBJECT_INVALID is returned instead.


This functions is used within CICraftCheckScribeScroll() to create a magic scroll on oCreator.

It will work within or outside of a spell script.

If a scroll with the specified SpellID requires a material component for the scribe process, oCreator must be in possession of at least one such component.


#include "x2_inc_craft"



See Also

functions:  CraftBrewPotion

author: motu99, editor: Mistress