Difference between revisions of "Help/Trigger"

From DikuMUD Wiki
Jump to navigation Jump to search
(Created page with "= Trigger = If you want to do whatever the beastly Fido tells you to do: $trigger obey /^the Beastly Fido tells you '(.+?)'/ $1 Or maybe you'd like to $trigger smarmy /^(@...")
 
Line 3: Line 3:
 
If you want to do whatever the beastly Fido tells you to do:
 
If you want to do whatever the beastly Fido tells you to do:
  
$trigger obey /^the Beastly Fido tells you '(.+?)'/ $1
+
  {trigger obey /^the Beastly Fido tells you '(.+?)'/ $1}
  
 
Or maybe you'd like to
 
Or maybe you'd like to
  
$trigger smarmy /^(@friends)\sleaves (.+?)\.$/ say I love $1. Especially when $1 leaves $2.
+
  {trigger smarmy /^(@friends)\sleaves (.+?)\.$/ say I love $1. Especially when $1 leaves $2.}
  
You may notice this is written with Regular Expressions. If you're not familiar or want to learn more: [https://regexr.com/ RegEx Reference]
+
You may notice this is written with Regular Expressions. If you're not familiar or want to learn more
 +
this site [https://regexr.com/ RegEx Reference] allows you to build triggers.
 +
 
 +
See also:
 +
  {Help bot}
 +
  {Help variable}
 +
  {Help alias}

Revision as of 07:48, 21 September 2020

Trigger

If you want to do whatever the beastly Fido tells you to do:

 {trigger obey /^the Beastly Fido tells you '(.+?)'/ $1}

Or maybe you'd like to

 {trigger smarmy /^(@friends)\sleaves (.+?)\.$/ say I love $1. Especially when $1 leaves $2.}

You may notice this is written with Regular Expressions. If you're not familiar or want to learn more this site RegEx Reference allows you to build triggers.

See also:

 {Help bot}
 {Help variable}
 {Help alias}