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

[Looking for Script] Call macros on turn start

Hello! I'm currently trying to find a simple API script that will allow me to call custom macros when a token starts its turn on the Initiative Tracker. (Example usage: D&D 5e has various monster features which have a chance of 'recharging' at the start of each of the monster's turns, typically by rolling a die. I often forget about these effects in the business of complex encounters, and it would be useful to have a reminder message pop up on its turn with the die result.) I am aware of various other scripts which seem to already utilise this functionality in achieving other things - for example CombatMaster - but based on the documentation I could find, none of these scripts seem to have the option to call your own custom macros when a token's turn comes around. Are there any generic scripts I've missed that could do this? (Ideally just this, so I don't need to try and work around shutting off a bunch of other features that I don't want!)
1652298163
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I was going to suggest Combat Master, since I was under the impression that you could call a custom macro. Do you mean that you can't call a different macro per character, like a character Ability?
1652298276
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If that's the case, you could create an ability on every token that needs it called "Start-of-Turn" or somesuch, and put whatever macros need to run for that character in each character's ability. Combat Master would run @{selected|Start-of-Turn}, and the individual character ability would call whatever was indicated within that macro.
1652303361

Edited 1652303410
David M.
Pro
API Scripter
Also may want to check out OnMyTurn written by TheAaron.
I think The Aaron's OnMyTurn script  will do exactly what you're looking for.
Excellent! Thank you all so much!
1652404591

Edited 1652404610
OnMyTurn will indeed do what you want (I use it for this purpose) but it will often send it two or more times to the chat window.