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

Javelin Macro

I am trying to create an NPC attack macro that will query whether I want to use the melee or ranged attack for a javelin. I do not know a lot about HTML but i have the following for a BugBear: ?{Attack|Melee,%{selected|repeating_npcaction_$1_npc_action&#125|Ranged,%{selected|repeating_npcaction_$2_npc_action&#125} This outputs a text result. pls help.
The problem with your query is that the Ability Call (currently) gets processed before the query, because of the  Roll20 Order of Operations . There have been other attempts before , and as far as I'm aware none have been successful. I would suggest looking into a chat menu , or just waiting for the ' nested roll query improvements ' to get pushed to the live servers, as that may allow for this kind of functionality (or it may simply allow for nested queries, but not nested ability calls).
1628390275
timmaugh
Roll20 Production Team
API Scripter
Very likely, you have characters in the abilities that would also require escaping... they get expanded into the command line before the roll query finishes. The good news is you could use Fetch, since it would function after the roll query... I'm not sure whether you are looking for abilities (with the % character) or repeating attributes (which should have an @ character). If you clarify, I can post what the Fetch call should be...