Sorry, I don't know why I typed "as" instead of "==", but it was "==" in my script. I just typed that as I rewrote it for some reason.
One thing I've said already, is that I want it to respond when "rock" is said, but when the first word is not "(rock)". The first part of that I have covered, but it's the second that is the problem.
Somehow, the "if (!$regex($1,/(^| )\(rock\)( |$)/iS)) && ($regex($2-,/(^| )rock( |$)/iS)) {" line ended up working, but I don't like it. It doesn't work if any word is (rock), even though if (rock) is the second, third, etc. word I want it to work. Also what if the first word is "rock"? Will it still react then? Again, "rock" != "(rock)"... It's complicated. If "(rock)" was anything /but/ the first word, I'd still want it to work.
Again, "if rock !isin $strip($1) {" isn't entirely what I want, not at all...
To say things yet again, I want the script to do what I want it to do whenever "rock" is said, yet not if the first word is "(rock)". Anything of the following should cause a reaction: "blah (rock) blah", "rock (rock) rock (rock) blah", "rock blah rock", etc. Buuuuut, "(rock) blah", or more particularly "(rock) blah" should cause nothing.
But, particularly this version works well enough for me to be satisfied. The chances that (rock) would be said at any time other than as the first word are slim, so it's okay.
And for the "crock" side note, I've got those possibilities covered separately.

Last edited by coda2; 21/11/12 12:17 AM.