Virindi Tank Meta System
The Virindi Tank Meta system is a way to control what the macro is doing on a higher level than normal operations. The system allows you to implement a Finite-state machine. This machine consists of rules and states. For Meta to operate, the Enable Meta Actions checkbox on the Profiles tab must be checked.
Rules and States
A state is merely a name that you assign for some stage the macro will be in. For example, "hunting", "buying comps", or "died running back". The macro is only in one state at a time. When you first log in, it is in the "Default" state. You can manually change the current state using the dropdown box in the bottom left corner of the meta tab.
A rule consists of a state, a condition, and an action. Rules are only checked if their state is the same as the current macro state. Each rule only happens once per time the macro is in a particular state (rules that have already run are listed in red in the main list).
As the macro runs, it looks at all the rules which haven't run yet with the same state as the current state. If the condition is true, the action listed in the rule is run.
Adding a Rule
When you add a rule, you get this interface. The left side of the panel is where you define the rule's condition and state, and on the right side you define the rule's action. Condition is the upper left box and state is below it.
For example, you might your character to run back to the battle when they die. You would have two routes: "runback" is a "once" route that takes you from your lifestone to the battlefield, and "fighting" is a normal route that is used while you are at the hunting area.
The first rule you need sets the state when you die, so you can begin performing actions. So you'd make a rule like this:
State: "Default", Condition: "Character Death", Action: "Set Meta State: dead"
Once your character dies the macro will switch the state to "dead", and when that happens you want to immediately perform a series of actions, like this:
State: "dead", Condition: "Always", Action: "Chat Command: /vt nav load runback"
State: "dead", Condition: "Always", Action: "Chat Command: /vt opt set enablebuffing true"
State: "dead", Condition: "Always", Action: "Chat Command: /vt opt set enablenav true"
When the "once" route "runback" has been run to the end, the nav route will be empty and it is time to resume hunting. Check for that like this:
State: "dead", Condition: "Navroute empty", Action: "Set Meta State: back"
To resume hunting, you need to do some more actions...
State: "back", Condition: "Always", Action: "/vt nav load fighting"
State: "back", Condition: "Always", Action: "/vt opt set enablecombat true"
And return the macro to the starting state.
State: "back", Condition: "Always", Action: "Set Meta State: Default"
The result should look something like this:
A copy of the profile for this example can be found here. To use it, extract the .met file to you Virindi Tank profile directory (typically c:\games\virindiplugins\virinditank).