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

Are you able to do a IF statement in a macro?

I simply trying to create a crit chart for my players however, I find the Table in roll 20 isn't able to properly format text or bring big enough pictures for anyone to see to use efficiently in a game.  So i was looking at macros and wondering if i could make something like x = /roll 1d100    IF (X=1 , X=2)     "You cut the arm off"      IF (X=3 ,X=4)     "Triple damage" SO when you hit the macro it produces the text box to let them know how it worked. for example of text i want to put down is something like Or the Text  Damage Type Effect Slashing-Brow slash. Double damage, and the target is blinded until the end of its next turn. Piercing-Pierced ear. Maximum damage. Bludgeoning- Bashed nose. Double damage. Magical- Magical barrage. Maximum damage, and an additional target within range is affected at half potency, or the spell’s area of effect is increased by 5 ft. Or if you guys have a better idea im all ears
Power Cards Find the API Put it in game. Then write the macro.. A lot of work -- but will function for what you want I developed an extensive crit / fumb chart using it Works like a charm Friends wanted it in there games.
1569093580
The Aaron
Roll20 Production Team
API Scripter
Logic is the purview of the API. You'd probably need a custom script for something like this. 
Im curious about this alternative. I use a custom character sheet. Will this break it? And does this use a differentcoding set up to allow for if statements and output? i have never used a API before BilBo 2 said: Power Cards Find the API Put it in game. Then write the macro.. A lot of work -- but will function for what you want I developed an extensive crit / fumb chart using it Works like a charm Friends wanted it in there games.