Difference between revisions of "Meta Expressions"

From VirindiPlugins
Jump to: navigation, search
m
Line 475: Line 475:
  
 
== Object Properties ==
 
== Object Properties ==
 +
[http://pastebin.com/X05rYnYU Vtank Object Prop Enums]
 +
 +
The following values have been tested with /vt mexec
 +
 
{| class="mw-collapsible mw-collapsed wikitable" style="width:20%"
 
{| class="mw-collapsible mw-collapsed wikitable" style="width:20%"
 
|'''ObjectClass'''
 
|'''ObjectClass'''
Line 664: Line 668:
 
|192
 
|192
 
|-
 
|-
|SocietyRibbonCount(CH)
+
|TitlesEarned
 +
|262
 +
|-
 +
|SocRibbonCount(CH)
 
|287
 
|287
 
|-
 
|-
|SocietyRibbonCount(WEB)
+
|SocRibbonCount(WEB)
 
|288
 
|288
 
|-
 
|-
|SocietyRibbonCount(RB)
+
|SocRibbonCount(RB)
 
|289
 
|289
 
|-
 
|-
|Reinforcement of the Lugians 218
+
|MeleeMastery
 +
|354
 +
|-
 +
|RangedMastery
 +
|355
 +
|-
 +
|SummoningMastery
 +
|362
 +
|-
 +
|'''Augmentations'''
 +
|-
 +
|Reinforcement of the Lugians
 +
|218
 +
|-
 +
|Bleeargh's Fortitude
 +
|219
 +
|-
 +
|Oswald's Enchantment
 +
|220
 +
|-
 +
|Siraluun's Blessing
 +
|221
 +
|-
 +
|Enduring Calm
 +
|222
 +
|-
 +
|Steadfast Will
 +
|223
 +
|-
 +
|Ciandra's Essence
 +
|224
 +
|-
 +
|Yoshi's Essence
 +
|225
 +
|-
 +
|Jibril's Essence
 +
|226
 +
|-
 +
|Celdiseth's Essence
 +
|227
 
|-
 
|-
|Bleeargh's Fortitude 219
+
|Koga's Essence
 +
|228
 
|-
 
|-
|Oswald's Enchantment 220
+
|Shadow of the Seventh Mule
 +
|229
 
|-
 
|-
|Siraluun's Blessing 221
+
|Might of the Seventh Mule
 +
|230
 
|-
 
|-
|Enduring Calm 222
+
|Clutch of the Miser
 +
|231
 
|-
 
|-
|Steadfast Will 223
+
|Enduring Enchantment
 +
|232
 
|-
 
|-
|Ciandra's Fortune 224
+
|Critical Protection
 +
|233
 
|-
 
|-
|Shadow of the Seventh Mule 229
+
|Quick Learner
 +
|234
 
|-
 
|-
|Might of the Seventh Mule 230
+
|Charmed Smith
 +
|236
 
|-
 
|-
|Clutch of the Miser 231
+
|Innate Renewal
 +
|237
 
|-
 
|-
|Enduring Enchantment 232
+
|Archmage's Endurance
 +
|238
 
|-
 
|-
|Critical Protection 233
+
|Enhancement of the Blade Turner
 +
|240
 
|-
 
|-
|Quick Learner 234
+
|Enhancement of the Arrow Turner
 +
|241
 
|-
 
|-
|Charmed Smith 236
+
|Enhancement of the Mace Turner
 +
|242
 
|-
 
|-
|Innate Renewal 237
+
|Caustic Enhancement
 +
|243
 
|-
 
|-
|Archmage's Endurance 238
+
|Fiery Enhancement
 +
|244
 
|-
 
|-
|Enhancement of the Blade Turner 240
+
|Icy Enhancement
 +
|245
 
|-
 
|-
|Enhancement of the Arrow Turner 241
+
|Storm's Enhancement
 +
|246
 
|-
 
|-
|Enhancement of the Mace Turner 242
+
|Infused Creature Magic
 +
|294
 
|-
 
|-
|Caustic Enhancement 243
+
|Infused Item Magic
 +
|295
 
|-
 
|-
|Fiery Enhancement 244
+
|Infused Life Magic
 +
|296
 
|-
 
|-
|Icy Enhancement 245
+
|Infused War Magic
 +
|297
 
|-
 
|-
|Storm's Enhancement 246
+
|Eye of the Remorseless
 +
|298
 
|-
 
|-
|Infused Creature Magic 294
+
|Hand of the Remorseless
 +
|299
 
|-
 
|-
|Infused Item Magic 295
+
|Master of the Steel Circle
 +
|300
 
|-
 
|-
|Infused Life Magic 296
+
|Master of the Focused Eye
 +
|301
 
|-
 
|-
|Infused War Magic 297
+
|Master of the Five Fold Path
 +
|302
 
|-
 
|-
|Eye of the Remorseless 298
+
|Frenzy of the Slayer
 +
|309
 
|-
 
|-
|Hand of the Remorseless 299
+
|Iron Skin of the Invincible
 +
|310
 
|-
 
|-
|Master of the Steel Circle 300
+
|Jack of All Trades
 +
|326
 
|-
 
|-
|Master of the Focused Eye 301
+
|Infused Void Magic
 +
|328
 
|-
 
|-
|Master of the Five Fold Path 302
+
|InfusedVoid
 +
|328
 +
|-
 +
|'''Luminance/Ratings'''
 +
|
 
|-
 
|-
|Frenzy of the Slayer 309
+
|AuraValor
 +
|333
 
|-
 
|-
|Iron Skin of the Invincible 310
+
|AuraProtection
 +
|334
 
|-
 
|-
|Jack of All Trades 326
+
|AuraGlory
 +
|335
 
|-
 
|-
|Infused Void Magic 328
+
|AuraTemperance
 +
|336
 
|-
 
|-
|InfusedVoid 328
+
|AuraAetheria
 +
|338
 
|-
 
|-
|AuraValor 333
+
|AuraManaFlow
 +
|339
 
|-
 
|-
|AuraManaFlow 339
+
|AuraPurity
 +
|342
 
|-
 
|-
|AuraPurity 342
+
|AuraCraftsman
 +
|343
 
|-
 
|-
|AuraCraftsman 343
+
|AuraSpecialization
 +
|344
 
|-
 
|-
|AuraSpecialization 344
+
|AuraWorld
 +
|365
 
|-
 
|-
|MeleeMastery 354
+
|HealBoost Rating(armor/jewelry)
 +
|376
 
|-
 
|-
|RangedMastery 355
+
|Vitality Rating(armor/jewelry)
 +
|379
 
|-
 
|-
|SummoningMastery 362
+
|Total DmgRating
 +
|307
 
|-
 
|-
|AuraWorld 365
+
|Total DmgResist
 +
|308
 
|-
 
|-
|Heal Boost Rating 376
+
|Total CritDmg
 +
|314
 
|-
 
|-
|Vitality Rating379
+
|Total CritDmgResist
 +
|316
 
|-
 
|-
|Total DmgRating 307
+
|Total DmgResist from Lum (nali + seer)
 +
|334
 
|-
 
|-
|Total DmgResist 308
+
|Total CritDmgResist from Lum (nali + seer)
 +
|336
 
|}
 
|}
 +
 +
{| class="mw-collapsible mw-collapsed wikitable" style="width:20%"
 +
|'''getcharquadprop'''
 +
|
 +
|-
 +
|TotalExperience
 +
|1
 +
|-
 +
|UnassignedExperience
 +
|2
 +
|-
 +
|LuminancePointsCurrent
 +
|6
 +
|}
 +
 +
{| class="mw-collapsible mw-collapsed wikitable" style="width:20%"
 +
|'''getcharstringprop'''
 +
|
 +
|-
 +
|Name
 +
|1
 +
|-
 +
|Title
 +
|5
 +
|-
 +
|FellowshipName
 +
|10
 +
|-
 +
|MonarchName
 +
|21
 +
|-
 +
|Patron
 +
|35
 +
|-
 +
|DateBorn
 +
|43
 +
|-
 +
|MonarchyDescription
 +
|47
 +
|}
 +
 +
  
 
== Examples ==
 
== Examples ==

Revision as of 20:40, 20 May 2015

These expressions can set and retrieve variables, control chat output, and more.

This adds the "Expression" meta condition and the "Expression Action" and "Chat Expression" meta actions.

The "/vt mexec [expression]" command is used for testing these expressions

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/kfsatb94%28v=vs.110%29.aspx
  • All operator characters which occur in a string must be escaped with \
  • All numbers in a string must also be escaped.


Function Information

Expand to view details and available examples.

There are currently 48 meta functions.


[Expand]

testvar[1]

[Expand]

getvar[1]

[Expand]

setvar[2]

[Expand]

touchvar[1]

[Expand]

clearallvars[]

[Expand]

clearvar[1]

[Expand]

getcharintprop[1]

[Expand]

getchardoubleprop[1]

[Expand]

getcharquadprop[1]

[Expand]

getcharboolprop[1]

[Expand]

getcharstringprop[1]

[Expand]

getplayerlandcell[0]

[Expand]

getplayercoordinates[0]

[Expand]

coordinategetns[1]

[Expand]

coordinategetwe[1]

[Expand]

coordinategetz[1]

[Expand]

coordinatetostring[1]

[Expand]

coordinateparse[1]

[Expand]

coordinatedistancewithz[2]

[Expand]

coordinatedistanceflat[2]

[Expand]

wobjectgetphysicscoordinates[1]

[Expand]

wobjectgetname[1]

[Expand]

wobjectgetobjectclass[1]

[Expand]

wobjectgettemplatetype[1]

[Expand]

wobjectgetisdooropen[1]

[Expand]

wobjectfindnearestmonster[0]

[Expand]

wobjectfindnearestdoor[0]

[Expand]

wobjectfindnearestbyobjectclass[1]

[Expand]

wobjectfindininventorybytemplatetype[1]

[Expand]

wobjectfindininventorybyname[1]

[Expand]

wobjectfindininventorybynamerx[1]

[Expand]

wobjectgetselection[0]

[Expand]

wobjectgetplayer[0]

[Expand]

actiontryselect[1]

[Expand]

actiontryuseitem[1]

[Expand]

actiontryapplyitem[2]

[Expand]

isfalse[1]

[Expand]

istrue[1]

[Expand]

iif[3]

[Expand]

randint[2]

[Expand]

cstr[1]

[Expand]

strlen[1]

[Expand]

getobjectinternaltype[1]

[Expand]

cstrf[2]

[Expand]

stopwatchcreate[0]

[Expand]

stopwatchstart[1]

[Expand]

stopwatchstop[1]

[Expand]

stopwatchelapsedseconds[1]


Object Properties

Vtank Object Prop Enums

The following values have been tested with /vt mexec

ObjectClass [Expand]
Unknown 0
MeleeWeapon 1
Armor 2
Clothing 3
Jewelry 4
Monster 5
Food 6
Money 7
Misc 8
MissileWeapon 9
Container 10
Gem 11
SpellComponent 12
Key 13
Portal 14
TradeNote 15
ManaStone 16
Plant 17
BaseCooking 18
BaseAlchemy 19
BaseFletching 20
CraftedCooking 21
CraftedAlchemy 22
CraftedFletching 23
Player 24
Vendor 25
Door 26
Corpse 27
Lifestone 28
HealingKit 29
Lockpick 30
WandStaffOrb 31
Bundle 32
Book 33
Journal 34
Sign 35
Housing 36
Npc 37
Foci 38
Salvage 39
Ust 40
Services 41
Scroll 42
CombatPet 43
NumObjectClasses 44
getcharintprop [Expand]
Species 2
ContainerSlots 7
BurdenUnits 5
TotalValue(pyreal) 20
SkillCreditsAvail 24
Level 25
Rank 30
Deaths 43
DateOfBirth(unix) 98
Gender 11
Age(seconds) 125
XPForVPReduction 129
ChessRank 181
Heritage 188
FishingSkill 192
TitlesEarned 262
SocRibbonCount(CH) 287
SocRibbonCount(WEB) 288
SocRibbonCount(RB) 289
MeleeMastery 354
RangedMastery 355
SummoningMastery 362
Augmentations
Reinforcement of the Lugians 218
Bleeargh's Fortitude 219
Oswald's Enchantment 220
Siraluun's Blessing 221
Enduring Calm 222
Steadfast Will 223
Ciandra's Essence 224
Yoshi's Essence 225
Jibril's Essence 226
Celdiseth's Essence 227
Koga's Essence 228
Shadow of the Seventh Mule 229
Might of the Seventh Mule 230
Clutch of the Miser 231
Enduring Enchantment 232
Critical Protection 233
Quick Learner 234
Charmed Smith 236
Innate Renewal 237
Archmage's Endurance 238
Enhancement of the Blade Turner 240
Enhancement of the Arrow Turner 241
Enhancement of the Mace Turner 242
Caustic Enhancement 243
Fiery Enhancement 244
Icy Enhancement 245
Storm's Enhancement 246
Infused Creature Magic 294
Infused Item Magic 295
Infused Life Magic 296
Infused War Magic 297
Eye of the Remorseless 298
Hand of the Remorseless 299
Master of the Steel Circle 300
Master of the Focused Eye 301
Master of the Five Fold Path 302
Frenzy of the Slayer 309
Iron Skin of the Invincible 310
Jack of All Trades 326
Infused Void Magic 328
InfusedVoid 328
Luminance/Ratings
AuraValor 333
AuraProtection 334
AuraGlory 335
AuraTemperance 336
AuraAetheria 338
AuraManaFlow 339
AuraPurity 342
AuraCraftsman 343
AuraSpecialization 344
AuraWorld 365
HealBoost Rating(armor/jewelry) 376
Vitality Rating(armor/jewelry) 379
Total DmgRating 307
Total DmgResist 308
Total CritDmg 314
Total CritDmgResist 316
Total DmgResist from Lum (nali + seer) 334
Total CritDmgResist from Lum (nali + seer) 336
getcharquadprop [Expand]
TotalExperience 1
UnassignedExperience 2
LuminancePointsCurrent 6
getcharstringprop [Expand]
Name 1
Title 5
FellowshipName 10
MonarchName 21
Patron 35
DateBorn 43
MonarchyDescription 47


Examples

Test for proximity to any portal.

coordinatedistancewithz[wobjectgetphysicscoordinates[wobjectfindnearestbyobjectclass[14]],getplayercoordinates[]]<5

Use closest portal.

actiontryuseitem[wobjectfindnearestbyobjectclass[14]]

Check if you have any Aged or Durable Legendary Keys in your inventory.

getobjectinternaltype[wobjectfindininventorybynamerx[\^\(Aged\|Durable\) Legendary Key\$]]==7

Check if there is any object currently selected.

getobjectinternaltype[wobjectgetselection[]]==7

Save the selected items name in a variable.

setvar[keyName,wobjectgetname[wobjectgetselection[]]]