We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Accept
Advertisement 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
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
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.