Usage:
/TRIG pattern = body
/TRIGP priority pattern =
body
/TRIGC chance pattern =
body
/TRIGPC priority chance
pattern = body
Creates an unnamed macro that will trigger on pattern and execute body. If chance is given with /trigc or /trigpc, it will be the percentage probability of the trigger going off; default is 100%. If priority is given with /trigp or /trigpc, it will be the priority of the trigger; default is 0. The matching style of the trigger is determined by the global variable %{matching}.
If the command fails it returns 0. Otherwise, it creates a new macro and returns its (positive) number (useful in /undefn and /edit).
/trig is equivalent to:
/def
-tpattern
= body.
/trigp is equivalent to:
/def
-ppriority
-tpattern
= body.
/trigc is equivalent to:
/def
-cchance
-tpattern
= body.
/trigpc is equivalent to:
/def
-ppriority
-cchance
-tpattern
= body.
See: triggers, evaluation, patterns, /def, /untrig