User:Verisimilar/Sandbox: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
mNo edit summary
m (Testing roll option template.)
Line 7: Line 7:




 
==Random Tests==
* {{roll|hidden}}
* {{roll|if}}





Revision as of 01:11, 5 April 2009

#categorytree:MapTool|mode=pages

#categorytree:MapTool|mode=categories


Random Tests




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]