Difference between revisions of "Meta Expressions"
(Created page with "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" m...") |
|||
Line 8: | Line 8: | ||
Expand to view details and available examples. | Expand to view details and available examples. | ||
+ | |||
+ | There are currently 47 meta functions. | ||
Revision as of 02:27, 5 January 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
Meta Functions
Expand to view details and available examples.
There are currently 47 meta functions.
testvar[1]
Parameter count: 1
Param 0 (String): The variable name to test
Example: testvar[variableName]getvar[1]
Parameter count: 1
Param 0 (String): The variable name to get
Example: getvar[exampleVar]setvar[2]
Parameter count: 2
Param 0 (String): The variable name to set
Example: variables can be strings or integers
setvar[exampleVar, variable]
setvar[exampleVar, 1]touchvar[1]
Parameter count: 1
Param 0 (String): The variable name to touch
Example: touchvar[exampleVar]clearallvars[]
Parameter count: 0
clearvar[1]
Parameter count: 1
Param 0 (String): The variable name to clear
Example: clearvar[exampleVar]getcharintprop[1]
Parameter count: 1
Param 0 (Number): IntValueKey property id.getchardoubleprop[1]
Parameter count: 1
Param 0 (Number): DoubleValueKey property id.getcharquadprop[1]
Parameter count: 1
Param 0 (Number): QuadValueKey property idgetcharboolprop[1]
Parameter count: 1
Param 0 (Number): BoolValueKey property idgetcharstringprop[1]
Parameter count: 1
Param 0 (Number): StringValueKey property id.getplayerlandcell[0]
Parameter count: 0
getplayercoordinates[0]
Parameter count: 0
coordinategetns[1]
Parameter count: 1
Param 0 (Coordinates): The coordinates object.coordinategetwe[1]
Parameter count: 1
Param 0 (Coordinates): The coordinates object.coordinategetz[1]
Parameter count: 1
Param 0 (Coordinates): The coordinates object.coordinatetostring[1]
Parameter count: 1
Param 0 (Coordinates): The coordinates object.coordinateparse[1]
Parameter count: 1
Param 0 (String): The coordinates string.coordinatedistancewithz[2]
Parameter count: 2
Param 0 (Coordinates): The first coordinates object.
Param 1 (Coordinates): The second coordinates object.coordinatedistanceflat[2]
Parameter count: 2
Param 0 (Coordinates): The first coordinates object.
Param 1 (Coordinates): The second coordinates object.wobjectgetphysicscoordinates[1]
Parameter count: 1
Param 0 (WorldObject): The world object to examine.wobjectgetname[1]
Parameter count: 1
Param 0 (WorldObject): The world object to examine.wobjectgetobjectclass[1]
Parameter count: 1
Param 0 (WorldObject): The world object to examine.wobjectgettemplatetype[1]
Parameter count: 1
Param 0 (WorldObject): The world object to examine.wobjectgetisdooropen[1]
Parameter count: 1
Param 0 (WorldObject): The door world object to examine.wobjectfindnearestmonster[0]
Parameter count: 0
wobjectfindnearestdoor[0]
Parameter count: 0
wobjectfindnearestbyobjectclass[1]
Parameter count: 1
Param 0 (Number): The objectclass number to look for.wobjectfindininventorybytemplatetype[1]
Parameter count: 1
Param 0 (Number): The template type number to look for.wobjectfindininventorybyname[1]
Parameter count: 1
Param 0 (String): The item name to look for.wobjectgetselection[0]
Parameter count: 0
wobjectgetplayer[0]
Parameter count: 0
actiontryselect[1]
Parameter count: 1
Param 0 (WorldObject): The world object to attempt to select.actiontryuseitem[1]
Parameter count: 1
Param 0 (WorldObject): The world object to attempt to use.actiontryapplyitem[1]
Parameter count: 1
Param 0 (WorldObject): The world object to use first.
Param 1 (WorldObject): The world object to be used on.isfalse[1]
Parameter count: 1
Param 0 (Any): The object to examineistrue[1]
Parameter count: 1
Param 0 (Any): The object to examineiif[3]
Parameter count: 3
Param 0 (Any): The object to examine
Param 1 (Any): What to return if the first parameter is true.
Param 2 (Any): What to return if the first parameter is not truerandint[2]
Parameter count: 2
Param 0 (Number): Minimum
Param 1 (Number): Maximumcstr[1]
Parameter count: 1
Param 0 (Number): The number to convertstrlen[1]
Parameter count: 1
Param 0 (String): The string to examinegetobjectinternaltype[1]
Parameter count: 1
Param 0 (Any): The object to examinecstrf[2]
Parameter count: 2
Param 0 (Number): The number to convert
Param 1 (String): The format string to use. See: http://msdn.microsoft.com/en-us/library/kfsatb94.aspxstopwatchcreate[0]
Parameter count: 0
stopwatchstart[1]
Parameter count: 1
Param 0 (Stopwatch): The stopwatch to startstopwatchstop[1]
Parameter count: 1
Param 0 (Stopwatch): The stopwatch to stopstopwatchelapsedseconds[1]
Parameter count: 1
Param 0 (Stopwatch): The stopwatch to query