Page 1 of 5

Vtank Expressions

Posted: January 1st, 2015, 6:25 pm
by HellsWrath
Any information posted here will make its way to the Virindi Wiki
Please post any examples, tips or tricks you come across.

Confirmed properties that work with expressions - http://www.virindi.net/wiki/index.php/M ... Properties
Full list of available expressions - http://www.virindi.net/wiki/index.php/M ... nformation

[Vigeneral] Virindi says, "yeah with the new features people could make metas that didn't work if you started them from the middle...bad idea"
[Vigeneral] Virindi says, "meta writers must keep in mind that someone's client may crash or they may take a break and want to start back up" ...
[Vigeneral] Virindi says, "they must keep that in mind when writing the meta"

Number formatting help: http://msdn.microsoft.com/en-us/library ... 10%29.aspx

"/vt mexec" allows you to test any expression (if you set a variable this way it is the same as using a meta rule)

Re: Vtank Expressions

Posted: January 1st, 2015, 6:43 pm
by Virindi
Some misc language notes:
-true is the same as 1, false is the same as 0. There are no actual booleans, just numbers.
-There are two extra operators added since monster expressions: the ^ (xor) operator, and the ; operator. The ; operator works on any two types and simply returns the value of the first one. It has the lowest possible precedence. The idea is to use it to string together commands when you don't care about the result.
-Unlike monster expressions, meta expressions do not trim spaces from the ends of strings.
-Set variables persist until cleared by a command or until relog.
-Formatting during the conversion of number to string is a string like this: http://msdn.microsoft.com/en-us/library ... .110).aspx
-All operator characters which occur in a string must be escaped with \
-All numbers in a string must also be escaped.

Re: Vtank Expressions

Posted: January 2nd, 2015, 6:33 am
by Sif al Taak
Heritage:

"Unknown", // 0
"Aluvian", // 1
"Gharu'ndim", // 2
"Sho", // 3
"Viamontian", // 4
"Umbraen Shadow", // 5
"Gear Knight", // 6
"Tumerok", // 7
"Lugian", // 8
"Empyrean", // 9
"Penumbraen Shadow", // 10
"Undead", // 11

Admin Edit: Moved majority of constants in to .txt file in attachment.
A full list will be compiled on Vwiki once complete.
Only constants that are seen inside /vt propertydump when you have yourself selected but not ID'd are usable.

http://www.virindi.net/repos/virindi_pu ... nstants.cs
Constants.zip
(2.33 KiB) Downloaded 451 times

Re: Vtank Expressions

Posted: January 2nd, 2015, 9:23 pm
by HellsWrath
Simple killtask counter

Sits in default watching for chat messages that it killed something (very simple "killed drudge", "killed mite", "killed shreth", in this example)

Upon receiving one of the messages it adds +1 to a variable that is set for each task.
Once a variable reaches the limit you define (in this case 10) it stops counting on that variable.

Once all tasks are done it sees the variables are all at their limit and sets the state to Done

To test say "killed drudge" "killed mite" and "killed shreth" in chat 10 times each.

-------

An alternate method of doing this would be to add +1 to a variable upon receiving the task complete message

Create an empty variable for each killtask
  • setvar[taskGrievver, 0]
    setvar[taskShadow, 0]
Add +1 to a killtask variable upon receiving the "task complete" message for that task
  • setvar[taskGrievver, getvar[taskGrievver]+1]
    setvar[taskShadow, getvar[taskShadow]+1]
Use an All:{} containing a check on each variable. Once all variables are +1 it will trigger
  • All:{Expr getvar[taskGrievver]==1, Expr getvar[taskShadow]==1} -- Do something

Re: Vtank Expressions

Posted: January 2nd, 2015, 10:19 pm
by yaroz
hah.. I was typing out something about this earlier, but got interrupted when the baby started crying.

Actually.. I was going to say that you could +1 it on every kill message (up to the number needed), so you could issue a !report (or something similar) to your fellowship, and they would report how many kills of each they have.

Re: Vtank Expressions

Posted: January 2nd, 2015, 10:41 pm
by HellsWrath
That would definitely be an advantage to using the first method. Would be easy to add that.

Re: Vtank Expressions

Posted: January 3rd, 2015, 1:25 am
by HellsWrath
Outline for a basic Mage Duel stat collector - may or may not finish it (regex can suckit)


Create variable for each type of event (dmgTrgt, dmgSelf, critTrgt, critSelf etc)
  • setvar[dmgTrgt, 0]
    setvar[dmgSelf, 0]
    setvar[critTrgt, 0]
    setvar[critSelf, 0]
Increment the variable upon chat message receipt
  • setvar[dmgTrgt, getvar[dmgTrgt]+1]
    setvar[dmgSelf, getvar[dmgSelf]+1]
    setvar[critTrgt, getvar[critTrgt]+1]
    setvar[critSelf, getvar[critSelf]+1]
At end of fight output all stats
  • I landed a crit +cstr[getvar[critTrgt]] +time\(s\)
    I was crit +cstr[getvar[critSelf]] +time\(s\)
    I landed +cstr[getvar[dmgTrgt]] +time\(s\)
    I was hit +cstr[getvar[dmgTrgt]] +time\(s\)

Re: Vtank Expressions

Posted: January 3rd, 2015, 12:45 pm
by yaroz
One of the other advantages of setting variables is you don't have to carry around items (tapers or whatnot).. for instance you can set an isLeader variable for a quest that requires a person to open doors and such.

Re: Vtank Expressions

Posted: January 3rd, 2015, 3:51 pm
by HellsWrath
Tou-Tou Killtask Counter (for manual play)

On and Meta must be running (obv) - turn your vitals to minimum if you don't want tank to auto-heal

When ready to begin set the meta to the ClearVars state - it will clear/set the variables and then move to the Listen state to begin listening for task complete messages.

It will announce to chat each time a task is complete, and again when all are complete.

---

You could elaborate on this and have it count +1 to each variable every time there is a kill rather than task complete, then you can output progress reports.

Re: Vtank Expressions

Posted: January 5th, 2015, 12:15 am
by Reawakener
A couple of xp related expressions...

/vt mexec getcharquadprop[1] = total regular xp
/vt mexec getcharquadprop[2] = unassigned xp
/vt mexec getcharquadprop[6] = total lum xp

And just because I like being able to check progress of my kill tasks...

Grievver\: killed\ +cstr[getvar[taskGrievver]]+\ out of \ +cstr[15]

In game chat:
[VTank] MExec evaluating expression: "Grievver\: killed\ +cstr[getvar[taskGrievver]]+\ out of \ +cstr[15]"
[VTank] Result: Grievver: killed 0 out of 15