[RPG] As a DM how to make a Macro for monster attacks and Save Check in R20

roll20

I wanna make a Macro that uses @Selected but I dun't know how to put it in a way that whenever I've selected a monster when I press the attack1 button in the Bar the monster I am selecting will roll a Dice corresponding to it's weapon on attack1.

For example

When I selected Basilisk then pressed attack1 macrokey/button, it will roll for the bite attack like show on the image below. But I wanna make the button be universal to any monster I am selecting.

enter image description here

Best Answer

What you are looking for are Token Actions, which will allow you to create macros that will only apply to tokens. The variable to access the selected token is called selected, which will allow you to obtain stats and variables from the selected token. There are several examples here, like:

/roll 1d20 + @{selected|Attack}

Check out some other useful macros for d20-based games.