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

Is there a simple script that will add or subtract to an attribute value?

I want to be able to use a Macro to input an amount of gold @{GOLD} and simply add or subtract that amount from @{GOLD} producing a new value for GOLD. I have Power Cards but not sure it can be done with that. I have no scripting ability myself, so I was wondering if there is something out there will allow this.
There is this mythical script named CharMod that supposedly exists.  But no one has ever seen it but the Scriptomancer himself that could probably do this if it actually existed.  But since it is only spoken of in myths and legends, I don't think it can currently be done with any existing script without modification. I could be wrong though.  I just wanted to use this as an opportunity to rib Aaron. ;)
ChatSetAttr can do this.
1514699863

Edited 1514700898
Ajax
Pro
Edited: I FIGURED IT OUT! Syntax was wrong. Thanks again for the help. How would this work? The macro would have to Show the current Gold total, ask for an amount to add or subtract, and set the new value to the Gold attribute. I have the CharSetAttr script from the library but I cannot get the math to work. Thanks for any help.
1514702528
The Aaron
Pro
API Scripter
Three of Swords said: There is this mythical script named CharMod that supposedly exists.  But no one has ever seen it but the Scriptomancer himself that could probably do this if it actually existed.  But since it is only spoken of in myths and legends, I don't think it can currently be done with any existing script without modification. I could be wrong though.  I just wanted to use this as an opportunity to rib Aaron. ;) BWHAHAHAHAHAH