Difference between revisions of "Virindi Tank Meta System"

From VirindiPlugins
Jump to navigation Jump to search
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
  
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 [http://en.wikipedia.org/wiki/Finite-state_machine 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.
+
The Virindi Tank Meta system is a way to control what the macro is doing on a higher level than normal operations. It is designed to automate quests. The system allows you to implement a [http://en.wikipedia.org/wiki/Finite-state_machine 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.
 +
 
 +
= Subtopics =
 +
* [[Meta Expressions]]
 +
* [[Meta ChatMessageCapture Condition]]
 +
* [[Meta Views]]
 +
* [[Public Meta Repository]]
  
 
= Rules and States =
 
= Rules and States =
Line 11: Line 17:
  
 
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.
 
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.
 +
 +
 +
Note: Meta conditions in the current state are evaluated approximately three times a second while the macro is enabled (once every 293 milliseconds and whenever the macro needs to decide what to do next). This check is done before the normal operation of the macro.
  
 
= Adding a Rule =
 
= Adding a Rule =
Line 26: Line 35:
 
* '''Chat Message''': Act upon Chat Message.
 
* '''Chat Message''': Act upon Chat Message.
 
* '''Pack Slots <=''': Act upon Pack Slots less than or equal to X.
 
* '''Pack Slots <=''': Act upon Pack Slots less than or equal to X.
* '''Seconds in State >=''': Act upon Seconds in State greater than or equal to X.
+
* '''Seconds in State >=''': Act upon Seconds in State greater than or equal to X. Resets when macro is turned off and on.
 
* '''Navroute Empty''': Act upon an empty Navroute.
 
* '''Navroute Empty''': Act upon an empty Navroute.
 
* '''Character Death''': Act upon Character Death.
 
* '''Character Death''': Act upon Character Death.
Line 42: Line 51:
 
* '''Portalspace Exited''': Act upon exiting portalspace.
 
* '''Portalspace Exited''': Act upon exiting portalspace.
 
* '''Not''':  
 
* '''Not''':  
 
+
* '''Seconds in state (P) >=''': Act upon Seconds in State greater than or equal to X. Does NOT reset when macro is turned off and on.
 +
* '''Time Left On Spell >=''': Act if a spell on your character has greater than a certain amount of time left on it.
 +
* '''Burden Percent >=''': Act if Burden Percent is greater or equal to a specified value
 +
* '''Dist Any Route Pt >=''': Act if your character moves a certain distance away from any point in your route.
 +
* '''Expression''': Act upon an expression
 +
* '''Chat Message Capture''': Allows you to perform a Regular Expression match on incoming chatbox text and save matched substrings to Meta variables for later use - See [[Meta ChatMessageCapture Condition]]
  
  
Line 51: Line 65:
 
* '''All''': Allows multiple Reactions to Occur.
 
* '''All''': Allows multiple Reactions to Occur.
 
* '''Load Embedded Navroute''': Allows you to embed a navroute in to a meta
 
* '''Load Embedded Navroute''': Allows you to embed a navroute in to a meta
 +
* '''Call Meta State''': Switches to another state and adds a return state to the call stack.
 +
* '''Return From Call''': Switches to the last state on the call stack, and removes it from the stack. If the call stack is empty, an error is raised and meta is disabled.
 +
* '''Expression Action''': Perform an expression action
 +
* '''Chat Expression''': Output a chat expression
 +
* '''Set Watchdog''': When you enter a state, you can set a watchdog. If at any time during that state your character has not moved from where they are for a certain amount of time, a second state is called.
 +
* '''Clear Watchdog''': Clears the current watchdog.
 +
* '''Get VT Option''': Gets the current value from the specified option and stores it in an expression variable
 +
* '''Set VT Option''': Sets a VT option value based on the return value of an expression
 +
* '''Create View''': Creates a new Meta View using XML - See [[Meta Views]]
 +
* '''Destroy View''': Destroys the specified meta view
 +
* '''Destroy All Views''': Destroys all meta views
  
 
= Example =
 
= Example =
Line 87: Line 112:
  
 
= Community Examples =
 
= Community Examples =
 +
<i>Disclaimer: Use at your own risk. The authors take no responsibility for any effect on your characters. Read all instructions.</i>
 +
 +
Visit the [http://immortalbob.com/phpBB3/ Community Support forum] for questions regarding Meta profiles (not plugins themselves)
 +
  
 
There are many different types of meta profiles that can be created. From simple hunting profiles that run back to your dungeon on death(see above), to more complex systems of control and automation.
 
There are many different types of meta profiles that can be created. From simple hunting profiles that run back to your dungeon on death(see above), to more complex systems of control and automation.
  
 
Over time, this section will be updated with example meta's of all types.<br>
 
Over time, this section will be updated with example meta's of all types.<br>
This will <i>not</i> be a step-by-step tutorial (for now)
 
  
<i>The example meta's will be available for your reference and use.
+
Some may work for you immediately, others may require a bit of customization
Some may work for you immediately, others may require a bit of customization</i>
+
 
 +
 
 +
In Meta, RegEx is used to identify and react on chat messages sent or heard by your client.
 +
 
 +
 
 +
Beware: Chat commands in the examples will be open ended. Meaning, anyone can trigger the commands that are in place.
 +
To protect yourself, you can make them character specific so you only accept them from approved names.
  
 +
The following examples may or may not work as intended, use at your own risk.
  
Beware: Most chat commands in the examples will be open ended. Meaning, anyone can trigger the commands that are in place.
 
To protect yourself, you can make the commands character specific so you only accept them from approved names. You can also use special characters in the command, like ! or *
 
  
 +
'''Anyone in any chat channel:'''
  
Look for the chat command regex, it will appear as <b>^.*().* (say|says|tells you), \"!command\"$</b> or something similar
+
^.*().* (say|says|tells you), \"YourCommandHere\"$
  
Add the character names you want to accept commands from within the <b>()</b>. You can add multiple names by separating with a <b>|</b><br>
 
For example:
 
<b>^.*(Character1|Character2).* (say|says|tells you), \"!command\"$</b>
 
  
 +
'''Specific names in any chat channel''' - By Validus of Morningthaw
  
To accept commands from a specific chat channel you can do:<br>
+
(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char1|Char2|Char3)\>.+\<\\Tell\>) (say|says|tells you), \"Your Command Here\"$
<b>\[Allegiance\] ().* (say|says), \"!command\"$</b><br>
 
<b>\[Fellowship\] ().* (say|says), \"!command\"$</b><br>
 
You can use any chat channel you have your client listening to (they do not need to be in an active chat window, as long as they are checked in Options - Character tab)
 
  
 +
''Simply add names within the () and separate with |''
  
  
[[Media:CeldisethRestock.zip|Celdiseth Recomp]] - Recalls Sanctuary, uses Celdiseth Gem and attempts to recomp. Requires current Mag-tools, Sanctuary recall, Celdiseth gems and a Celdiseth VTclassic profile. <br><i> You must edit the "Return" state and add your "runback" meta to /vt meta load</i>
+
'''Specific chat channel'''
  
[[Media:LocationSplit.zip|SplitProfile]] - One profile that launches in to multiple profiles based on character inventory (to reduce amount of commands.)
+
^\[ChannelNameHere\] (|).* (say|says), \"YourCommandHere\"$
  
[[Media:Withered_Hill_Portal.zip|Withered Hill Portal Drag]] - If pulled in to portal on withered hill, recalls primary and resets route (input your routes)<br>
+
''(example: ^\[Allegiance\] (|).* (say|says), \"YourCommandHere\"$)''
  
[[Media:SharedControls.zip|Simple Multi-Character Controls]] - Very basic multi-character controls for "Command Meta" reference<br>
 
  
[[Media:DangerousPortalDevice.zip|Dangerous Portal Device Auto Nav]] - Auto Nav to destination of choice (AL, OP, or VOD) (/hom to Yanshi Mansion)
+
'''Green Messages'''
  
[[Media:DPD.zip|Dangerous Portal Device Auto Nav (Magtools cmds)]] - Auto nav to destination of choice (AL, OP, or VOD). Requires current mag-tools and DPD device either on patio, or hook near your mansion portal drop. Read the default state for commands.
+
Simply place a ^ before the green text in your chat message box.  
  
 +
The ^ denotes that the string must begin with the first word in the text. This protects you from accidental triggers by other players.
  
[[Media:LegendKeys.zip|Arwic AutoChest]] - Attempts to loot the arwic chests. Requires Mag-tools Auto Loot Chests on and a Legendary Loot profile loaded in Vtank.
 
  
Stand directly in front of a chest and select it <i>(you must keep the chest selected during looting)</i>
+
'''NPC Chat'''
  
Turn Vtank and Meta On
+
Place ^ before the start of the NPC chat in the chat message box.
  
Place the meta in the "Check" state
+
The ^ denotes that the string must begin with the first word in the text. This protects you from accidental triggers by other players.
  
 +
for quotation or question marks you will need to type \" or \? in order for it to match " or ?
  
<b>Work in Progress</b>
+
''(example: ^Master Arbitrator tells you, \"If you wish to fight as a gladiator in the Arena I will require you to purchase a ticket from the Ticket Vendors over there. We do need to keep the place running don't we\?\")''
  
[[Media:AutoGamble.zip|AutoGamble]] - Uses any gambling tokens in your pack, and Town Criers some of the garbage
 
  
Must be at Holtburg Casino
 
  
Must use Holtburg portal prior to starting (so portal recall is holt)
+
-----
  
Autostack and Autocram On
+
Examples:
  
Uses /mt give partial match for elixir/tonic/philtre, so mule any items with those in the name before starting
+
[[Media:TownPortals.zip|Town Network Routes]] - By The Art of War - Routes to any portal within the TN. All routes start from Annex side drop, Say !townname to route.
  
To begin, stand in front of the Gamesmasters and set the meta to CheckLowStake
+
[[Media:CeldisethRestock.zip|Celdiseth Recomp]] - Recalls Sanctuary, uses Celdiseth Gem and attempts to recomp. Requires current Mag-tools, Sanctuary recall, Celdiseth gems and a Celdiseth VTclassic profile. <br><i> You must edit the "Return" state and add your "runback" meta to /vt meta load</i>
  
 +
[[Media:LocationSplit.zip|SplitProfile]] - One profile that launches in to multiple profiles based on character inventory (to reduce amount of commands.)
  
<i>To turn off giving an item to the crier, locate its "Trash" state and set the Item Inventory Count to 0
+
[[Media:Withered_Hill_Portal.zip|Withered Hill Portal Drag]] - If pulled in to portal on withered hill, recalls primary and resets route (input your routes)<br>
  
= Quests =
+
[[Media:DangerousPortalDevice.zip|Dangerous Portal Device Auto Nav]] - Auto Nav to destination of choice (AL, OP, or VOD) (/hom to Yanshi Mansion)
Disclaimer: Use at your own risk. The authors take no responsibility for any effect on your characters. Read all instructions before starting.
 
<br>
 
  
Please stay at the keys while quest automation is in progress - some states may require player interaction.  
+
[[Media:DPD.zip|Dangerous Portal Device Auto Nav (Magtools cmds)]] - Auto nav to destination of choice (AL, OP, or VOD). Requires current mag-tools and DPD device either on patio, or hook near your mansion portal drop. Read the default state for commands.
  
Visit the [[MetaQuest]] page
+
[[Media:CharacterCheck.zip|Character Check Example]] - Example for how to make sure all characters are in proper state before sending a command.

Latest revision as of 17:08, 10 December 2016

Introduction

The Virindi Tank Meta system is a way to control what the macro is doing on a higher level than normal operations. It is designed to automate quests. 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.

Subtopics

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.


Note: Meta conditions in the current state are evaluated approximately three times a second while the macro is enabled (once every 293 milliseconds and whenever the macro needs to decide what to do next). This check is done before the normal operation of the macro.

Adding a Rule

Vtguide-meta.png

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.

Conditions (Left Side)

  • Never: Never act upon.
  • Always: Always act upon.
  • Any: Act upon any.
  • All: Act upon all.
  • Chat Message: Act upon Chat Message.
  • Pack Slots <=: Act upon Pack Slots less than or equal to X.
  • Seconds in State >=: Act upon Seconds in State greater than or equal to X. Resets when macro is turned off and on.
  • Navroute Empty: Act upon an empty Navroute.
  • Character Death: Act upon Character Death.
  • Any Vendor Open: Act upon Any Vendor Opened.
  • Vendor Closed: Act upon Any Vendor Closed.
  • Inventory Item Count <=: Act upon Inventory Item Count less than or equal to X of item.
  • Inventory Item Count >=: Act upon Inventory Item Count greater than or equal to X of item.
  • Monster Name Count Within Distance: Act upon X number of specific monster name within range of X.
  • Monster Priority Count Within Distance: Act upon X number of priority monsters within range of X.
  • Need to Buff: Act upon need to buff.
  • No Monsters Within Distance: Act upon no monsters within range.
  • Landblock ==: Act upon specific landblock (larger area).
  • Landcell ==: Act upon specific landcell (smaller area).
  • Portalspace Entered: Act upon entering portalspace.
  • Portalspace Exited: Act upon exiting portalspace.
  • Not:
  • Seconds in state (P) >=: Act upon Seconds in State greater than or equal to X. Does NOT reset when macro is turned off and on.
  • Time Left On Spell >=: Act if a spell on your character has greater than a certain amount of time left on it.
  • Burden Percent >=: Act if Burden Percent is greater or equal to a specified value
  • Dist Any Route Pt >=: Act if your character moves a certain distance away from any point in your route.
  • Expression: Act upon an expression
  • Chat Message Capture: Allows you to perform a Regular Expression match on incoming chatbox text and save matched substrings to Meta variables for later use - See Meta ChatMessageCapture Condition


Actions (Right Side)

  • Set Meta State: Allows you to set/change Meta state after X Action has occurred.
  • Chat Command: On Action do X Chat Command. (eg. On Character Death do Chat Command /f I have died =( )
  • All: Allows multiple Reactions to Occur.
  • Load Embedded Navroute: Allows you to embed a navroute in to a meta
  • Call Meta State: Switches to another state and adds a return state to the call stack.
  • Return From Call: Switches to the last state on the call stack, and removes it from the stack. If the call stack is empty, an error is raised and meta is disabled.
  • Expression Action: Perform an expression action
  • Chat Expression: Output a chat expression
  • Set Watchdog: When you enter a state, you can set a watchdog. If at any time during that state your character has not moved from where they are for a certain amount of time, a second state is called.
  • Clear Watchdog: Clears the current watchdog.
  • Get VT Option: Gets the current value from the specified option and stores it in an expression variable
  • Set VT Option: Sets a VT option value based on the return value of an expression
  • Create View: Creates a new Meta View using XML - See Meta Views
  • Destroy View: Destroys the specified meta view
  • Destroy All Views: Destroys all meta views

Example

For example, you might want 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:

Meta example profile.png

A copy of the profile for this example can be found here. To use it, extract the .met file to your Virindi Tank profile directory (typically c:\games\virindiplugins\virinditank).


Community Examples

Disclaimer: Use at your own risk. The authors take no responsibility for any effect on your characters. Read all instructions.

Visit the Community Support forum for questions regarding Meta profiles (not plugins themselves)


There are many different types of meta profiles that can be created. From simple hunting profiles that run back to your dungeon on death(see above), to more complex systems of control and automation.

Over time, this section will be updated with example meta's of all types.

Some may work for you immediately, others may require a bit of customization


In Meta, RegEx is used to identify and react on chat messages sent or heard by your client.


Beware: Chat commands in the examples will be open ended. Meaning, anyone can trigger the commands that are in place. To protect yourself, you can make them character specific so you only accept them from approved names.

The following examples may or may not work as intended, use at your own risk.


Anyone in any chat channel:

^.*().* (say|says|tells you), \"YourCommandHere\"$


Specific names in any chat channel - By Validus of Morningthaw

(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char1|Char2|Char3)\>.+\<\\Tell\>) (say|says|tells you), \"Your Command Here\"$

Simply add names within the () and separate with |


Specific chat channel

^\[ChannelNameHere\] (|).* (say|says), \"YourCommandHere\"$

(example: ^\[Allegiance\] (|).* (say|says), \"YourCommandHere\"$)


Green Messages

Simply place a ^ before the green text in your chat message box.

The ^ denotes that the string must begin with the first word in the text. This protects you from accidental triggers by other players.


NPC Chat

Place ^ before the start of the NPC chat in the chat message box.

The ^ denotes that the string must begin with the first word in the text. This protects you from accidental triggers by other players.

for quotation or question marks you will need to type \" or \? in order for it to match " or ?

(example: ^Master Arbitrator tells you, \"If you wish to fight as a gladiator in the Arena I will require you to purchase a ticket from the Ticket Vendors over there. We do need to keep the place running don't we\?\")



Examples:

Town Network Routes - By The Art of War - Routes to any portal within the TN. All routes start from Annex side drop, Say !townname to route.

Celdiseth Recomp - Recalls Sanctuary, uses Celdiseth Gem and attempts to recomp. Requires current Mag-tools, Sanctuary recall, Celdiseth gems and a Celdiseth VTclassic profile.
You must edit the "Return" state and add your "runback" meta to /vt meta load

SplitProfile - One profile that launches in to multiple profiles based on character inventory (to reduce amount of commands.)

Withered Hill Portal Drag - If pulled in to portal on withered hill, recalls primary and resets route (input your routes)

Dangerous Portal Device Auto Nav - Auto Nav to destination of choice (AL, OP, or VOD) (/hom to Yanshi Mansion)

Dangerous Portal Device Auto Nav (Magtools cmds) - Auto nav to destination of choice (AL, OP, or VOD). Requires current mag-tools and DPD device either on patio, or hook near your mansion portal drop. Read the default state for commands.

Character Check Example - Example for how to make sure all characters are in proper state before sending a command.