Magic spells

Hi. I’m writing an adventure where the player needs a magic scroll to cast a spell. I need to know how to make possessing the scroll a requirement of casting the spell. Once the spell is cast, I’d like to have the scroll vanish.
Can anyone tell me how this is achieved? Any help would be greatly appreciated.
Thanks. :smiley:

This situation calls for a pretty straightforward use of Check. I’m going to assume that you’ve already defined an action for the spell; in this case, it’s called ‘invoking’.

Check invoking: if the player does not carry the Scroll of Invocation begin; say "You are an amateur in the dark arts, and cannot cast invocations without a scroll to help you."; stop the action; end if;

And for the disappearing scroll:

After invoking: say "The scroll vanishes in a shower of pixie dust. The pixie dust then vanishes in an annoying sparkle-whoosh effect."; remove the Scroll of Invocation from play;

(That is, if you’re using Inform 7. I7 coding questions should go on the I7 subforum, not this one.)