Question On Item Notetags

Just a quick question. I got how weapon/armor tags work for equipping/un-equipping items, but how do I read a notetag from an item specifically activated to doing a common event that runs a plugin command. Order below for reference:

1. Item (tag: <PokerChip: 1>)
2. Use Common Event: PokerChips2Cash
3. Common Event runs plugin command: [chips_cash]
3. Plugin command gets the meta data from item used and gives gold to party based on the value of the meta data
(in this case 1g, but if a different item was used <PokerChip: 500> then they get 500g and so on?)

EDIT: I suppose likewise can use the meta data for chip values when betting (if item.meta.PokerChip === X { itemId = Y } kind of thing if I need an itemID from it). I just don't want to have to make a single common event for each poker chip item basically.
check the help file - it explains the meta function that you'll need to access such data. no need to reinvent the wheel, just use the build-in method.
check the help file - it explains the meta function that you'll need to access such data. no need to reinvent the wheel, just use the build-in method.

I'm not trying to reinvent anything. I'm asking -HOW- to get item meta data when used and called from a common event.... specifically. Since the common event is shared between the different items. I need a way to differentiate between them or which one is called within the common event.
Since the common event is shared between the different items.
In that case you need to find a way to differentiate between items. If all items call the same common event then the common event itself cannot detect that difference.
you can either use the item damage formula to store a value into a variable, or have different items cause different states on the user (and have the common event check which state it is) and so on. But the common event cannot differentiate from where it is called without you adding something for this identification.
Alright hmm.. I like the variable idea.. I could alias the Scene_ItemBase.prototype.useItem = function() {} method to mark it before running its original methods ((e.g. having under my private methods a var this._itemId = 0; initialized. Then on the scene above, call my method to change its Id, and when the common event comes back around to calling my methods, I'll have an itemId to reference!

That might work... you're a genius. Will test it out, brb
Yay! That did it! I just put the value directly into the variable instead of the itemId (since using an item consumes it anyways, I don't want to rely on that method). Then simply the plugin command method gets the value (if > 0) gives party the gold amount, and resets the variable to 0 😀
Alright I'll report this thread answered now. Thanks Andar for the suggestion! 😀
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/question-on-item-notetags.109805/