SETHOOK expression [ , expression ]

   Synopsis:
      Adds a dependent hook

   Notes:
      A convenient way to create a hook that launches another Axbasic script (or
         notifies this script's parent task) whenever it fires.

      The first expression is the stimulus (a hook event). When the specified
         hook event occurs, the hook fires.
      (Axmud automatically assigns its own name to dependent hooks.)

      If the second expression is specified, it should be the name of an Axbasic
         script to run immediately (without a parent task) when the hook fires.
      If the second expression is omitted, this script's parent task receives a
         notification when the hook fires. Axbasic provides several intrinsic
         (built-in) functions for getting information about these notifiacations
         (see the help for NEXTIFACE for more information).
      Also see the help for WAITHOOK.

   Requires:
      If the script is not being run as a task, a SETHOOK statement without a
         second expression (specifying another script to run) is ignored (and no
         error message is generated). Execution continues with the next
         statement.

   Compatibility:
      Since Axbasic v1.4

   Examples:
      REM A hook that fires whenever text is received from the world
      SETHOOK "receive_text"
      SETHOOK "receive_text", "play_alarm"
