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 .
×

Macro with if statment

Hello. Can someone help me with somthing like: if (/r 1d20 > number) { do something } ?
1468681645

Edited 1475264911
Access to the Roll20 API is available in games in which the Creator has an active Pro subscription. API Scripts (which are written in JavaScript) are able to react to a /roll and perform certain actions. Roll Templates can be coded to include Helper Functions (e.g. rollWasCrit() ), which allow for information to be conditonally displayed in certain circumstances. Some Character Sheets on the dropdown (available to all users) include Roll Templates with Helper Functions, which can be taken advantage of within macros. Otherwise, Pro users can write and implement their own Roll Templates within games that they create. Some other (non-API) solutions for conditional evaluation do exist, some of which I like to call " budget conditional statements ", which are also outlined here .