| FOTO | AUTO | EDV | AUDIO |

Ein Ability-Macro am Beispiel Strength


[h: Name = "Strength"]	<!-- Name, shown in the Frame -->
[h: Ability = Strength]	<!-- Value of this Ability (see Token Poperties) -->
[h: Desc = ""]		<!-- Description, if desired -->
[h: Bonus = StrBonus]	<!-- Bonus of this Ability (see Token Poperties) -->
[h: FrameColor = "aqua"]	<!-- Frame Color -->
[h: CheckDieceNumber = 1]	<!-- The amount of dice -->
[h: CheckDieceSide = 20]	<!-- Which dice -->
[h: GoodOrBad = 11]	<!-- The line between good and bad -->
[h: BadComment = ""]	<!-- A comment if it went badly -->
[h: WellComment = ""]	<!-- A comment if it went well -->

		<!-- Write the output in an html table -->
<table style="width:100%;">
		<!-- Display the frame with the  name -->
	<tr style="background-color:[r: FrameColor]">
	  <td>
	    <span style="color:blue"><b>[r: Name]</b> <b>  Check</b><b> • My [r: Name] is [r: Ability]</b>
	  </td>
	</tr>
	
		<!-- Display the description -->
	  [r: Desc]

		<!-- Calculate the check roll -->
	[h: CheckResult = eval(CheckDieceNumber + "d" + CheckDieceSide)]

		<!-- Display the check roll -->
	[if(CheckResult < GoodOrBad), code:
{
	<tr>
	  <td>
	    <b>Result = [r: CheckResult+Bonus]  </b> &nbsp; &nbsp; &nbsp; &nbsp;
	    ([r: CheckDieceNumber]d[r: CheckDieceSide]+Bonus = [r: CheckResult]+[r: Bonus]) <tr>
	    [r: BadComment]
	   </td>
	</tr>
};
{
	<tr>
	  <td>
	    <b>Result = [r: CheckResult+Bonus]  </b> &nbsp; &nbsp; &nbsp; &nbsp;
	    ([r: CheckDieceNumber]d[r: CheckDieceSide]+Bonus = [r: CheckResult]+[r: Bonus]) <tr>
	    [r: WellComment]
	  </td>
	</tr>
}]
</table>