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

Parse roll string into roll value

In the API if I have a string such as "1d20+2", how can I get it to perform the roll and get the value back? What about if I have "1d20 + @{npc_dexterity_mod}"? Thanks for any help, Andrew
<a href="https://wiki.roll20.net/API:Chat" rel="nofollow">https://wiki.roll20.net/API:Chat</a> sendChat(&lt;as&gt;,&lt;content&gt;,function(msg) { ... }) treat msg just as a normal chat message though it'll be sent by 'API' but it can contain inlinerolls and other things.
Thank You Ken!