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

Help needed for a specific macro for dropdown menu to spells

Good Afternoon all. I am new here to Roll20 and would appreciate it if someone could perhaps assist with some code. basically what i would like to do is the following. i have managed to write a macro for getting a button for a token to use all specific spells of a spell level like I can program a button to print out all level 1 spells an NPC knows with results. (DnD 5e if that makes a difference). I am also able to write a button with just one specific button for 1 specific spell, but this approach would make each spellcaster have looooooads of macro buttons. does someone know what code i can use to get a dropdown question when a button is pressed and how to select spells from them? I want to have different buttons per spell level. for example a level 4 spellcaster would know cantrips, level 1 spells and level 2 spells. so i want 3 different buttons as macros. Cantrip, Level 1 Spells, Level 2 Spells, (etc in the case of higher level spellcasters). then when you press 'Level 1 Spells', a dropdown menu asks what spell you want to use. the macro should then pull the list of level 1 spells out of the NPC's known spell list as options and when a spell is selected, it should output as a whisper to me the result of the spell.  apologies if this has been asked before and thank you for your help!
1585574570
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would recommend using a  Chat Menu  for all of this. They are far easier to program than nested drop downs.
ill take a look at it thanks :)