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

Scripting help please

So im trying to make a script that allows me to choose my attacks, I'm playing a druid barb that i've gotten a script that allows me to choose between normal, rage, crit normal, rage crit for my attacks. Which works just fine but since i have so many wildshapes and attacks i wanted to make a script that allows me to choose which attack that i want to do, but the issue is when i run the script it gives me all the options for that attack immediately instead of me choosing that attack then choosing if it's a crit or whatever This is the attacking script ?{Options| Normal, **Normal Bite** Target takes [[2d6 [Bite]+[[@{Giant Hyena (Niris)|strength_mod}]] [Str]]] HP. | Rage, **Rage Bite** Target takes [[2d6 [Bite]+[[2]] [RAGE] +[[@{Giant Hyena (Niris)|strength_mod}]] [Str]]] HP. | Critical Hit, **Critical Hit Bite** Target takes [[((2d6 [Bite]+[[@{Giant Hyena (Niris)|strength_mod}]])*2) [Str]]] HP. | Rage & Critical Hit, **RAGE & Critical Hit Bite** Target takes [[(2d6 [Bite]+[[2]] [RAGE]+[[@{Giant Hyena (Niris)|strength_mod}]]*2) [Str]]] HP. } This is what I've been trying to get for the choices ?{Options| Dire Wolf Bite, #1d , Giant Hyena Bite, #1c Basically what I'm trying to do is get it to prompt me for like my different attacks then open up the the options for that attack after i choose it, but currently it will ask me for dire wolf bite then i have to choose something to get to giant hyena because it shows dire wolf bite with normal and all that then it does the same for the next attack and so on
<a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a> You're running into the Roll20 Order of Operations macro nesting issue.&nbsp; Basically attributes, abilities, and macro calls get fully parsed/resolved before queries, so as soon as a | or } shows up in a macro, Roll20 doesn't recognize that there was another query embedded in the first one. You can use a Chat Menu, or create a Macro for each attack that gets called by the first query, but you'll still need some html replacements in that case.
1615729343
timmaugh
Roll20 Production Team
API Scripter
If you went Pro on Roll20, you could embed APILogic structures in your macro... Use query1 in an if structure, and then defer query2 until you've answered query1 and that IF resolves.