The only thing missing from what I provided is correct declaration of variables, as I just wrote out an idealization in notepad, not actual code. I would provide more insight, but I don't have a NR-Core source to skim through.
For item usage, I would start looking at the /give admin command. This should present to you how a given item is declared, and placed into a container, being the player's inventory.
Creating a container entity should be pretty simple after looking at how it's done when a player drops an item, or looking into how loot is handled. Initialize the entity, since it's a container you can modify the slots, set position to player's, and enter world.
You would then combine your new knowledge into the custom activate effect for your consumable. Granted that you already know how to create the item with the correct activate tag.
However, you can take a relatively simple approach, much like DECA has done, and instead have your consumable spawn an enemy that you kill for the loot. You would then use the "OnlyOne" loot behavior, with a list of items at 100% drop rate, for one item to be rewarded. To have more common items, just have copies of items to make them a higher chance to be selected.
Code:
new Threshold(0.01,
new OnlyOne(
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Attack", 1),
new ItemLoot("Potion of Mana", 1),
new ItemLoot("Potion of Mana", 1),
new ItemLoot("Potion of Mana", 1),
new ItemLoot("Potion of Life", 1),
)
)
Att 60%, Mana 30%, Life 10%, only one reward.