NB: Using trig_new() is obsolete and should not be used anymore!!

Use hooks instead!

This document will be updated in the future.

This is merely a copy of the header from /std/trigaction.c If someone feels
to improve it, please feel free to do it.

  /std/trigaction.c

  This package handles triggering of actions due to text encountered
  by the NPC.

  Observe that this includes text that is written to the NPC, ie not
  only tell_object() but also write(). This includes among other things
  room descriptions.

  Typical usage:

  trig_new("pattern","function");

  "pattern"
                A 'parse_command()' pattern. Can be VBFC.

  "function"
                Function in this object to call when pattern matched the
                catched text. Can be VBFC.

  Example:
                trig_new("%s 'says:' %s", "say_something");
                  -- Will on trig call: say_something(str1, str2);

                trig_new("%l 'drops' %i", "drop_something");
                  -- Will on trig call: drop_something(live1, item1);

  NOTE1:
        There is a maximum limit of 10 '%' in a pattern.

  NOTE2:
        There can be any number of patterns (max 1000). When a match
        is made the search terminates. A match is considered made if:

             - The pattern matches
             - The function called returns 1         <= NOTE

         A pattern can also be considered matched if the "function" value
         is 1 and not a string as it would normally be. This means that
         if the "function" is VBFC and returns 1 then it is considered a
         match.

         Note the difference between the returned value from the
         function called and the value of (a possible) VBFC call. The
         VBFC value is used as the name of the function to call. BUT if
         it does not return such a name and returns 1 instead, then it
         is a match. (Jemand Comprende ?!?)

  NOTE3:
         If the function is VBFC then the argument returned from the
         matched parse_command can be reached through the function:

                - trig_query_args()
                        - Which returns an array of the right number
                          of arguments.

         The actual text catched can be got through the function:

                - trig_query_text()

