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

Trying to write a macro with basic logic , is this even possible to do?

My GM is using a custom system. we roll a 1d100 and try to roll under a target stat. If we hit we then roll again against a critical stat to see if we crit. If this was php i'd have it in a heartbeat. All i'm trying to  do is something like this:  /me attaks  If { (1d100 <= $SuccessStat)   "and hits";    If { (1d100 <= $CritStat) " critically"; } } else {  " and misses" }  again is this even possible? 
1475541919
Lithl
Pro
Sheet Author
API Scripter
Not directly, although a custom roll template (which would require a custom sheet, which would require the campaign creator has a Pro account) could get something like that. Without the custom stuff, you're left with simply displaying the crit confirm roll every time, or having a separate macro for it to only roll when you hit. Also, that's not valid PHP. =P
I know it's not, I haven't written in ages. I was just trying to get the general gist across.  Thanks for responding and saving me a lot more time trying. 
1475550298

Edited 1475550382
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You could combine success fail rolls and critical success to at least have it tell you success/failure/critical success in one macro. 1d100cs&lt;critTarg&lt;hitTarget* *The order is very important here Should highlight the roll in green for successfully rolling under the critical stat, be normal yellow for a regular hit/miss and will display 0 or 1 for a hit or a miss respectively. Could fudge the critical damage logic via an ability command button to call damage macros according to what type of hit. Ability command buttons:&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_But" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_But</a>... The dice reference:&nbsp; <a href="https://wiki.roll20.net/Dice_Reference" rel="nofollow">https://wiki.roll20.net/Dice_Reference</a>