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

Macro Question

I am trying to find a way to roll multiple dice with a modifier multiple times. i.e. I am casting magic Missile to hit 3 targets and doing 1D6+1 per missile I want to cast 9 missiles so the pseudo code would look something like this /roll ?{how many missiles|0} /roll ?{number of missiles}d6+1 So if I cast 3 missiles it would cast 1D6+1 3 times, or if it was 4 then 1D6+1 4 times, etc.  So far I have not been able to find a way.
So I figured out part of it... if I do the following it will cast 9 missiles with 3 to each target /roll {?{Number of Dice}d?{Die Value|20|10|8|6|4}+?{Number of Dice}} /roll {?{Number of Dice}d?{Die Value|20|10|8|6|4}+?{Number of Dice}} /roll {?{Number of Dice}d?{Die Value|20|10|8|6|4}+?{Number of Dice}} However I would prefer something like this: /query ?{Number of Targets|1} /query ?{Number of Missiles|3} /query ?{Die Value|20|10|8|6|4} /query ?{Modifier per die roll} /roll {{Number of missiles/Number of Targets}d{die}+{Modifier}} Not even sure if there is a way as the last line would need a counter until the total number of missiles hitting different targets would have to reach 0. Another option would be a way of getting an array... So that the macro would ask how many targets then as how many missiles on target1, then Target 2, etc until the total missiles are used. 
There's no way to have macro adjust the number of rolls that happen in the way you're looking for.  That would require an API script (Pro subscriber benefit). There are other Magic Missile macros around -- I did a quick search and found this one .
Thank you Jarren, I had looked at a couple but due to the nature of the world we are in and a different magic system than 5E they did not work for me. I have a work around that will work for now but was wondering if there was some other way (without going to the pro version)