Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help]Different dice sets rolldata

1475592497

Edited 1475592537
Hey there, I'm currently working on an API that has to detect the dices rolled during the whole game. For example I can use this: if('R' === r.type && 10 === r.sides && 2 === r.dice && totalRoll >= rolldata.total) { sendChat(msg.who, "/roll 3d10"); } The problem begins when I reach 1d100+1d10 when I reach different faces rolled I want the script to react to this specific set of dices, so I have to go like this: if('R' === r.type && 100 === r.sides && 1 === r.dice && totalRoll >= rolldata.total) { sendChat(msg.who, "/roll 1d100+2d10"); } But then it will not detect the 2nd dice (d10). I looked for a solution a little but I'm getting lost, anyone could help me figure this out?
1475609990
The Aaron
Pro
API Scripter
The format for the Dice is very complicated.  I've been working on a way to simplify parsing it but it's not ready net (It is, in fact, what is holding up the CharMod Unicorn...).   Can you describe in a bit more detail (and less code) what you are trying to accomplish?  Maybe I can give you some pointers...