I have two questions about spells and scripting.
1/ I added a NPC to the game, let's call him Bob. I talk to Bob with a party member, let's say Alice. I would like that Bob's dialog has different replies depending on the spells that Alice can cast. For example I put in Bob.d:
IF ~~ THEN BEGIN SpellList SAY @400 IF ~HaveSpell(2112)~ THEN REPLY @403 EXIT IF ~~ THEN REPLY @402 EXIT END
The problem with that code is that (if I understand correctly) it checks if Bob can cast the spell instead of checking if Alice can cast the spell. The IESDP specifies
Quote
HaveSpell(I:Spell*Spell) - Returns true only if the active CRE has the specified spell memorised.
How could I make Alice the "active CRE" in the dialog file?
2/ Is it possible to add/remove a spell from the list of known spells of a NPC? For example, I would like to remove the spell "Magic Missile" from Alice's spellbook. I looked in the IESDP action list, but could not find how to do that.
Thanks in advance for your answers.
Edited by Zvalat, 17 August 2011 - 11:53 PM.












