|
Chandler Mike Beginner
Joined: 08 Feb 2005 Posts: 18
|
Posted: Sat Apr 28, 2007 3:15 am
Trigger help |
Sorry if some of this stuff is intuitive, but I'm having some issues.
^%1 is in average shape
The "^" shows up in RED...why would that be? They help says to use it at the start of a pattern. The problem is, I can do a "say" or someone else can mimic that via a say or emote, and it appears as "person says: Mike is in average shape" and my trigger goes off.
I obviously want it only at the start of the line.
And on that note, I tried to put a "$" at the end of a patter and it was RED too.
I just have a lot of basic questions. Many of my triggers work, but the help files don't seem to do what they say they will. The wildcards, etc.
Like how do I just isolate one word like "pack" and make it highlighted in brown everywhere, without seeing the word "packs" highlighted in brown with the "s" as the mud's default color?
Thanks for any help you guys can give me.
Mike |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Sat Apr 28, 2007 11:22 am |
You should NOT be using %1 in the trigger pattern! If you are capturing a word you should use (%w), %w on it's own tells the trigger to match any word, when it is surround in round brackets it tells the trigger to keep the match for later use. The first match stored using round brackets can be referred to by using %1 in the script section the next match stored with %2 and so on. The colouring in the trigger line is coming from the new syntax checker and as long as your trigger is matching I would ignore any colours that are there.
As for isolating the word pack and pack alone make the trigger pattern " pack " without the quotes but with the spaces, some people use %spack%s as %s is the wildcard for matching spaces and tabs etc.
Beavis and Butt-Head moment, "I just said spack, heh heh heh heh". |
|
_________________ Taz :) |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sat Apr 28, 2007 12:03 pm |
As Taz said, the red colouring is just part of the new syntax highlighter. It's meant to highlight what is a special character (^, $ etc) so that it's easier to distinguish from normal text.
If you read up on 'Pattern Matching' within CMUD help it should help you with wildcards. I can't recreate a problem where the ^ is being ignored and allowing mimics via says or emotes though, if you can find a way to reproduce that the please post it. |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Apr 28, 2007 4:03 pm |
I'd use %q over %s, as %q will match anchor points as well (maybe punctuation too, but I think that's a different wildcard).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Sat Apr 28, 2007 5:16 pm |
Ah yes, thanks Matt, people do indeed use %qpack%q instead. No Beavis and Butt-Head moment this time.
|
|
_________________ Taz :) |
|
|
|
Chandler Mike Beginner
Joined: 08 Feb 2005 Posts: 18
|
Posted: Sat Apr 28, 2007 5:28 pm |
Thanks guys, that definitely helped me...maybe this will get me over the hump when it comes to figuring this stuff out.
Mike |
|
|
|
|
|