Resource Tracking API and Macros

I'm new to using macros and still learning javascript. My DM is pro and has enabled ammo tracking in our game (5e dnd) and I'm trying to get as much use out of it as I can. My character is a drunk, with a constant supply of alcohol and constantly using it up. I've created a macro that allows me to make a Con save and display an emote every time I drink. I'm trying to set it up so that it subtracts 1 resource (Liquor) from my inventory as well, but cannot find any examples so far where someone has done something similar. is it possible? what am I doing wrong? much thanks.
1500293604
The Aaron
Pro
API Scripter
It would be possible, but would require the use of a particular API script which your GM may not have installed. Do you know which 5e Character Sheet your DM has specifically?
He's using the 5th edition OGL. I'm really new to this with no background in any programming languages and the same can be said of my DM. Roll20 has kinda been my inspiration to learn, so any advice is appreciated.
1500299646
The Aaron
Pro
API Scripter
Well, for what you need, Jakob's  CharSetAttr should do what you need. As for learning Javascript, there are some good resources mentioned here: •  https://app.roll20.net/forum/permalink/5283017/ And for the API, this is my suggested Beginner's Challengers: • https://app.roll20.net/forum/permalink/5061414/
I'll give this a try, thanks a lot! And thanks for the resources!