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 .
×

Use dice /roll function inside attribute modifier script??

1407568034

Edited 1407664747
Thanks again for author of 'Roll20 Attribute Modifier' <a href="https://gist.github.com/Thequietcroc/c2fd1dcc46238" rel="nofollow">https://gist.github.com/Thequietcroc/c2fd1dcc46238</a>... My Edited Version : <a href="http://pastie.org/9457388" rel="nofollow">http://pastie.org/9457388</a> (Added 3 more functions to original) 1) current value cannot go over max value 2) current value cannot go under 0 3) !altermax added, to modify max value too THE QUESTION IS i can do '!alterattr @{selected|token_id} HP +10' in macro to add 10 hp , can be used for a healing spell but i can't do ' !alterattr @{selected|token_id} HP 1d6+10' , current script cannot handle diceroll function i tried hard but i can't find the way to achieve this, any ideas???? *P.S my nickname is in Korean, its bonaludo, call me bonaludo in replies plz
1407590369
The Aaron
Roll20 Production Team
API Scripter
Ok bonaludo, In the API the easiest thing to do is replace "1d6" with "randomInteger(6)".
omg haven't thought of that!! i already knew how to create dice myself ...
1407671662
The Aaron
Roll20 Production Team
API Scripter
:). Sometimes it's hard to see the forest through all the trees. :) Glad as you got it working.
thanks i succeeded making what i wanted, :)