Does SpellCast work fro Cleric spells as well as wizard?
SpellCastPriest() is what you want. You can also detect innates with SpellCastInnate(), but there's a huge caveat in that the spell has to be the correct level (e.g., SPIN789 has to be Level 7 to be detected), which then means you can't use it with HaveSpell() (where the level needs to be 1 to prevent crashing).
PC should include any characters directly controlled by the player(s), according to the IESDP anyway. I don't think 2 includes familiars (3 in ea.ids), but that should be a pretty odd occurrence, as Guest says. Our mystery guest's point is probably the OR is unnecessary. In any case, I thought Player1 [..] Player 6 correspond to multiplayers, not to NPC slots. Not sure about that though - the IESDP entry on object.ids only documents the Player#Fill entries.
Player1 - Player6 correspond to the join order (or thereabouts; I never quite got it exact, and in some tests, I swear a dead PC changed their order in the party according to the object); the Fill entries correspond to the actual GUI party order.
PC unfortunately does catch EA FAMILIAR objects (this is why everybody in the game will dialogue with your familiar -- the engine auto-deposits familiars in *front* of Player1 for every jump and area transition, so the waiting NPCs all See([2]) and pick up the familiar and start talking to Ferret). (It makes sense, as you'd otherwise be able to run your familiar past all the triggers and forced encounters along any route and get screwed up if you never actually take a true PC down the same path.) PC doesn't pick up any other friendly characters (thankfully), however (no summons or EA ALLY junk), so it's basically party+familiar.
(Edit) I would use SpellCast([2],2206)*, because, really, a familiar casting the spell ought to have the same effect as a party NPC, only I didn't know how to test for that. But (hangs head) I'm still not sure where to find the numbered IDs for all the different spells rather than the names. Edit2: Ooooh, ok, there they are. Right in front of me. Right. I'm going to use that, then, too, since it seems much simpler. Won't change everything, though, till I've tried it on a couple of blocks--a lesson I really should already have learned :P
Honestly, unless it makes it easier for you, I wouldn't bother. It's a convenience if you have a good memory for the numbers (and work with them often enough to be able to memorize them), but it won't make any difference except in the weirdest case (as Miloch says, only if some mod horribly screwed the IDS files before your mod is installed).
Actually, the 1st, 3rd and 7th posts in this thread kind of suggest it was in dispute. Some anonymous suggestion that it "should be working" doesn't prove anything, unless one provides concrete evidence (such as from a test).
I like to think that I know what I'm talking about (except when I don't, of course!). The action works fine and the code originally posted is fine. I've been doing this long enough to hopefully not have to give concrete evidence (such as from a test) for every single point that comes up just to prove that, hey, I know how that works, thanks.
Yeah. Well it does for normal scripts. So the script I tested had a sight check and the script posted (apparently) doesn't, big deal. The fact there is no range or sight check in the posted script is somewhat troubling. One probably doesn't want it triggering from the other side of the area.
It has nothing to do with normal or irregular scripts. SpellCast() doesn't work that way. It is a big deal because your test didn't prove what you suggested it did (and heaven forbid I come along and point it out).