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 query using both label and value

1483223763

Edited 1483223773
I want to be able to have a macro that does the following !myapi ?{Who|name1,id1|name2,id2} /em Character attacks ?{Who} But instead of printing the id in the /em I want to print the name that was selected. Is this possible?
1483223831
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nope, roll queries only resolve to one thing.
Ok thanks
1483224113
Silvyre
Forum Champion
You can do this, though: !myapi ?{Who| name1,id1 /em attacks name1 | name2,id2 /em attacks name2 }
1483224222

Edited 1483224399
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
And, had a thought. You can get the behavior you want, just need a slightly more complicated roll query: !myapi ?{who|name1,id1 /em Character attacks name1|name2,id2 /em Character attacks name2} Should do what you want EDIT: which is the same thought Silvyre had apparently ;). I don't think you'll be able to do the new line after each bar that he has in his though because then there will be a new line between the api command and the id if I remember how the query respects new lines correctly that is.  Ignore me, the new line doesn't matter because it's in the list option name not the value name - doh.