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

Need help with macro using IF command and ?{xxx|x}

Hi, I want to make a macro making automatically another roll if the roll (so before the modifiers are added) is above a certain value. /roll d100 + ?{Attack|0} - ?{Defence|0} This is the macro as we use it now. What I would like it to be is: /roll d100 { IF > 95 + /roll d100 } + ?{Attack|0} - ?{Defence|0} Meaning each time I roll 96 or more it will roll again and add this to the original roll until I roll 95 or lower (adding that roll as well) and then it should add the modifiers. I've been messing around but can't seem to figure it out :-(
1483726320
The Aaron
Pro
API Scripter
There isn't a way to do if checks in a macro.  However, I think you could use  exploding dice for your situation: /roll d100!>96 + ?{Attack|0} - ?{Defence|0} Note : In dice syntax, > means "greater than or equal to" for historical reasons. The only issue with this is that if the second roll is again 96 or greater, it will roll a third time and add it.
You cannot do if statements inside of macros unfortunately. However, you could accomplish this by using  Exploding Dice using the following formula  /roll d100!>96 + ?{Attack|0} - ?{Defense|0} The ! tells the roller that it will reroll and add to the total is the value rolled is >= 96 (your >95, in roll20 it assumes > is meant as >= and < is <=)
yeah that's exactly what I need :D Thanks!