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

Need to find an API script that allows a macro to reuse a roll

So i am playing a 3.5 game, and I want to combine the results of an Iaijutsu Focus skill check with an attack and damage roll. the damage roll has two sections. one with the base weapon and multipliable modifiers, and the other with extra damage. the extra Damage is dependant on the result of the Iaijutsu focus skill check.  example 10-14 = 1d6, 15-19 = 2d6, and so on. it will cap at a max of 9d6. my problem is finding a script that would allow the reuse of the Iaijutsu Focus skill check. here is what i have currently for the whole macro &{template:DnD35StdRoll} {{pcflag=true}} {{name=Iaijutsu Check}} {{sense motive=[[1d20+@{sensemotive}+?{Other Sense Motive Bonuses?|0}]]}} {{Iaijutsu Focus Check=[[1d20+@{iaitjutsufocus}+?{Other Iaijutsu Focus Bonuses?|0}]] this replaces this character’s Initiative}} {{attack roll=[[1d20+@{bab}+@{str-mod}+@{weapon#enh}+@{weapon#focus}+?{Other attack bonuses|0}]]}} {{damage=Weapon [[1d10+@{str-mod}+@{weapon#enh}+@{weapon#specialize}+?{Other Normal Damage Bonuses?|0}]] Iaijutsu Focus Dmg [[floor((reuse roll for Iaijutsu Focus-10)/5)/2,9)kl1+?{Other Iaijutsu Damage Bonuses}]] }}
1688181356
timmaugh
Pro
API Scripter
ZeroFrame will be yer huckleberry. !&{template:DnD35StdRoll} {&global ([ijFocusRoll]  [[1d20+@{iaitjutsufocus}+?{Other Iaijutsu Focus Bonuses?|0}]] )}  {{pcflag=true}} {{name=Iaijutsu Check}} {{sense motive=[[1d20+@{sensemotive}+?{Other Sense Motive Bonuses?|0}]]}} {{Iaijutsu Focus Check=ijFocusRoll this replaces this character’s Initiative}} {{attack roll=[[1d20+@{bab}+@{str-mod}+@{weapon#enh}+@{weapon#focus}+?{Other attack bonuses|0}]]}} {{damage=Weapon [[1d10+@{str-mod}+@{weapon#enh}+@{weapon#specialize}+?{Other Normal Damage Bonuses?|0}]] Iaijutsu Focus Dmg [\][\]floor((ijFocusRoll.value-10)/5)/2,9)kl1+?{Other Iaijutsu Damage Bonuses}\]\] }} {&simple} Get ZeroFrame installed then give the above command a run and see if it gets what you need. I don't have a 3.5 game to test that, but it's a simple enough alteration to your macro that I'm fairly confident I got it.
I can't seem to get it to work. i noticed that i have several errors like #, and some spelling errors but even when i fix them i can't get it to work.
I figured it out. here is the full macro so others may find it helpful.  NOTE: THIS REQUIRES ZEROFRAME MOD !&{template:DnD35StdRoll} {{pcflag=true}} {{name=Iaijutsu Check}} {{sense motive=[[1d20+@{sensemotive}+?{Other Sense Motive Bonuses?|0}]]}} {{Iaijutsu Focus Check=[[ 1d20+@{iaijutsufocus}+?{Other Iaijutsu Focus Bonuses|0}]] this replaces this character’s Initiative}} {{attack roll=[[1d20+@{bab}+@{str-mod}+@{weapon1enh}+@{weapon1focus}+?{Other attack bonuses|0}]]}} {{damage=Weapon [[1d10+@{str-mod}+@{weapon1enh}+@{weapon1specialize}+?{Other Normal Damage Bonuses?|0}]] Iaijutsu Focus Dmg [\][\][\][\]{floor((($[[1]].value-10)/5),9}kl1\]\]d6+?{Other Iaijutsu Damage Bonuses}\]\] }} {&simple}
1688250793
timmaugh
Pro
API Scripter
Excellent! Glad it worked for you!