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

Broken Macro

I found this one some time back on these forums.&nbsp; I tried to put it to use in a new game and it seems to be broken.&nbsp; Can one of you supersmart programmer types help? &amp;{template:default}&nbsp; {{name=Healing Potion}} !modbattr --charid @{target|character_id} --hp|{{?{Potion| Regular, Healing Potion Used: [[2d4+2]] HP recovered[image](<a href="https://i.ibb.co/DfRMpdP/healing-potion.png)%7CGreater" rel="nofollow">https://i.ibb.co/DfRMpdP/healing-potion.png)%7CGreater</a>, Greater Healing Potion Used: [[4d4+4]] HP recovered[image](<a href="https://i.ibb.co/4NH9qQj/greater-healing.png)%7CSuperior" rel="nofollow">https://i.ibb.co/4NH9qQj/greater-healing.png)%7CSuperior</a>, Superior Healing Potion Used: [[8d4+8]] HP recovered [image](<a href="https://i.ibb.co/DpTStzq/superior-healing.png)%7CSupreme" rel="nofollow">https://i.ibb.co/DpTStzq/superior-healing.png)%7CSupreme</a>, Supreme Healing Potion Used: [[10d4+20]] HP recovered[image](<a href="https://i.ibb.co/47csqM2/supreme-healing.png)%7D" rel="nofollow">https://i.ibb.co/47csqM2/supreme-healing.png)%7D</a> }} --silent!!! /fx glow-holy @{target|token_id}
It looks like that macro is using the ChatSetAttr script - do you have that installed in the new game? What happens when you use the macro?&nbsp; How is it broken?&nbsp; Posting a screenshot or cut-and-paste of an error message would be helpful.
1606987946
Oosh
Sheet Author
API Scripter
Some of the HTML entities in the Query somehow got turned into URL encoding. Try this (and make sure the script is installed, as Jarren said): &amp;{template:default} {{name=Healing Potion}} !modbattr --charid @{target|t1|character_id} --hp|{{?{Potion| Regular, Healing Potion Used: [[2d4+2]] HP recovered[image](<a href="https://i.ibb.co/DfRMpdP/healing-potion.png)|" rel="nofollow">https://i.ibb.co/DfRMpdP/healing-potion.png)|</a> Greater, Greater Healing Potion Used: [[4d4+4]] HP recovered[image](<a href="https://i.ibb.co/4NH9qQj/greater-healing.png)|" rel="nofollow">https://i.ibb.co/4NH9qQj/greater-healing.png)|</a> Superior, Superior Healing Potion Used: [[8d4+8]] HP recovered [image](<a href="https://i.ibb.co/DpTStzq/superior-healing.png)|" rel="nofollow">https://i.ibb.co/DpTStzq/superior-healing.png)|</a> Supreme, Supreme Healing Potion Used: [[10d4+20]] HP recovered[image](<a href="https://i.ibb.co/47csqM2/supreme-healing.png" rel="nofollow">https://i.ibb.co/47csqM2/supreme-healing.png</a>)} }}
Thanks for the replies.&nbsp; I did have the api working.&nbsp; Oosh, I tried the one you posted here and it does throw the card with a result to the chat, but it no longer applies it to the token selected.&nbsp; It is usable in this form, but it would be really nice if it applied the healing to the token.&nbsp; Or a lesser degree of nice, don't ask me who I'm targeting if it's not going to apply it.
1607042766
Oosh
Sheet Author
API Scripter
Whoops, I dropped the last CSA command off the end when I grabbed it: &amp;{template:default} {{name=Healing Potion}} !modbattr --charid @{target|t1|character_id} --hp|{{?{Potion| Regular, Healing Potion Used: [[2d4+2]] HP recovered[image](<a href="https://i.ibb.co/DfRMpdP/healing-potion.png)|" rel="nofollow">https://i.ibb.co/DfRMpdP/healing-potion.png)|</a> Greater, Greater Healing Potion Used: [[4d4+4]] HP recovered[image](<a href="https://i.ibb.co/4NH9qQj/greater-healing.png)|" rel="nofollow">https://i.ibb.co/4NH9qQj/greater-healing.png)|</a> Superior, Superior Healing Potion Used: [[8d4+8]] HP recovered [image](<a href="https://i.ibb.co/DpTStzq/superior-healing.png)|" rel="nofollow">https://i.ibb.co/DpTStzq/superior-healing.png)|</a> Supreme, Supreme Healing Potion Used: [[10d4+20]] HP recovered[image](<a href="https://i.ibb.co/47csqM2/supreme-healing.png" rel="nofollow">https://i.ibb.co/47csqM2/supreme-healing.png</a>)} }} --silent!!! Sorry about that.
Thanks Oosh, you're awesome!