I'm really green with mixing HTML with macro code. I've got a simple macro that works great:
Code: Select all
[h: visDie = eval("1d12")]
<img src='[r:tblImage("TwelveSide",visDie)]'>
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Code: Select all
[h: visDie = eval("1d12")]
<img src='[r:tblImage("TwelveSide",visDie)]'>
Code: Select all
[H: abort(input("numRolls|1|Number of Rolls|Text"))]
[H: output = ""]
[H: template = '<img src="%{visDie}" />']
[H, c(numRolls), code: {
[H: visDie = tblImage("TwelveSide",1d12)]
[H: output = json.append(output,strformat(template))]
}]
[R: json.toList(output," ")]