What do YOU need explained

Discussion on a variety of topics. Ask general Vtank questions here.
yaroz
Moderator
Posts: 129

Post #51 »

Heartless, what are you trying to do? Is it get all of your guys to cast primary or secondary portal recall at once, or get one specific character to cast their primary or secondary portal depending on the command?

If it's the later; you could check for the chat, and do an expression condition to check to see if the toons name is so and so.. like

Code: Select all

All: {
Chat: ^\[Fellowship\] (|).* (say|says), \"!summon ab\"$
Expression: getcharstringprop[1]=="My Toon Name"
}

Action:
Load Nav : <-- have a nav that casts summon primary or secondary portal
Or something like that.

Heartless
Posts: 17

Post #52 »

yes looking for 1 chr at a time to cast. that looks great thank you for your help.

bradacc
Posts: 128

Post #53 »

yaroz wrote:If it's the later; you could check for the chat, and do an expression condition to check to see if the toons name is so and so.. like

Code: Select all

All: {
Chat: ^\[Fellowship\] (|).* (say|says), \"!summon ab\"$
Expression: getcharstringprop[1]=="My Toon Name"
}

Action:
Load Nav : <-- have a nav that casts summon primary or secondary portal
Or something like that.
Am I understanding this right? The way I see it is anyone in fellowship could say:

"/f My Toon Name !summon ab" or
"/f !summon ab My Toon Name"

at which point My Toon Name would load a nav that does whatever is required.

Heartless
Posts: 17

Post #54 »

bradacc that sounds right the way i use it is !nameprimary or !namesecondary buy what every your command is it loads the route for named chr

User avatar
Immortalbob
Site Admin
Posts: 676
Contact:

Post #55 »

bradacc wrote:
yaroz wrote:If it's the later; you could check for the chat, and do an expression condition to check to see if the toons name is so and so.. like

Code: Select all

All: {
Chat: ^\[Fellowship\] (|).* (say|says), \"!summon ab\"$
Expression: getcharstringprop[1]=="My Toon Name"
}

Action:
Load Nav : <-- have a nav that casts summon primary or secondary portal
Or something like that.
Am I understanding this right? The way I see it is anyone in fellowship could say:

"/f My Toon Name !summon ab" or
"/f !summon ab My Toon Name"

at which point My Toon Name would load a nav that does whatever is required.
no, you are misunderstanding. The requirements to cast the spell are if they get the right chat message, AND if getcharstringprop[1]==charname matches the toon that has that summon. This would be done under an "All". Re-read Yaroz's response.

so you'd /f !summonAB

all toons receive chat command, but the toon that matches the name match will summon. The rest will ignore it.
Immortalbob of MT

Oba1
Posts: 12

Post #56 »

On the stickied tips and tricks post, Dmdtt has a section about using a single recomp meta that will return to whatever meta it was loaded from. I finally got my head around how and why it would work, but the chat commands (his examples pasted below) cause an error in vtank for me. The error occurs whether I type them manually in the chat bar or whether executed within the test metas I set up.
Default2 Item "Prismatic Taper" <= 50 All: {Chat Command: /vt meta load RecompMeta, Call: recomp, return to ReturnHunting}
ReturnHunting Always All: {Chat Command: /vt meta load Hunting, Set Meta State: dead}
Both trying to set a call/return and trying to set the meta state using this syntax causes an error. What am I missing?

User avatar
Immortalbob
Site Admin
Posts: 676
Contact:

Post #57 »

did you create the states described in the chat commands?
Immortalbob of MT

yaroz
Moderator
Posts: 129

Post #58 »

I do this a little different. When I call another meta.. I set a varReturnToMacro and varReturnToState, then I use a ReturnToMeta state and do what DMDTT does, but in my ReturnToMeta I have All{ expchat:/vt meta load getvar[varReturnToMacro] and expchat: /vt setmetastate getvar[ReturnToState]}.. that way I can do it from any state.

I'm just recalling this from home, where I don't have access to my metas..

Oba1
Posts: 12

Post #59 »

While typing my response I realized that I had misread the code I quoted in my initial question. I looked over the fact that chat command, call and return to were bracketed within an all. I thought it was a syntax for a single chat command (hence the error.)

When trying to figure out how to do this in previous metas I always got stuck on the idea that if I issued commands after a /vt meta load, the subsequent commands would get lost because the first command would switch the meta and we would never reach the following commands. But testing it again (with proper syntax) it works! What a treat!

So am I right then that with an All: {} vtank bundles those commands together and executes them in order instead of running the first and then the second and then the third, etc. (does that make sense?)

User avatar
Immortalbob
Site Admin
Posts: 676
Contact:

Post #60 »

Oba1 wrote:While typing my response I realized that I had misread the code I quoted in my initial question. I looked over the fact that chat command, call and return to were bracketed within an all. I thought it was a syntax for a single chat command (hence the error.)

When trying to figure out how to do this in previous metas I always got stuck on the idea that if I issued commands after a /vt meta load, the subsequent commands would get lost because the first command would switch the meta and we would never reach the following commands. But testing it again (with proper syntax) it works! What a treat!

So am I right then that with an All: {} vtank bundles those commands together and executes them in order instead of running the first and then the second and then the third, etc. (does that make sense?)
you got it!
Immortalbob of MT