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

Macro with Varying Messages

1752157045

Edited 1752159337
I want to create a macro that rolls a d4 to the GM, but also, based on the number rolled, it also sends a message. If a "1" is rolled, it sends a message to the GM that says, "1: Rogue" If a "2"    is rolled, it sends a message to the GM that says, "2: Sorcerer" If a "3" is rolled, it sends a message to the GM that says, "3: Barbarian" If a "4"    is rolled, it sends a message to the GM that says, "4: Monk" Ideally, it wouldn't send the numbers and it would just send the message "Rogue", "Sorcerer".... I know this can be done using API Scripts, but his isn't my campaign and he isn't into using scripts, so I was hoping to build a macro that does this.  I don't know if this is even possible, but I would love some help if it is. Thank you!
1752158008
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can do this with a rollable table. You'll need to ask your GM to make the table and give you access to it, but then you just roll on the table: /w gm [[1t[class table] ]]
Thanks.  Unfortunately the GM isn't very Roll20 savvy and won't create a table.  I asked about that as well.  The example I posted  is smaller than I have planned, which is why I was hoping it could be done through a macro.  I can do it manually, I was just hoping to simplify it for my sake.
This macro would handle that and should be easy enough to expand /w gm &{template:default} {{name= $[[$[[0]]]] [[[ [[1d4 * 2 - 1]] ]]] }} [[[ [[0]] {{Rogue }} ]]][[[ [[0]] {{Sorcerer }} ]]][[[ [[0]] {{Barbarian }} ]]][[[ [[0]] {{Monk }} ]]] {{name=}}
That's perfect!  Thank you so much!