EQWatcher Evolution > Anatomy > Triggers


What are triggers?

Triggers tell EQWatcher to do something specific when it sees an event happen in-game.  The way it sees the event happen is via the log file, which is a log of what you see in your chat window.  Sorry but if you don't see it in your chat window, EQWatcher will not respond to it or even know about it (unless of course, it is in the NOTES file, which you can read about under aliases).  I say this because otherwise people are bound to ask if EQWatcher can tell them how much experience they got per kill.  All EQWatcher knows is "You gain experience!!" :)

EQWatcher Evolution triggers have the following characteristics, in no particular order: Name, Trigger Text, Action Type, Action Data.  Triggers can be set to play a wav, a CD track, an mp3, speak some text, or execute an alias (and if they're defined in a script they can do anything the actual script language allows.. but this section is for understanding the use of triggers and how to use the default functionality to create and remove them).


Name: The name of your trigger can be pretty much anything you want it to be.  This name is simply used for accessing the trigger after it is started (you can remove it).  I would recommend you use unique names, yet easily remembered.  Only one trigger can exist with any given name.  Trigger names ARE case sensitive.

Trigger Text: The trigger text contains EXACTLY what EQWatcher should be looking for in your log file.  It must contain every single part of the line, including the time and date stamp.  When using the core script's aliases to create triggers, you only need to account for what you see in the chat window (the time and date stamp is automatically taken care of).  Variables are used to account for parts of the text that are unknown or can vary (i.e. variable).

Action Type:

These action types are used exactly as they are shown here (you can see how they are used further below, where the commands are explained):

Action Data: Action data tells EQWatcher which information should be sent to the selected action type.  For .WAV sounds, you must supply the filename (and path if needed) of the .WAV. For CD playing, you must supply the track number to play.  For MP3 playing, you must supply a search string (explained in the WinAMP section).  For TTS, you must supply the text to speak.  For aliases, you must supply the command to execute (such as "speed" or "ETA").


Now you should understand the basics of triggers, and we can get on to creating some triggers.

The command for creating triggers looks like this:

trigger [Action Type] "[Name]" "[Trigger Text]" [Action Data]

Examples:


"trigger TTS sync "my slow 1" "@trash@ yawns." Target slowed" will create a trigger that says "Target slowed" synchronously when something yawns (shaman slow).  The @trash@ variable is used because the name of this mob is unused. 

"trigger alias "my slow 2" "@trash@ yawns." timer TTS sync "my slow" 5:45 Target losing slow" will create a 5 minute 45 second timer named "my slow" that speaks "Target losing slow" synchronously, each time something yawns.  The @trash@ variable is used because the name of this mob is unused. 

"#trigger TTS sync "my slow 3" "@PSTR1@ yawns." %PSTR1%  slowed" will create a trigger that says "Target slowed" synchronously when something yawns (shaman slow).  The @PSTR1@ variable is used because it is predefined and we would like to use the information seen before the yawn (a mob's name).  We use the "#" prefix because the %variable% would otherwise be replaced at the time the trigger is added, rather than when the trigger is checked for matches.

"#trigger alias "my slow 4" "@PSTR1@ yawns." timer TTS sync "my slow" 5:45 %PSTR1% losing slow" will create a 5 minute 45 second timer named "my slow" that speaks "%PSTR1% losing slow" (Where %PSTR1% ) synchronously, each time something yawns.  The @PSTR1@ variable is used because it is predefined and we would like to use the information seen before the yawn (a mob's name).


The command for removing triggers looks like this:

trigger remove "[Name]"

Examples:


"timer remove "my slow 1"" will remove the trigger named "my slow 1"

"timer remove "my slow 2"" will remove the trigger named "my slow 2"

"timer remove "your trigger name"" will remove the trigger named "your trigger name"


Tthere is a button on the main window to list all active triggers.  Depending on how much you know about EQWatcher Evolution, it might seem funny to see @ and % symbols all over the place.  You might be better off not worrying about it, but if you want a list of all active triggers this is the place to start.