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

How do i make a Script that rolls healing and applies it to my healthbar

I want to make a script that roll a 1d10+CON and displays it like i just clicked it from my character sheet and then applies it to my character. I'm guessing i will have to use token mod but i'm not very good at the programming.
1670639489
GiGs
Pro
Sheet Author
API Scripter
TokenMod is the best for this (or ChatSetAttr if you change the attribute an the character sheet, and if the token bar is linked to that attribute it will be updated). You'll need to be a Pro subscriber, or more accurately, your campaign must be created by a Pro subscriber to use scripts.
1670666826

Edited 1670666896
yeye i got that covered, my DM has a pro subscription. My earlier attempt with ChatSetAttr just did what the name suggests, it just set my health total to the value it rolled instead of adding.
1670668335

Edited 1670669642
This is what i got currently   /w gm &{template:dmg} {{rname=Devour}} {{damage=1}}{{dmg1flag=1}} {{dmg1type= Healing}} !setattr --silent --charid @{target|character_id} --hp|{{dmg1=[[1d10+@{constitution_mod}]]}}!!!
AutoButtons  could be what you are after. You can turn on reports in the settings for GM, Character or Public