
Ammo
Update v0.3.6 -- Made attribute lookups case insensitive. (Thanks Black Falcon!)Update v0.3.5 -- Added !wammo command which whispers the output instead of sending it to chat (Thanks Elena S.!)
Update v0.3.4 -- Added resource name and indexed repeating row support (thanks Elena S.!)
Commands
- !ammo <character_id> <attribute name> <amount> [resource name]
- character_id -- Usually gotten with @{character_id} while in the character sheet, or could be hard coded, or used with @{selected}
- attribute name -- This is the name of the attribute, no @{ }.
- amount -- usually -1, for using one charge. Can use inline rolls or roll queries to determine it.
- resource name -- Anything else on the command line is used as the name of the resource. Omitting it will use "ammo" instead.
- !wammo <character_id> <attribute name> <amount> [resource name]
- Identical to !ammo, but whispers output
Examples
Use one resource from the attribute arrows:!ammo @{character_id} arrows -1

The same thing, but call it an arrow:
!ammo @{character_id} arrows -1 arrow

Recover an arrow:
!ammo @{character_id} arrows 1 arrow

Multi-word resource types are also usable:
!ammo @{character_id} special_magic -3 Vince's mythical flying cat rocket

Inline rolls work:
!ammo @{character_id} variable_stuff -[[1d3]] variable shot

Now with support for repeating rows via index:
!ammo @{character_id} repeating_weapons_$3_weapon_ammo -1 @{repeating_weapons_$3_weapon_ammo_name}
Show the help
!ammo --help

GitHub: https://github.com/shdwjk/Roll20API/blob/master/Am...
Old Thread: https://app.roll20.net/forum/permalink/1034829/
If you use my scripts, want to contribute, and have the spare bucks to do so, go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free!
Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.