Skip to content



The If TLO is used to provide inline condition expressions for macros. It is not recommended for use with Lua.

Executes an inline condiition, similar to a ternary expression in other languages.


string If[conditions,whentrue,whenfalse]

Performs Math.Calc on conditions, gives whentrue if non-zero, gives whenfalse if zero.


If I am sitting, stand up. Otherwise, echo "I am not sitting down"

/docommand ${If[${Me.Sitting},/stand,/echo I am not sitting down]}
string If[conditions~whentrue~whenfalse]

Alternate syntax, behaves the same as above but uses the ~ character as a separator instead of a comma.