Bob!RynthidZerzelikyrAyanAerlintheNeftetgearknightsdarkisleSanctuary

Meta Examples, tips and tricks

Unofficial support for the creating and editing of metas.
Dmdtt
Moderator
Posts: 266

Meta Examples, tips and tricks

Post#1 » July 31st, 2014, 6:44 pm

Few examples for tricks that you can do with meta that make life quite a bit easier. if you have a question about a topic that is not listed below feel free to make a post and I will see what I can do.


Switching to a different meta with a different starting state than Default


All: {Chat Command: /vt meta load MetaName, Set Meta State: dead}


this will allow you start directly in dead state when switching to a different meta rather than having it initially

load Default.


RecompCheck for multiple characters with a single line.


Any: {All: {Item "Soul Bound Bow" >=1, Any: {Item "Prismatic Taper" <= 600, Item "Massive Mana Charge" <= 3}},

All: {Item "Soul Bound Staff" >=1, Any: {Item "Prismatic Taper" <= 2000, Item "Massive Mana Charge" <= 3}},

All: {Item "Soul Bound Greatsword" >=1, Any: {Item "Prismatic Taper" <= 1000, Item "Massive Mana Charge" <= 3}}}

Set Meta State: Recomp


this will allow you to differentiate 3 seperate taper levels for your characters for a single recomp check

for more efficient use of states and possibly fewer recomps.


Switching Route based on NPC chat while speaking with an NPC


Always Embedded Nav "NPC" (1Pt)

Chat Message: "NPC tells you, (enter chat here)" Embedded Nav "NPC2" (1Pt)


this will intiially load the route for the first NPC then move to NPC2 after seeing the chat message you enter

Note that for many quest NPCs and all killtask NPCs they will have multiple potential messages depending on the

stage of the quest/task. killtask NPCs have 3 in particular starting task, incomplete task, complete task.


Detecting a character who is stuck

this is a little more complicated as it requires you to determine which strategy works best for the location you are hunting.


Example One - bouncing between two states detecting monsters in range or out of range and using seconds in state to determine if stuck


Default2 #1 Mons "" dist 6 Set Meta State: Default3

Default2 Seconds in state >= 120 Set Meta State: Dead

Default3 No Monsters Within 7m Set Meta State: Default2

Default3 Seconds in state >= 120 Set Meta State: Dead


Basically if the meta stays with creatures in range or out of range for 2 minutes time this would trigger you to do

your normal runback sequence as if you died getting you essentially unstuck. you will want to make sure No

Monster within distance is a larger distance than Monsters within range so you don't hop between states rapidly. I

find this strategy most effective while hunting outdoors. I also make use of it in order to make sure the Ralirea or

Fallen Metas are not stuck while searching for spawns.


Example Two - Using portal space entered to reset seconds in state


Default2 PortalSpace Entered Set Meta State: Default2

Default2 Seconds in State >= 600 Set Meta State: Dead


I use this method most commonly in dungeons like Baishi 120 Hive where i am recalling frequently to the top of

the dungeon as part of my regular route. each time i recall it resets my seconds in state, if i were stuck on the

other hand it would take me too long to complete a section of the hive and it would eventually trigger the Dead

state.

Example Three - Detecting if stuck using a stopwatch

Probably one of the most useful tricks I have discovered since meta functions have been added. throughout my routes at

select points I have a chat command that will create a stopwatch in order to track my times through certain sections


/vt mexec setvar[Stopwatch, stopwatchcreate[]];stopwatchstart[getvar[Stopwatch]]


this rule in the chat command will both create/start and restart this constantly running stopwatch whenever it is issued

through the nav route. If it happens that I reach past a designated point in time (for the sake of this example I am using

5minutes) the meta will set the state to my runback.

Code: Select all

Default2 -

Expr stopwatchelapsedseconds[getvar[Stopwatch]]>=300 

Set Meta State: Runback


if you wish to stop the stopwatch completely simply issue the Chat Command /vt mexec clearvar[Stopwatch] or use the

function

ExprAct clearvar[Stopwatch]


Using a Call

Couple good reasons for using a call rather than a a simple transition.

Example One- Colosseum meta, I use calls in between combat states in order to trigger the /mt face.

because there are multiple states in which you would want to load a route for the /mt face and rather than

making 6 rules for each default state 3,5,7,9 I instead made 6 rules for the /mt face in a seperate state and

called it in between states.(you can find this meta at http://www.virindi.net/wiki/index.php/P ... Repository)


Default4 No Monsters Within Distance 50m Call: DefTurnCall, return to Default5

Default5 #1 Mons "" dist 50 Set Meta State: Default6

Default6 No Monsters Within Distance 50m Call: DefTurnCall, return to Default7

DefTurnCall Always All: {Embedded Nav "Face" (1Pt), Return From Call}


This will allow you to use a rule in between multiple states without having to write it out over and over and over

again.


Example Two - RecompMeta using a single recomp meta for all of your other metas. This can be a bit trickier at

first but in the long run saves a ton of time. the basic concept is in each of your hunting metas you will have a

line like this that will trigger a recomp.


Default2 Item "Prismatic Taper" <= 50 All: {Chat Command: /vt meta load RecompMeta, Call: recomp, return to ReturnHunting}


now the return will varry depending on what meta you are going to want to return to. in recomp you will have

your basic rules for recomping then when you trigger to return to wherever you are hunting you would do this.


Recomp Nav Route Empty Return from Call

ReturnHunting Always All: {Chat Command: /vt meta load Hunting, Set Meta State: dead}


Essentially what you are able to do is add 1 state for every meta that will use your recomp meta, that will send it

back to the proper meta and set it to your runback state(mine is dead state).


Example Three- this is still a WIP for me but I figured I’d share it anyway. I've been running into some

issues with vtank waitlists with how it stores the fellowship waitlist even after I disband and reform the

fellowship for the next run. Only time I ever ran into this problem was with colosseum much like were all my

other creative solutions have come from. Right before I start the turn in sequence where it rotates back and

forth between turnin and turnintransition I reform the fellowship and begin recruiting. The solution to the vtank

waitlist issues was actually rather simple; I would work out a way to track the number of members that

joined/left my fellowship starting when the turnin sequence began with calls.


TurnIn Always Chat Command: /vt opt set Autofellowmanagement false

TurnIn Chat Message: "You fought in the Colloseum's" All: {Return from Call, Embedded Nav "[None]" (0pts), Chat Command: /vt opt set AutoFellowmanagement true}

TurnInTransition Seconds in state >= 15 Call: TurnIn, Return to: TurnInTransition

TurnInTransition ^.*is now a member of your Fellowship. Set Meta State: TurnInTransition2

TurninTransition2 Seconds in State >=15 Call: TurnIn, Return to: TurnInTransition2

TurnInTransition2 ^.*is now a member of your Fellowship. Set Meta State: TurnInTransition3

TurnInTransition2 ^.*has left your Fellowship Set Meta State: TurnInTransition2


And so on. 1 state for each member of the fellowship that could potentially join, using the calls you are able to

hold the place of the number of fellowship members that have joined your fellowship until the turn in sequence

is complete. The reason autofellowmanagement is disabled during TurnIn is because it will not be able to track

someone who is recruited to the fellowship during that .25s window between TurnInTransition and TurnIn. Last of

all because when you are finished TurnIn you will have a return queued still that would set you back to

TurnInTransition(x) in order to clear this.


TurnIn Chat Message: "If you wish to fight," All: {Chat Command: /vt meta load [metaName], Set Meta State: Door}


Using the existing line that normally triggers the state change to Door State instead have it reload the meta

which will reset any returns queued and setting the state will allow you to keep place of where you are in the

meta at the same time.


Reacting Differently to same command based on Character its issued from.

Fairly straightforward, just using a different character name for each regex command in the name. most

commonly used for follow routes.


Default2 Chat Message: (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char1)\>.+\<\\Tell\>) (say|says|tells you), \"!follow\"$ Embedded Nav "FollowChar1" (1PT)

Default2 Chat Message: (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char2)\>.+\<\\Tell\>) (say|says|tells you), \"!follow\"$ Embedded Nav "FollowChar2" (1PT)

Default2 Chat Message: (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char3)\>.+\<\\Tell\>) (say|says|tells you), \"!follow\"$ Embedded Nav "FollowChar3" (1PT)


this will allow you to follow a different character based on who issues the command rather than always the same

designated leader.


Detecting Rubberbanding while using magtools jumps.

This requires the jump you are attempting to traverse two seperate landcells without crossing back over the first

landcell under normal operation. Lets use jumping off the Roof at AB. For simplicity I am going to use 4 states,

Recall, Jump, JumpCheck, JumpComplete.


Recall Always Embebedded Nav "ABRecall" (2pts)

Recall All: {Portalspace Exited, Landcell == 1134001F} All: {Embedded Nav "None" (0pts), Set Meta State: Jump}


the reason you need the portalspace exit is if you begin jumping in middle of portalspace with magtools

commands its almost always going to rubber band. Now for this particular jump id recommend the following nav

points, 1s pause, /mt face 180, 2s pause, /mt jumpw 1000, 10s pause.


Jump LandCell == 1134001F Embedded Nav "Jump" (5pts)

Jump Not Landcell == 1134001F All: {Embedded Nav "None" (0pts), Set Meta State: JumpCheck}

JumpCheck All: {Landblock==11340000, Not Landcell== 1134001F, Seconds in State>= 5} Set Meta State: JumpComplete

JumpCheck Any: {Landcell==1134001F, Not Landblock 11340000} Set Meta State: Recall


Basically what this will do is after you make the jump it will detect the change in landcell and go into a check

state. in the check state if it sees you go back to the original starting landcell it will know you rubberbanded and

send you back to the original starting location through the recall state and restart the jump process all over

again.


Stopping vtank from pausing after each kill.

Warning do not use this if creatures in location you are hunting have a delayed death animation as you may pass

them before vtank can examine the corpse for rares. this is more useful for rare farming than anything else, it

allows you to go from spawn to spawn killing creatures much more effectively rather than default settings which

cause you to pause for 1-2 seconds after every spawn of creatures before continuing. It works similarly to

example 1 of detecting if a character is stuck.


Default2 #1 Mons "" dist 6 All{Chat Command: /vt opt set enablelooting false, Set Meta State: Default3}

Default2 Chat Message: ^.*has discovered Set Meta State: Default4

Default3 No Monsters Within 7m All{Chat Command: /vt opt set enablelooting true, Set Meta State: Default2}

Default3 Chat Message: ^.*has discovered Set Meta State: Default4

Default4 Always All: {Chat Command: /vt opt set enablelooting true, /vt opt set lootpriorityboost true}

Default4 Chat Message: ^.*has discovered Set Meta State: Default4

Default4 Seconds in state>= 360 Set Meta State: Default2


Vtank only will pause between spawns if looting is enabled, the work around for this is to disable it when killing a

creature then enable it again when no creatures in range, what I've done is enable looting under 2 conditions

if I see the rare message ^.*has discovered or if no creatures in range. between the two conditions I never miss a

rare crystal and I was able to increase kill rate by an average of 109 per hour on my archer.
2 x

Dmdtt
Moderator
Posts: 266

Re: Meta Examples, tips and tricks

Post#2 » March 5th, 2016, 3:36 pm

so it has been quite some time since I last updated this page but I thought it was well past time I added examples for expressions. I will continue adding to the page over next month or two as I think of useful examples, or get asked questions I found interesting. Also if anyone has anything they want explained please feel free to ask in this thread, message me in game /vit dmdtt, or through IB forums.


React off character name

Code: Select all

Expr getcharstringprop[1]==CharacterName


Fellow Recruitment

this is mostly used by me for the gauntlet exploit but it will work well for an example here. you can use a chat expression to recruit a player who is selected

Code: Select all

ExprChat \/mt fellow recruit +wobjectgetname[wobjectgetselection[]]


another interesting thing you can do with expressions is send /t's to yourself.

Code: Select all

ChatExpr \/t +getcharstringprop[1]+\, Message


Recomp

Before I have posted how you can use call/return to recomp in a separate meta and return to the proper meta and state, this is an entirely different and easier method to achieve the same goal. when you load the recomp meta save a variable with the profile name, in my example I'm going to use what I used to load a separate meta for recomp while running colosseum

Code: Select all

All{
ExprAct setvar[Profile, AutoColoFinal]
ExprAct setvar[StateName, ReturnRecomp]
Chat Command: /vt meta load Recomp}


important thing to note if using numbers while storing profile or state name you will have to use +cstr[#] to add it to the string. for example if trying to set state name to Default2 for instance you would use

Code: Select all

ExprAct setvar[StateName, Default+cstr[2]]


once you load the recomp meta it will run its course however you prefer then once finished using the two variables you used above issue two chatExpressions

Code: Select all

All{
ChatExpr \/vt meta load +getvar[Profile]
ChatExpr \/vt setmetastate +getvar[StateName]}


Stopwatches

Stopwatches are invaluable for data collection also they are useful for detecting when stuck alongside watchdogs, stopwatches are also useful for use instead of seconds in state when you have a meta that changes states too often for seconds in state to work. in most of my rare macro routes I find myself adding a stopwatch to the start of their hunting routes using a chat command /vt mexec setvar[Stopwatch, stopwatchcreate[]];stopwatchstart[getvar[Stopwatch]] then as a condition in the Listening state

Code: Select all

Expr stopwatchelapsedseconds[getvar[Stopwatch]]>=1800
Set Meta State: Runback


this will react based on if my route took longer than 30 minutes to complete and I can use this to recall out and runback. because the routes are naturally circular or linear it will reset the stopwatch whenever you finish a full cycle of your route.


Lists

This is something that honestly has no practical use for meta but is more of a data gathering method. I've been tinkering with this past 6 months or so, storing data using meta in a list of variables in order to collect multiple data points when errors or really anything occurs I want to watch.

for example I wanted to see how long it normally takes to make a total route of my rare macro dungeon. now you could of course do this by just adding a simple integer counter +1 each time you make a route of dungeon and use a stopwatch but I wanted to actually see individual times for each time around.

Code: Select all

ExprAct setvar[Run+cstr[getvar[RunCounter]], stopwatchelapsedseconds[getvar[RunTime]]];setvar[RunCounter, getvar[RunCounter]+1];setvar[RunTime, stopwatchcreate[]];stopwatchstart[getvar[RunTime]]


the basic idea is you are using a counter in the variable name to store multiple variables with the same rule, then once that info is stored add +1 to RunCounter and restart the stopwatch. then once that is finished you can use this ChatExpr for the output

Code: Select all

ChatExpr \/f total time for Run +cstr[(getvar[OutputCounter])]+\: +cstr[getvar[Run+cstr[getvar[OutputCounter]]]]+\ seconds


if you look in the example I posted below name ExampleExprLists you will see I set the variable OutputCounter to a value of 1 to kickstart the loop then with each action giving a string with run# and time for that run I added +1
to the counter until OutputCounter=RunCounter. you can store other information as well alongside just time such as how many creatures were nearby, player coordinates, landcell etc.
Attachments
ExampleExprLists.zip
(477 Bytes) Downloaded 125 times
2 x

Joeblow8579
Posts: 67

Re: Meta Examples, tips and tricks

Post#3 » June 6th, 2016, 9:16 am

Thank you for your very helpful explanation of how to properly use stopwatches and the like. I'd been using seconds in state to detect being stuck, but it's less than ideal for the reasons you enumerated here.

Thanks for all your work on your metas as well!
1 x

Dmdtt
Moderator
Posts: 266

Re: Meta Examples, tips and tricks

Post#4 » August 17th, 2016, 9:34 am

figured it was time to finally post a hunting meta guide I promised well over a year ago so here it goes.

Hunting Meta Guide

The goal of a hunting meta is to allow you to continue on a designated hunting route and to adjust its actions based on predicted variables. examples of events or variables that may arise that you will need to react to are character death, getting stuck on a rock, running low on comps warp lag(sadly all too common), and synchronizing actions across multiple characters to keep them working together towards a common goal. whether that be luminance, xp or loot.

To begin I want to give a brief explanation of how I structure my hunting metas and the purpose of the individual states.

Default - I use as a launching state it loads up my character profile for the hunting location then adjusts settings in any other plugins like magtools, AcPowerSaver etc, loads an empty route to clear the navigation and sets the normal settings for my character profile then finally sets to Default2.

Default2 - is what I call my listening state, 95% of the time nothing happens in this state it just waits for any of the number of conditions listed in the state to be met, some examples are character death or commands from other characters or low on components

Runback- on death or after recomp a character will enter this state to get back to the designated hunting area and enter the Hunting state.

Recomp- a state which triggers a character to follow predetermined routes to a vendor where they can buy spellcomps or fletching components.

Hunting state - is simply an Always load Embedded Nav Route then return to Default2 to listen for further conditions to be met.

Reset- sets the normal settings for the meta hunting/buffing/combat/nav/looting true

For the purpose of this example I will demonstrate a meta I made rather recently for hunting at TouTou.

to start the meta i will begin in the Default state, where the meta will load the specific char profile/monster list that is applicable to only that location.

Code: Select all

Default-

Always

All{Chat Command: /vt settings loadchar TouTou, Embedded Nav "[None]" (0pts), Call Reset, return to Default2}


From there the meta transitions to the Reset state,

Code: Select all

Reset-

Always

All{Chat Command: /vt opt set enablebuffing true, Chat Command: /vt opt set enablelooting true, Chat Command: /vt opt set enablenav true, Chat Command: /vt opt set enablecombat true, Chat Command: /vt opt set summonpets true, Return From Call}


once reset has set the designated settings the meta will then return from the call and go to the previosly designated state which is default2

In Default2 the meta will sit until it has been issued a command. Default2 is also the state which the meta will be in when hunting normally. in order to make the meta more user friendly you will want to add commands for triggering recomp states or runback states. Next I will demonstrate a runback state.

in the runback state there is a number of things you will want included.

1. Routes to get you to your destination from anywhere, separating into different routes after each portal you enter based on landcell conditions.

2. a timer in case you get stuck

3. a rule which disables neccessary settings like combat/looting/buffing and loading the initial route

Code: Select all

Runback-

Always

All{Chat Command: /vt opt set enablebuffing false, Chat Command: /vt opt set enablecombat false, Chat Command: /vt opt set enablelooting false,
Embedded Nav "[Recall]" (4pts)}


in this circular nav the four points included are as follows,

Portal Recall

25s pause

Aphus Recall

25s pause

this nav will first check to see if portal recall is tied to TouTou as your last destination if not it will then recall to aphus and enter TN

Code: Select all

Runback-

LandCell==F6820033

Embedded Nav "[AphusToTN]" (3pts)


this nav would be a circular route with the following points,

one nav point at aphus drop

one nav point near TN portal

one nav point being the TN portal itself added using the Add Portal/NPC button

next you will react to being in TN annex side,

Code: Select all

Runback-

Landcell==0070145

Embedded Nav "[TNToTouTou]" (15-20pts)


id suggest placing the nav points fairly close together making sure that you won't get stuck on any of the bookshelves with the final point being the TouTou portal in TN.

the final route will be from the TouTou drop to somewhere near where your hunting route will begin, I suggest making the final route a once route so you can use navroute empty later in the state to trigger entering the hunting state.

Code: Select all

Runback-

Landcell==F5590034

Embedded Nav "[TouTouToHunting]" (60-150pts)


Next you will need a condition that triggers you to enter the hunting state, because a once route was used in the final route of the Runback state you can use the navroute empty condition to trigger the hunting state.

Code: Select all

Runback-

Navroute Empty

Set Meta State: Hunting


before we move on to the hunting state make sure to add a condition that is acceptable for the location in case you get stuck. the simplest way is to add a seconds in state. if you remain in the state for much longer than it would normally take to perform the necessary actions you will know an error has occured and react in a way to correct it.

Code: Select all

Runback-

Seconds in State>= 600

Set Meta State: Runback


The purpose of a hunting state for my meta's is to contain all of the routes you may use while hunting at that particular location, normally I have 2-3 routes at each hunting area I could queue up to load at any given time after a runback depending on how many people are in the area. after the meta loads your route then proceed to call the Reset state again and return to Default2

Code: Select all

Hunting-

Always

All{Embedded Nav "[TouTouHunting]" (90-180pts), Call Reset, return to Default2}


and now you should have combat buffing etc. enabled as well as a hunting route loaded now its time to finish setting up the Default2 state and add a Recomp State to the meta.

first to outline objectives of Default2, as stated above this is the state in which your character basically waits for something to go wrong or react from a command from the user. you will need the following

1. Character death condition to set Runback

2. !runback chat message trigger so user can easily get the meta started(i will be using fellowship chat for this trigger you can replace the regex with whatever you wish)

3. Low comps trigger that Calls Recomp state and returns to Runback

4. low comps chat trigger !recomp that calls Recomp state

Code: Select all

Default2-

Any{Character Death, Chat: ^\[Fellowship\].*(say|says), \"!runback\"$}

Set Meta State: Runback


next to make the recomp triggers

Code: Select all

Default2

Any{Item "Prismatic Taper" <= 200, Item "Massive Mana Charge" <= 1, Chat: ^\[Fellowship\].*(say|says), \"!recomp\"$}

Call Recomp, Return to Runback


and now the last thing to setup is recomp. now i highly suggest using Virindi Item Tools built in recomp function you can enable it by opening up the green triangle plugin switching to Comps tab and adding all the comps your character needs along with values for how many to buy. for my example to work properly make sure that you leave Prismatic Tapers at the very bottom of the list so that your character will purchase them last and you can use their item count as your trigger for leaving.

with that said first thing is to route to the vendor, generally your first point in the route you want a quick recall incase you are in middle of TouTou when you run low on comps and need to escape quickly. any recall will do personally i will be using Aphus Recall. at the same time you set your new route make sure to also turn off buffing, combat, looting and any other setting that will interfere with your abillity to route to the vendor quickly.

Code: Select all

Recomp

Always

All{Embedded Nav "AphusRecall" (2pts), Chat Command: /vt opt set enablebuffing false, Chat Command: /vt opt set enablecombat false, Chat Command: /vt opt set enable looting false}


the next trigger will be upon reaching aphus based on the landcell, from here you have a few options to get to society hall but personally I always recall then either to house or mansion so there is no possibility of outside interference from another player.

Code: Select all

Recomp-

Landcell== F6820033

Embedded Nav "MansionRecall" (2pts)


next from mansion route a few feet away from the mansion and summon your society stronghold portal and use the portal using /mt use gateway

Code: Select all

Recomp-

Landcell==Set Current on mansion drop

Embedded Nav "ToSociety" (9pts)


from here since all my characters are RB I will be using RB society as my landcells. next route will take you from RB drop to the vendor and will then open the trade window with the vendor using the Open Vendor button in route tab.

Code: Select all

Recomp-

Landcell== 00B90294

Embedded Nav "RBVendor" (40pts)


next you will need your condition to leave and return to hunting, if you followed directions above prismatic tapers will be the last items bought by ViT and so you can use them as your condition for leaving. for the purpose of this example i carry 5k tapers, your value may vary.

Code: Select all

Recomp-

Item "Prismatic Taper" >= 5000

Return From Call


and last rule to add to this meta is a seconds in state to the recomp function in case you get stuck somewhere along the way

Code: Select all

Recomp-

Seconds in state >= 600

Set Meta State: Recomp
5 x

Dmdtt
Moderator
Posts: 266

Re: Meta Examples, tips and tricks

Post#5 » September 12th, 2016, 5:39 pm

Couple examples for chat message capture more to come over next couple weeks.

Chat Message Capture-

Example One- sending any command to all clients

for my example I will be forcing a /vt meta load to all clients for the meta named CMD

example message Bdf says, "!echo /vt meta load CMD"

Capture pattern, for my example I have it only accept commands by Bdf you can instead add additional names by adding | after each name followed by more names (charOne|CharTwo|charthree) etc, IT IS VERY IMPORTANT TO MAKE THIS COMMAND SPECIFIC TO YOUR CHARACTERS ONLY. don't give this much control over your meta's and other files to other players.

Code: Select all

Condition-
ChatCap (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Bdf)\>.+\<\\Tell\>) (say|says|tells you), \"!echo (?<telltext>.*)\"$

Action-
ExprChat getvar[capturegroup_telltext]

output to other clients /vt meta load CMD


Example Two- adjusting vtank distance setting to any value, value in capturegroup is saved as string so it needs to be converted to number to divide by 240 then converted back to string for the ExprChat

Example Message: Bdf says, "!attackdistance 50"

Code: Select all

Condition-
ChatCap (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Bdf)\>.+\<\\Tell\>) (say|says|tells you), \"!(?<textone>.*) (?<texttwo>.*)\"$

Action-
ExprChat \/vt opt set +getvar[capturegroup_textone]+\ +cstr[(cnumber[getvar[capturegroup_texttwo]]/240)]

output will look like /vt opt set attackdistance .2083333


Example Three- adjusting any true false settings in vtank

Example Message: Bdf says "!enablelooting true"

Code: Select all

Condition-
ChatCap (^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Bdf)\>.+\<\\Tell\>) (say|says|tells you), \"!(?<text>.*)\"$

Action-
ExprChat \/vt opt set +getvar[capturegroup_text]

output /vt opt set enablelooting true


Example Four- item pickup using magtools

Example Message: Bdf says "!pickup Torn Strip of Parchment"

Code: Select all

Condition-
ChatCap (^(\[[A-z]+?\] |).*\<Tell:IIDString:.+:(Bdf)\>.+\<\\Tell\>) (say|says|tells you), \"!pickup (?<text>.*)\"$

Action-
ExprChat \/mt uselp +getvar[capturegroup_text]

output chat /mt uselp Torn Strip of Parchment


Example Five- Give item to Character

Example Message: Bdf says "!give Burning Coal to Dweia"

Code: Select all

Condition-
ChatCap (^(\[[A-z]+?\] |).*\<Tell:IIDString:.+:(Bdf)\>.+\<\\Tell\>) (say|says|tells you), \"!give (?<textitem>.*) to (?<textchar>.*)\"$

Action-
ExprAct actiontrygiveitem[wobjectfindininventorybynamerx[getvar[capturegroup_textitem]], wobjectfindnearestbynameandobjectclass[24, getvar[capturegroup_textchar]]]
1 x

Dmdtt
Moderator
Posts: 266

Re: Meta Examples, tips and tricks

Post#6 » September 14th, 2016, 10:32 am

posted this in another post. few examples of chat capture regex, let me know in pm if I screwed anything up.

Regex for capturing any char in any chat (this example will not react off your own personal chat) along with their text

Code: Select all

(^(\[[A-z]+?\] |).*\<Tell:IIDString:.+:((?<tellchar>[^\<]*))\>.+\<\\Tell\>) (say|says|tells you), \"(?<text>.*)\"$


regex for capturing any character including yourself in any chat along with their text

Code: Select all

(^(\[[A-z]+?\] |)((?<tellchar>[^\<]*))|.*\<Tell:IIDString:.+:((?<tellchar>[^\<]*))\>.+\<\\Tell\>) (say|says|tells you), \"(?<text>.*)\"$


regex for specific characters in any chat including you(this example will not capture char name) capturing text only

Code: Select all

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


regex for specific channel capturing character name and text will work with your personal character

Code: Select all

^\[ChannelName\] (((?<tellchar>[^\<]*))|.*\<Tell:IIDString:.+:((?<tellchar>[^\<]*))\>.+\<\\Tell\>) (say|says), \"(?<text>.*)\"$
1 x

Return to “VT: Meta Support”

Who is online

Users browsing this forum: No registered users and 2 guests

cron

Login  •  Register