Trigger

Posted by Athory on Sat 05 Jan 2002 02:25 AM — 3 posts, 14,731 views.

#0
Just a quick question
*Baron Bob* is DEAD!!

need it to put in a command when ever *Baron (anyone)* is DEAD!!

USA #1
ok here is what to use for the trigger: "(\w*) is DEAD!!"

send this to world: "%1 is DEAD!"

the %1 recalls the wildcard (the name in this case) but inorder for it to work, you must check the Regular Expression box in the trig make screen. Its on the left side.

Neverwhere
Australia Forum Administrator #2
Are the asterisks part of it? In which case you might "escape" them in a regular expression, eg.


Trigger: ^\*Baron (\w+)\* is DEAD!!$
Send: Yell %1 is DEAD (or whatever)
Regular expression: checked


In the regular expression \* represents a literal asterisk, and \w+ represents one or more "word" characters. Putting them in brackets makes them wildcard #1, which you can then use in the "send" text.