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

Script to make a lasting smokebomb effect? Also macro Script for Health Potion?

Im looking to make a smokebomb that could last until I deactive the effect, or I could place multiple.  Would be really useful for my game.  Also wondering if there is any way to make a healing macro that will raise bar1 if it is set to wounds!  Any advice would be an amazing help!
1466057534
Andrew R.
Pro
Sheet Author
You can do the Healing macro using the TokenMod script.
John V. said: Im looking to make a smokebomb that could last until I deactive the effect, or I could place multiple. Sounds like  PageFX is up your alley!
Ok, I looked at PageFX the link there was invalid.  Also thanks for the replies but could you show me an example of that script using a heal that does [[1d6+2]]  I would really appreciate the help :)
1466082138

Edited 1466092273
Ada L.
Marketplace Creator
Sheet Author
API Scripter
I deleted the old branch for PageFX since it got merged into the main repo. I guess I forgot to replace the link. Anyways, PageFX is available from the API's one-click installer. It can be used to do what you're wanting though. Edit: The PageFX repo link is fixed now.
1466122698
Andrew R.
Pro
Sheet Author
!token-mod {{ --set bar1_value|[[ 1d6 +2 ]] }}
!token-mod {{ --set bar1_value|[[ 1d6 +2 ]] }} works well for actually healing but I need it to be added to current wounds.  Ex player has 3 hp, I need it to be Current bar1 value +1d6+2 I guess?
1466134025
Andrew R.
Pro
Sheet Author
Put a + between the | (pipe) and [[ 
Haha you just answered my question in private chat, thanks again.  But is there any way to prevent this macro from going past a tokens max HP, wounds etc?
1466181137

Edited 1466181150
John V. said: But is there any way to prevent this macro from going past a tokens max HP, wounds etc? This should prevent bar1 from being set higher than bar1|max: !token-mod {{ --set bar1_value|[[ {@{selected|bar1} + 1d6 + 2, @{selected|bar1|max} + 0d0}kl1 ]] }}
Thanks for the help Silvyre.