Also, for those who dont want a million buttons you can use this instead:
Code:
<script type="text/javascript">
function dropDownDice(obj){
if(obj.value != ''){
var data = obj.value;
var indx = data.indexOf(';');
var diceToRoll = data.substr(0,indx);
var faces = data.substr(indx+1);
document.getElementById('{$editorid}_textarea').value += '[dice='+diceToRoll+']'+faces+'[/dice]';
}
}
</script>
<td><select onChange="dropDownDice(this);">
<option></option>
<option value="1;6">1d6</option>
<option value="2;6">2d6</option>
<option value="3;6">3d6</option>
<option value="4;6">4d6</option>
<option value="5;6">5d6</option>
<option value="6;6">6d6</option>
</select></td>
Place it where you would place the other ones, just above the:
Code:
<if condition="!is_browser('opera')">
Should help with those who dont want to clutter there editor.
NOTE: These do not work if you have WYSIWIG turned on.
To add a new dice just add:
Code:
<option value="Number of dice to roll;Number of faces">Descriptor</option>