BrutusMUD help



The argument is a list of keywords separated by spaces. If the
first word is the character 'p' by itself then the rest of the word list is
considered to be a phrase. The trigger is activated whenever a keyword (or
the phrase) is contained as a part of the act() message. Both the phrase and
keywords are case insensitive.
The act function is used for great deal of text sent to players, so this
is the most general trigger. Basically this will trigger on almost everything
you'll ever want (and some things you wont as well).
For example:
>MOBprogram: ACT, argument p pokes you in the ribs.
>This trigger will only be activated if a mobile receives a message in which
>the above five words are found in the exact order and spacing given. Note
>that the period is needed because the words must be found on their own. This
>eliminates confusion when the keyword is 'hi' and a message with the word
>'this' is being checked.
Only exceptions from the act trigger are emote and say commands. When you
specify a phrase, sometimes it consists of character name, object name or
some other variable parts, like in "Someone drops a waybread." In this case
the string that the argument is compared to will be "$n drops $p." You can
use the $'s only in phrases, in word list it will cause an error because it
would match on almost everything. The check can be cheated but it's highly
discouraged to do so without serious reason. The $ variables can either be
guessed based on HELP ACT ARGUMENTS or you can ask someone with access to
source code to find it.

All above also applies for ACT scripts. On succesfull match the script sets
"actor" and "victim" variables to contain corresponding $ variables.
Neither is guaranteed to be set to valid target, some act messages, like
items drowning in water for example, do not have valid actor, and many more
do not use victim so the victim wouldn't be valid as well.



Back to index


© Michal Kumžák 2011 | Provozováno na CMS E4E | Mapa webu