I had a typo in what I provided - sorry. I fixed it above, but I'll outline it here, too.
This first approach would require Fetch and ZeroFrame. Once you've installed both, you can use formations like this:
@(Character Name.attribute)
%(Character Name.ability)
... to retrieve information. So, for Astrea Darvose, the two attributes would be:
%(Astrea Darvose.Bladesinging-On)
%(Astrea Darvose.Bladesinging-Off)
So you can do a query in two different ways using those constructions. Since the constructions don't include any control characters for a query (a comma, vertical pipe, or right brace), you can use them inside a query:
?{Turn Bladesinging...|On,%(Astrea Darvose.Bladesinging-On)|Off,%(Astrea Darvose.Bladesinging-Off)}
...or, since these formations resolve after Roll20 parsing, you can use the roll query inside the fetch construction, and let it supply the building parts:
%(Astrea Darvose.Bladesinging-?{Turn Bladesinging...|On|Off})
The trick is that these Fetch constructions are metascript constructions, and only work in a bangsy message (starting with a bang: ! ). So you'd have something more like:
!?{Turn Bladesinging...|On,%(Astrea Darvose.Bladesinging-On)|Off,%(Astrea Darvose.Bladesinging-Off)}
(I could have used the other query and made the same alteration). That message will prompt you for the choice, and based on your selection, return the proper Fetch construction to the command line (either 'on' or 'off').
!%(Astrea Darvose.Bladesinging-On)
Then the message gets sent to the script moderator (since it's a bangsy message), and Fetch replaces the Bladesinging-On formation with the attribute contents -- your ChatSetAttr command lines:
!Astrea begins bladesinging
!setattr --silent ...
!setattr --name ...
!setattr --silent
You see that the first one looks like a bangsy message, even though it should just be sent to the chat. Also, what you're left with is a series of commands that you want to be sent separately, but which are all going to be present in this one message. To get around this, let's change the Bladesinging-On and -Off abilities.
We'll wrap the existing lines in the ZeroFrame batching construction: !{{ ... }}
That will issue each command separately. Also, we'll use the {&simple} formation to make sure the first line makes it to chat. We'll have to defer it so that it doesn't stop the initial message (only the dispatched, individual line):
!{{
(^)Astrea begins bladesinging{^&simple}
!setattr --silent --sel --repeating_acmod_$0_global_ac_active_flag|1
!setattr --name Astraea Darvose --silent --evaluate --constitution_save_bonus|%intelligence_mod% + %constitution_mod%
!setattr --silent --sel --mod --other_resource|-1
}}
Then do the same thing for the other ability, too. These abilities will still run if you activate them individually, and they'll be more consistent since they won't be subject to the bug where the Roll20 parsers occasionally drop random lines from a multi-line command. However, wrapping them this way will let them also function when you pull them into the ability macro where you have your query (if you pull them in with the Fetch construction).
TL;DR Version
Change the Bladesinging-On ability to be:
!{{
(^)Astrea begins bladesinging{^&simple}
!setattr --silent --sel --repeating_acmod_$0_global_ac_active_flag|1
!setattr --name Astraea Darvose --silent --evaluate --constitution_save_bonus|%intelligence_mod% + %constitution_mod%
!setattr --silent --sel --mod --other_resource|-1
}}
Change the Bladesinging-Off ability to be:
!{{
(^)Astrea stops bladesinging{^&simple}
!setattr --silent --sel --repeating_acmod_$0_global_ac_active_flag|0
!setattr --name Astraea Darvose --silent --evaluate --constitution_save_bonus|%constitution_mod%
}}
Change the calling command to be:
!?{Turn Bladesinging...|On,%(Astrea Darvose.Bladesinging-On)|Off,%(Astrea Darvose.Bladesinging-Off)}
See if that works better
Caveats
I'm not as familiar with the ChatSetAttr commands themselves, so I'm not looking at them. Also, if they (or any command you're bringing in as a part of a Fetch construction) contains character sheet references (like retrieving an attribute or ability), those references need to be fully qualified (including the character name). Even though the shorthand versions will work from a character sheet (ie, @{underwater_macrame} instead of @{Astrea Darvose|underwater_macrame} ), we're pulling them in *after* the Roll20 parsers have had a chance at them. In other words, those shorthand constructions will no longer work because they won't pass through the Roll20 process (only our metascript process).
Scripts Required
Fetch (one-click) and ZeroFrame Beta