User:Verisimilar/Sandbox: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Testing roll option template.)
mNo edit summary
Line 1: Line 1:
__NOTOC__
==Highlight Test==
==#categorytree:MapTool|mode=pages==
<source lang="mtmacro" highlight="5" line>
{{#categorytree:MapTool|mode=pages}}
Function outside of the brackets:
==#categorytree:MapTool|mode=categories==
defineFunction()
{{#categorytree:MapTool|mode=categories}}


Function within square brackets:
[assert()]


Function within curly brackets:
{abort(0)}


==Random Tests==
Roll options:
* {{roll|hidden}}
[h: abort(0)]
* {{roll|if}}
[t: abort(0)]
[e,if(0): ]
[macro(): ]
[token(): ]


Numbers:


[h: 1 2 34 567 ]


Symbols:
[h: > = ! & / : ; ]


Strings:
[h: "This is a double quoted string" ]
[h; "This is a single quoted string" ]
</source>





Revision as of 03:38, 17 June 2009

Highlight Test

Function outside of the brackets:
defineFunction()

Function within square brackets:
[assert()]

Function within curly brackets:
{abort(0)}

Roll options:
[h: abort(0)]
[t: abort(0)]
[e,if(0): ]
[macro(): ]
[token(): ]

Numbers:

[h: 1 2 34 567 ]

Symbols:
[h: > = ! & / : ; ]

Strings:
[h: "This is a double quoted string" ]
[h; "This is a single quoted string" ]


prop macros

@onCampaignLoad
[defineFunction("get", "get@this")]

@get
[h: checkProp = json.contains(getPropertyNames('json'), arg(0))]
[h,assert(checkProp, '<b>ERROR:</b> get("'+arg(0)+'") '+
                     '- That property does not exist.', 0)]
[h, macro.return = getProperty(arg(0))]

@onCampaignLoad
[defineFunction("set", "set@this")]

@set
[h: checkProp = json.contains(getPropertyNames('json'), arg(0))]
[h,assert(checkProp, '<b>ERROR:</b> set('+arg(0)+', '+arg(1)+') '+
                     '- That property does not exist.', 0)]
[h: setProperty(arg(0), arg(1))]
[h, macro.return = 1]