|
Cuthalion Beginner
Joined: 29 Jun 2003 Posts: 18 Location: USA
|
Posted: Fri Jul 11, 2003 4:41 am
Wild card usage and syntax |
I am not sure what to do here. What is correct wild card usage and syntax if I want to do this trigger...
#TR {(name) joins your team.} {examine (name); #VAR @(name)}
but the important thing is the trigger must only work when the output line is ONLY "(name) joins your team." not "Cuthalion says (name) joins your team." or "Light Bulb ponders (name) joins your team."
When I use (name) I mean any name.
Thanks,
Cuthalion |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Jul 11, 2003 6:50 am |
^ - this pins down the pattern to the front of the line
$ - same as above, except for the end of the line
* - matches any continuous series of letters, numbers, and whitespace, but does not capture ZMud's special characters
%* - same as *, but also handles special characters (this is very dangerous because it allows other players to make you do things, so don't use it unless you know how)
&variablename -- same as * by default, though you can specify specific wildcard patterns; the result is assigned directly to the variable instead of put into a system variable (%1...%99)
{item1|item2|item3} -- a stringlist that can only include text (no wildcards), allows you to specify only those items you want to match
%t - matches any direction (north, south, west, etc)
%x - matches any one-word combination of letters, numbers, and symbols (abc-123)
%a - matches any one-word combination of letters and numbers (abc123)
%w - matches any one-word combination of letters only (abc)
%d - matches any one-word combination of numbers only (123)
%n - matches any one-word combination of formatted numbers (123,456,789)
Except for the &variablename syntax, you can surround any grouping of wildcards and plain text to have it captured to a system variable. System variables, as far as triggers and aliases are concerned, are defined as %1...%99. You can access any captured value in a multiple-state trigger by using %t1...%t99. The #PCOL command uses %x1...%x99 to reference captured values. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 11, 2003 3:22 pm |
#TR {^(%x) joins your team.$} {examine %1;#VAR %1}
This relies on the ^ to prevent triggering on says and ponders. The $ probably isn't necessary. The #VAR command doesn't actually do anything other than display the value, if any, of @(name). You probably intended to store some value from the "examine" in it, but you'll need a separate trigger for that. |
|
|
|
Cuthalion Beginner
Joined: 29 Jun 2003 Posts: 18 Location: USA
|
Posted: Sat Jul 12, 2003 5:25 am |
Thank you very much!!!
BTW you people are Gods!!! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|