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

Arrow consumption script for macro

February 06 (8 years ago)

Edited February 06 (8 years ago)
This is for ad&d 2e, but can be adapted I think for any game macro.

This is what I have so far.
Arrows left: [[(@{arrows}-1)]]
Arrows left: [[(@{arrows}-2)]]
Arrows left: [[(@{arrows}-3)]]

Built a macro for PBS/R that fires (rolls) 3 atks at once. It counts down from total {arrows} attribute. Displays in chat perfectly. But I cant figure out how to get it to overwrite the 1st box of attribute when it is finished. EG: Subtract 3 arrows from x/36, and rewrite x value. Whenever I use it now, it counts down from 36, but doesn't overwrite the original number. Any ideas?

And yes, after I build this, for end of encounter will be creating a macro for arrow-recovery that needs to count the total consumed, and attempt to reclaim x value with con for save. vs crush (like gars arrows recovery, but intead of X rounds 1d20, it would look at total used in encounter and attempt to recover x consumed arrows, then add that back to 1st box of arrows attribute after rate of 1d4/rd recovery}.

February 06 (8 years ago)
Jakob
Sheet Author
API Scripter
You (or rather, the creator of the game) needs to be a Pro subscriber and install an API script to be able to modify attributes via macros. The canonical choices would be Ammo or ChatSetAttr.
February 06 (8 years ago)
Check out: https://wiki.roll20.net/API:Introduction
February 06 (8 years ago)
Ty Silvyre