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

API chat w/ query problem

I'm attempting to make a chat button with a query for how many hit dice to use on a short rest. Nut I'm getting errors.
I'm using 5e OGL alternate and charsetattr 
My macro:
[Spend Hit die?](!alter --target|@{selected|token_id} --bar|1 --amount|?{How many Hit die do you want to spend?|1}@{selected|classdie}@{selected|npcd_con_mod}
!setattr --sel --modb --hit_dice|-?{How many Hit die do you want to spend?|1})
March 15 (7 years ago)
The Aaron
Pro
API Scripter
See this section of the wiki:  https://wiki.roll20.net/API:Chat#Entering_API_Butt...

If you want the queries to happen when you click the button, you'll have to change out some of the ?{ for HTML entities.  

Also, for multi-commands, you probably have to separate them with 
 instead of hitting enter.  I've never tried that, but it should work.
March 15 (7 years ago)

Edited March 15 (7 years ago)
Do my post throw up your own personal bat signal (im guessing its a giant pink d20) in the interwebs Aaron? Lol. Thanks I'll try it out later when I get home. I figured it was something like that.
March 15 (7 years ago)
The Aaron
Pro
API Scripter
hahahahah

.

Lol
Alright, Aaron.  That's pretty darn hilarious.  I don't often truly LOL at posts.  I did at that one.