Skip to content

MQ2Events

MQ2Events

Respond to message-based events

Authors: Bardomatic, Sic, brainiac, eqmule • Config: MQ2Events_CharacterName.ini, MQ2Events.ini

Resource Download Support Repo Quick Start

MQ2Events allows you to configure a reaction to any text-based event. For example, if you want to /cry when the text "has become ENRAGED" appears, you're in the right place.

If the event doesn't make text, such as entering a body of water, you should use MQ2React.

Commands

/event [option] [<name> <trigger text | command text>]
Adds, lists, deletes, and controls all events

/eventdebug [on|off]
Turns event debugging on or off

Settings

The settings are found in MQ2Events_CharacterName.ini, though they can be added entirely with in-game commands.

You can also use a "generic" MQ2Events.ini

Here's a simple example:

[mecry]
;the name of the event, can be any short name
- trigger=#1# has become ENRAGED#*#
;the trigger will take anything that appears in #1# and writes it to the TLO ${EventArg1}
- command=/me cowers in fear at the sight of ${EventArg1}
;this is the command that's run, a little emote that includes the mob's name.

Examples

The triggers, #1# through #9#, act as a wildcard and will take any text that appears in their place and writes it to the corresponding TLO, \({EventArg1}** through **\). For example, if the text is: - For sale: baby shoes, never worn. and the trigger is, - For sale: #1#, never #5# then following command, /echo ${EventArg1} ${EventArg5} will output: - [MQ2] baby shoes worn.

Here's an example to help characters duck when a monster asks them to,

[kaelraidduck]
trigger="#*#The ice-encrusted Avatar of War shouts that each of these must bend the knee: #1#, #2#, and #3#.#*#"
command=/if ((${Me.CleanName.Equal[${EventArg1}]}) || (${Me.CleanName.Equal[${EventArg2}]}) || (${Me.CleanName.Equal[${EventArg3}]}) && (!${Me.Ducking})) /multiline ; /gsay Ducking! ; /mqp on ; /attack off ; /twist clear ; /keypress duck

Here's one to get notified via EQBC when a character completes a task step, so it notifies you that it completed a step, what Task it was updated in, what step you're currently on, and the instruction for that step.

[taskupdate]
trigger="Your task '#1#' has been updated#*#"
command=/bc Task Update ${EventArg1} now on step ${Task[${EventArg1}].Step.Index}:${Task[${EventArg1}].Step}.

Here's one that uses multiline and variables to congratulate players who have achieved greatness:

[congorats]
trigger=<SYSTEMWIDE_MESSAGE>: #1# has been defeated by a group of hardy adventurers! Please join us in congratulating #2# along with everyone#*#
command=/if (${congratz} == NULL) /multiline ; /timed 10 /if (!${Defined[congratz]}) /declare congratz timer global 990; /timed 15 /varset congratz 990; /timed 20 /if (!${Defined[randreply]}) /declare randreply int global ${Math.Rand[300]}; /timed 25 /varset randreply ${Math.Rand[300]}; /timed 90 /if (${randreply} >= 0 && ${randreply} <= 100) /tell ${EventArg2} congratz!; /timed 95 /if (${randreply} >= 101 && ${randreply} <= 200) /tell ${EventArg2} nice job!; /timed 100 /if (${randreply} >= 201 && ${randreply} <= 300) /tell ${EventArg2} thanks I hate ${EventArg1}!

More examples can be found in this excellent video, as well as the support thread.

Top-Level Objects

EventArg1

Holds a string set by MQ2Events trigger #1#

Forms

string EventArg1

Holds text taken from MQ2Events trigger #1#. Will stay until overwritten.

EventArg2

Holds a string set by MQ2Events trigger #2#

Forms

string EventArg2

Holds text taken from MQ2Events trigger #2#. Will stay until overwritten.

EventArg3

Holds a string set by MQ2Events trigger #3#

Forms

string EventArg3

Holds text taken from MQ2Events trigger #3#. Will stay until overwritten.

EventArg4

Holds a string set by MQ2Events trigger #4#

Forms

string EventArg4

Holds text taken from MQ2Events trigger #4#. Will stay until overwritten.

EventArg5

Holds a string set by MQ2Events trigger #5#

Forms

string EventArg5

Holds text taken from MQ2Events trigger #5#. Will stay until overwritten.

EventArg6

Holds a string set by MQ2Events trigger #6#

Forms

string EventArg6

Holds text taken from MQ2Events trigger #6#. Will stay until overwritten.

EventArg7

Holds a string set by MQ2Events trigger #7#

Forms

string EventArg7

Holds text taken from MQ2Events trigger #7#. Will stay until overwritten.

EventArg8

Holds a string set by MQ2Events trigger #8#

Forms

string EventArg8

Holds text taken from MQ2Events trigger #8#. Will stay until overwritten.

EventArg9

Holds a string set by MQ2Events trigger #9#

Forms

string EventArg9

Holds text taken from MQ2Events trigger #9#. Will stay until overwritten.

Discussions that link here