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

PF_Applying buff when casting spell

1586140163

Edited 1586140271
Hi, I'm kinda new to Roll20 and that awesome world of macros. Playing PF and using the Official PF sheet So I'm wondering 2 things; 1- Is it possible to trigger a Buff condition automatically when using a spell. i.e. Divine favor from the compendium slotted as a spell on the char sheet? 2-I was looking on a way to set the max bonus of +3 on divine favor so the maths are done automatically. Here is what I come up with: +[[1+floor(@{caster1_level}/3)]] to attack what am I missing to have it applying a max of +3 when I toggle it? Thanks for the help
Welcome to Roll20! This can be done with an API script, which requires the creator of the game to have a Pro subscription. ChatSetAttr is a good script for this purpose. Try this: +[[max((1+floor(@{caster1_level}/3)),3)]]
Hi Persephone, thanks for the reply. At first the syntax was not right, it gave me 0 with a simulated caster level 12. So I've played with the sintax a little and finally find out that you can't have a floor within a max also there was too many () so here's what worked. +[[max(1+@{caster1_level}/3),3]] I've learned some stuff, thank you for that!
Sure thing! Also I think I mixed up more, change it from max to min, that way it never goes above 3