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

Does anyone have a script for the API to call buttons/rolls through them?

Is it possible to have the API call rolls and buttons through them? A small script anyone has for such a thing?
1432913273
The Aaron
Pro
API Scripter
Are you talking about having the API activate rolls on a character sheet?
Yeah sort of. I basically want the API to activate a button / produce the template with the values etc. As if I was pressing the button.
You can use %{selected|BUTTON NAME} as a macro without the API
To find the button name, you right click on it -> inspect element, and basically after 'roll_' its the 'BUTTON_NAME'
This is so it can be used with API buttons Jake. A simple way to call them out and format API buttons.
No love for this? Awe :<
1432986209

Edited 1432986261
Lithl
Pro
Sheet Author
API Scripter
It appears that the API can't see the sheet's roll buttons. However, some sheets store the body of the roll button's macro in an attribute, which you could access (and that's the information you want, anyway).
Pretty much yeah. Good to know but can the API process templates properly? Tried messing about with Honeybadgers scripts etc. Just unformats the templates.
The reason I want to be able to do that is to create things like these. A method to compound abilities and functions. Something that is a sheet in itself but for commands.
1433132596
The Aaron
Pro
API Scripter
The API can use templates, but there is an extra step the API script needs to go through to maintain the formatting.
Saevar L. said: Pretty much yeah. Good to know but can the API process templates properly? Tried messing about with Honeybadgers scripts etc. Just unformats the templates. PowerCards also abuses Roll Template formatting in a macro (thanks to Aaron) to allow multi-line editing.