# /trigger

Usage:

/TRIGGER [-ln] [-g] [-w[world]] [-h[event]] text

Executes macros with triggers or hook arguments that match text, just as if text had come from a socket or a hook event had occurred with text as its arguments. The return value of /trigger is the number of (non-quiet) macros that were executed. /Trigger is useful for debugging triggers and hooks.

Options:

-g
  Match "global" triggers or hooks that were not defined with /def -w
-wworld
  Match triggers or hooks for world, or the current world if world is omitted.
-hevent
  Match hooks where event matches the hook event and text matches the hook argument pattern. Without -h, /trigger matches triggers, not hooks.
-n
  Do not execute any of the matched macros; instead, display a list of each macro that would have matched, including its fallthru flag, priority, and name. (Note that if any macro in the list would have executed substitute() or /substitute, the macros listed after it may not be correct.)
-l
  Like -n, but list each macro in full, as if by /list.

If neither -g nor -w options are given, both are assumed. That is, text is matched against global triggers or hooks, as well as triggers or hooks for the current world.

See: triggers, hooks, debugging, /def

Back to index
Back to tf home page

Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004 Ken Keys