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

Automatic Regeneration for token when at half hp?

Im running DnD 5e and have a monster that regenerates 10 HP if they are below half HP. I'm using the OnMyTurn API script to add the HP through tokenmod automatically. Right now for the OnMyTurm ability I have below: !token-mod  --api-as -<MYDM#> --ids @{selected|character_id} --set bar3_value|+10 This works except it adds 10 HP at at the start of each of the monsters turns. I tried to create a query as below ?{Half HP?|Yes,!token-mod  --api-as <MYDM#> --ids @{selected|character_id} --set bar3_value|+10 | No, } This fails and pipes the text of the command into chat. What am I doing wrong?
1591216208
GiGs
Pro
Sheet Author
API Scripter
When OnMyTurn triggers, it is the API that is running the ability - the API has no way to select a result from a query.  I havent used OnMyTurn, but you might be able to whisper a button into chat that you can manually click to run that command.
Thanks! Sending a button to chat worked.
1591289176
GiGs
Pro
Sheet Author
API Scripter
Great!