Bob!RynthidZerzelikyrAyanAerlintheNeftetgearknightsdarkisleSanctuary

Vtank Expressions

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

Re: Vtank Expressions

Post#31 » February 20th, 2015, 7:37 pm

is there a way to detect if a character has vitea with vtank? trying to refine my DT meta's and being able to tell how much VP I have would be quite useful.
1 x

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#32 » February 22nd, 2015, 6:14 pm

Last night had the idea of adding a readout at the end of each room in Colosseum for the time remaining, I have to say im quite pleased with the result.

basic idea is this start with a stopwatch when the run begins

Code: Select all

ExprAct setvar[StopwatchSecond, stopwatchcreate[]];stopwatchstart[getvar[StopwatchSecond]]


throughout the run in default states 5,7,9 whenever

Code: Select all

Expr stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]>=60
ExprAct setvar[Counter, getvar[Counter]+60]


this will allow you to get the remaining seconds with 60-StopwatchSecond-Counter

then in default3 you will want something similar to defaut 5,7,9 except it will also set state back to default3 incase you need to do it again before the readout

Code: Select all

Expr stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]>=60
All: {Expr setvar[Counter, getvar[Counter]+60], Set Meta State: Default3}


then when you see the door message ^A Door appears or ^Congratulations! you use this for the readout, you may want to limit this action to your leader only using inventory item count.

Code: Select all

ExprChat \/f\ Time\ Remaining\ +cstrf[59-stopwatchelapsedseconds[getvar[StopwatchSecond]]/60, \F\0]+m\ +cstrf[60-(stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]), \F\0]+s


the result will be something like this [Fellowship] You say, "Time Remaining 51m 30s"
1 x

yaroz
Moderator
Posts: 129

Re: Vtank Expressions

Post#33 » February 22nd, 2015, 8:46 pm

Great.. I was gonna suggest this.
1 x

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#34 » February 23rd, 2015, 4:21 pm

just a friendly warning, if you copy/paste a meta expression from this forum that is fairly long for example

ExprChat \/f\ Time\ Remaining\ +cstrf[60-stopwatchelapsedseconds[getvar[StopwatchSecond]]/60, \F\0]+m\ +cstrf[60-(stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]), \F\0]+s

make sure to paste it first into the AC chat first then copy again before you post it into the meta. For some reason if you do not it will cause an error with the metas format and be unloadable until you go into the meta using notepad and remove it.
1 x

User avatar
Immortalbob
Site Admin
Posts: 577
Contact:

Re: Vtank Expressions

Post#35 » February 26th, 2015, 1:35 pm

Dmdtt wrote:just a friendly warning, if you copy/paste a meta expression from this forum that is fairly long for example

ExprChat \/f\ Time\ Remaining\ +cstrf[60-stopwatchelapsedseconds[getvar[StopwatchSecond]]/60, \F\0]+m\ +cstrf[60-(stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]), \F\0]+s

make sure to paste it first into the AC chat first then copy again before you post it into the meta. For some reason if you do not it will cause an error with the metas format and be unloadable until you go into the meta using notepad and remove it.


have you tried using the code tag?

Code: Select all

ExprChat \/f\ Time\ Remaining\ +cstrf[60-stopwatchelapsedseconds[getvar[StopwatchSecond]]/60, \F\0]+m\ +cstrf[60-(stopwatchelapsedseconds[getvar[StopwatchSecond]]-getvar[Counter]), \F\0]+s
1 x
Immortalbob of MT

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#36 » February 26th, 2015, 2:34 pm

I'll give it a try later if it works I will go back and make the proper edits.

Edit: works perfectly thanks for the suggestion bob!
1 x

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#37 » March 8th, 2015, 5:35 pm

Worked out something rather useful a few nights ago finally got it working properly so I figured id share. Goal was to set my macros to interrupt their hunting whenever killtasks were available. I started this timer by talking to the first killtask npc at hoshino, when I am on a timer I will get a readout like You may complete this quest again in 15h 38m 1s. now I would have to have 1 rule for each potential hour for the killtasks in question, for most npcs this is will be 20 rules that look something like this.

Code: Select all

KilltaskCheck -

Chat Message: ^You may complete this quest again in 15h

All: {ExprAct setvar[KilltaskCounter, (16*3600)], ExprAct setvar[StopwatchKilltask, stopwatchcreate[]];stopwatchstart[getvar[Stopwatchkilltask]]}


then in my default2 state I setup a rule which reacts to when enough time has elapsed to set me to return and retrieve the killtasks.

Code: Select all

 Default2-
 
 stopwatchelapsedseconds[getvar[StopwatchKilltask]]>=getvar[KilltaskCounter]
 
 All: {ExprAct clearallvars[], Set Meta State: Killtask}
1 x

User avatar
Sif al Taak
Posts: 19

Re: Vtank Expressions

Post#38 » March 21st, 2015, 4:26 pm

Example for detecting Society:

CheckSociety.met
(839 Bytes) Downloaded 117 times
1 x

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#39 » April 14th, 2015, 6:14 pm

hitting a wall with an idea of mine,

trying to store multiple coordinate points with different names using a counter then attempting to react using an expression for every coordinate point stored.

storing the variables was the easy part

initial setup- setvar[coord, coord];setvar[Counter, 1]


ExprAct setvar[getvar[coord]+cstr[getvar[Counter]], getplayercoordinates[]];setvar[Counter, getvar[Counter]+1]

that part works flawlessly

the part I am struggling with is making an expression condition that will react to being in any of the stored coordinate point locations.

so far this is what I am thinking
coordinatetostring[getvar[getvar[coord]+cstr[getvar[Counter]]]]==coordinatetostring[getplayercoordinates[]]

the problem is I need a way to react to every getvar[Counter] 1-99 etc sort of like how you would use .* in regex searches using VGI but I can't figure out how to do it.

anyone got any ideas?
1 x

Dmdtt
Moderator
Posts: 266

Re: Vtank Expressions

Post#40 » April 15th, 2015, 1:01 pm

Dmdtt wrote:hitting a wall with an idea of mine,

trying to store multiple coordinate points with different names using a counter then attempting to react using an expression for every coordinate point stored.

storing the variables was the easy part

initial setup- setvar[coord, coord];setvar[Counter, 1]


ExprAct setvar[getvar[coord]+cstr[getvar[Counter]], getplayercoordinates[]];setvar[Counter, getvar[Counter]+1]

that part works flawlessly

the part I am struggling with is making an expression condition that will react to being in any of the stored coordinate point locations.

so far this is what I am thinking
coordinatetostring[getvar[getvar[coord]+cstr[getvar[Counter]]]]==coordinatetostring[getplayercoordinates[]]

the problem is I need a way to react to every getvar[Counter] 1-99 etc sort of like how you would use .* in regex searches using VGI but I can't figure out how to do it.

anyone got any ideas?



so I figured out a potential solution to my earlier idea it isn't exactly what id call perfect but it does function

using the expression,

coordinatetostring[getvar[getvar[coord]+cstr[randint[1, getvar[Counter]]]]]==coordinatetostring[getplayercoordinates[]]

randint[2] will constantly loot for different stored variables for coord1, coord2, coord3 etc between 1-getvar[Counter] however high that is. if I were to split this into sections 1-10 11-20 21-30 etc I think I can also cut down the time it takes to react to being in one of the stored locations.

another option I found would be using cstrf[stopwatchelapsedseconds[getvar[Stopwatch]]*10, \F\0] in place of radint[2] then whenever stopwatchelapsedseconds[getvar[Stopwatch]]==10 restart the stopwatch
1 x

Return to “VT: Meta Support”

Who is online

Users browsing this forum: No registered users and 1 guest

Login  •  Register