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

Roll20 ammo tracker API, multiple ammos

Using Roll20's ammo tracker api, I'd like to be able to make one attack both spend multiple of one type of ammo, as well as spend multiple types of ammo. Is this possible? I know that inputting something like ?{query|type1,type1ammo|type2,type2ammo}, I can query the player and subtract the ammo they pick. I'm useless in Java however and wouldn't know where to start simply listing multiple ammo types or multiples of the same, any help would be appreciated! 
1539790684

Edited 1539796107
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Which ammo tracking script are you using? Is it The Aaron's ammo script? or a sheet's companion scipt? Another script? EDIT: If you are using a companion script, what sheet/system are you using?
Sorry i should have specified, I'm using the ammo tracker that comes with the 5th edition OGL by roll20 Companion. I've tried scavenging for a script that claims to do what I'm asking but I'm not savvy enough to make the OGL and other script cohabitate . I'm hoping it's just a syntax thing I have to learn with the current script?
1539802198
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok, the ogl companion script can't affect multiple ammo types and I'm not sure it can do multiple subtracts at once from a single ammo type. You could look at using The Aaron's ammo script (available from the one-click drop down). You'll need to add the api command to your attacks manually though by creating custom abilities on the attributes and abilities tab and entering something like the following: %{CHARNAME|repeating_attack_$0_attack} !ammo command goes here !ammo command for second ammo goes here
Oh this is great advice, I had looked at that one but stupidly didn't think that I could insert !ammo into macros. Thanks so much Scott C, ur a wizard