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 please. Macro with a message depending on the result ?

Greetings, I'm looking desperately how to create a macro with a message depending on the result.
Here is the macro that I want to create in theory:

I want that when the player rolls 1d100.
If the result is greater than 95, I want the message "Critical failure!" appears in red in the chat after the throw.
If the result is less than 06, I want the message "Particular success!" appears green in the chat after the throw.
For any result between 05 and 96, I want the result to appear normally.

Thanks in advance !
February 29 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

You cant do this in roll20 with a standard macro.  macros cant do conditional effects like "if the roll is 96+, do this thing, if not, don't".

For really simple situations, you can handle this with a Rollable Table. But if you want to do anything with the rolls between 5 and 96, like add a skill bonus or compare against a value, that won't work because the 96_+ and 5- results wont be reporting numbers and will break the macro.

I think the best you can do is use the critical marking system, where if you do something like

/roll 1d100cs>96cf<5

it will show the result as green for 96+, and red if 5-. 

Note: in roll20 dice macros, > means "equal or greater", and < means "less than or equal".

You are my idol!
Thank you so much!