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

Macro to trigger 2 separate API commands at the same time

1774382931

Edited 1774383022
Hello all. I've been trying to figure this one out on my own, but I'm not that great at coding and syntax. Is there a way to trigger 2 separate API commands at the same time? What I am trying to accomplish, is making a macro that will both ADD a status icon to a selected character (!token-mod --set statusmarkers|aura) AND create a drop-down menu with all the common Concentration spells (i.e. Bless, Bane, Shield of Faith, Spiritual Weapon, Mage Armor, etc), and when I click that item in the drop down (i.e. Bless) the macro will generate a command that will add an item to the turn tracker (!act -1 10 --Bless --after)? A chatbox option is acceptable, too, if it wont work in a dropdown. The long-term goal is to simplify tracking Concentration spells (I cant use the Concentration API mod because I use DNDBeyond for character sheets, so the mod isn't working right). I want to select a character, click the Macro button, Choose which spell they are casting, and then have it automatically apply the Concentration icon (we use Aura icon), then create the turn-tracker countdown so we not only remember that the spell is active, but know when it will expire, AND we are reminded that someone is concentrating on it, so we can remember to roll a conc check when they take damage. Right now, I do all this manually, and I'm fairly quick, but it still takes time away from the action and slows combat. Unless someone has a better idea of how to track Concentration, Spell Uptime/Expiration Time, etc?  I'm all ears for any suggestions. I've only been on Roll20 for 5months, so I welcome any suggestions and feedback. Thanks in advance.
Your macro can include multiple lines, and each line can run a separate API command.  !token-mod --set statusmarkers|aura !act -1 10 --Bless --after So all you have to do is get each individual line working the way you want (with a query for the !act command) and put that into a macro. If what you mean is you want a query, where the output of the query makes two separate API commands, yes that is possible. You simply need to add a Line Break command into the query output.  Typically !
 is what works to add a line break. In some situations you can use %%NEWLINE%%, but that is usually only to add a linebreak in a text output, like in a description box. Instead of queries, I use chat menus, which I find easier to troubleshoot and update.   If you want to go the Chat Menu route instead, you can take a look at these two options as well. They both take a bit of setup, but I find chat menus to be easier to navigate quickly.  Text chat menu Image chat menu Depending on your exact setup, it might be worthwhile to look into using Metascripts, specifically APILogic and ZeroFrame to add "if then" functionality, or to make your HTML entity replacement a lot simpler.