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 with an Aura of Vitality Macro

Hello everyone.  I've been trying to write an Aura of Vitality macro for my players to use and have gotten stuck.  Here's how I would like it to work:  The player using it presses the button on the bottom of their screen and then selects the appropriate token.  The macro then will add the proper amount based on dice roll to the current hp and update the sheet.  I'm use the 5th Edition OGL, and have ChatSetAttr working, among others.  I have been able to do something similar to this with Twilight Sanctuary for Temp HP, but not with Aura of Vitality.  Here's the code I have so far:  Aura of Vitality &{template:dmg} {{rname=Aura of Vitality}} {{damage=1}}{{dmg1flag=1}} {{dmg1type=Healing}} !setattr --silent --charid @{target|character_id} --hp|{{dmg1=[[2d6+@{target|@hp}]]}}!!! It works inasmuch as it rolls the 2d6 and writes to the correct sheer.  However, it overwrites the current amount instead of adding to it.  I also want to make sure it doesn't exceed max hp as it adds to the current hp.  Thank you in advance for any help.
Got it!  It should read: Aura of Vitality &{template:dmg} {{rname=Aura of Vitality}} {{damage=1}}{{dmg1flag=1}} {{dmg1type=Healing}} !setattr --silent --charid @{target|character_id} --hp|{{dmg1=[[2d6+@{target|hp}]]}}!!!