User:Verisimilar/Sandbox

From RPTools Wiki
Revision as of 01:11, 5 April 2009 by Verisimilar (talk | contribs) (Testing roll option template.)
Jump to navigation Jump to search

#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]