Home mm2k6 Help Files Commands Script ENtities - Actions
22 | 01 | 2018
Script ENtities - Actions
Article Index
Script ENtities
All Pages


Format: /action {text pattern} {commands} {group name}

Action tells the client to look for a specific string of text from the mud
and to execute a command or multiple commands when it finds it. Typing
/action by itself will list all of the actions you have defined.

   {text pattern} This is the text to look for to trigger the action. 
   {commands} The commands are the actions you want to take when the action s triggered. 
   {group name} This is an optional parameter. See the user guide for help on groups.

/action {You are hungry.}{take food bag;eat food}
This is the most basic form of an action. It sees the text "You are
hungry." and then sends the commands "take food bag" and "eat food" to
the mud.

/action {^You are hungry.}{take food bag;eat food}
You can 'anchor' an action by starting it with a caret (^). When an action
is anchored the text to search for must be at the beginning of the line.

/action {%0 looks at you.}{say Hi $0}
%0-%9 are substitution variables that you can use in the trigger side of an
action. They work like a wildcard character but store the text the wildcard
represents for your use. If the mud sent the text "Arithon looks at you."
it would send the command "say Hi Arithon" back. You can use up to 10 (0-9)
of these variables to help you match a text pattern.