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

5e by Roll20 Sheet - Call macro or api from within spell on Spell Sheet?

As the title says - is there any way to have a macro or api fire when the player clicks on the spell name from their Spells sheet?  Or correspondingly from the Attacks & Spellcasting section of the Core page?  I know I can (and already have) made Chat Menu buttons for many spells, but I am wondering about doing it more elegantly and efficiently.  Yes, that is code for lazy.  :)
1602568586
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There is an API script called Customizable Roll Listener (available from one click) that "listens" to things sent to chat and can run macros when they occur. If you can find consistent commonality from the attacks or spells you cast, you can set that. For example, I have a series that listens for spells with saving throws in the description and runs a macro that calls up a chat menu button for the appropriate throw.
That looks very interesting!  Thank you keithcurtis!