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

Macro Help

I am working on some spell macros for my 3.5 campaign, and after going through all the posts that I can find looking for pre-made macros, I was forced to write it myself using other spells as a template. However, in doing so, I ran into 2 problems that I do not know how to fix. In the below macro, how do I make it so that the target number of creatures rounds down to the next whole number? And how do you make it so that the damage caps at 5d6? This macro works functionally, but I am currently casterlevel 4, which is causing the target number of creatures to come up as 1.333333. &amp;{template:DnD35StdRoll} {{spellflag=true}} {{name=@{character_name} }} {{subtags=casts [Gedlee's Electric Loop](<a href="https://dndtools.net/spells/players-guide-to-faerun--22/gedlees-electric-loop--2251/" rel="nofollow">https://dndtools.net/spells/players-guide-to-faerun--22/gedlees-electric-loop--2251/</a>).}} {{School:= Evocation}} {{Level:= Wiz 2}} {{Cmpnts:=V,S,M}} {{Casting Time:=1 std action}} {{Range:= Close ([[25+(2.5*{@casterlevel})]]ft)}} {{Target=&nbsp; [[@{casterlevel}/3]] creatures, each of which must be adjacent to another target}} {{Saving Throw:= Reflex DC [[@{Lorelian|spelldc2}]] for half}} {{Duration:= Instantaneous }} {{Spell Resistance:= Yes}} {{notes= You create one small stroke of lightning that targets one creature per three caster levels you possess (maximum four creatures). Each target must be in a square adjacent to another target. The spell deals [[(@{casterlevel}/2)d6]] points of electricity damage to each target. A creature that fails its Reflex save must make a successful Will save (DC [[@{Lorelian|spelldc2}]]) or be stunned for 1 round. Material Component: A loop of copper wire and a magnet.}}
1589297809

Edited 1589297960
Ziechael
Forum Champion
Sheet Author
API Scripter
Welcome to the fun world of macros ! Rounding down: floor(@{casterlevel}/3) Dice cap: [[ [[{floor(@{casterlevel}/2),5}kl1]]d6]]
Thanks&nbsp;