MV Sell items for profession exp

I am using Yanfly Shop Core and CGMV Professions, the professions plugin has a plugin command to increase the exp of a profession, how could I do an item that when sold increases the profession exp?
I'd check the shop core notetags for something that takes effect when an item is sold.

Or maybe there's a way to work it into a custom price notetag.

If there's nothing along those lines, maybe an evented shop scene using Yanfly common event menu.
Is it possible to run a common event in an eval?
I found this thread on calling a plugin command through a script call, which might be the best way to approach it.

Maybe you could simply make the item consumable and add the plugin command through a script call via a common event attached to the item. You could also add to the party's gold through the common event emulating selling the item.

You may even be able to tie it all together with the select item event command.
I am attaching a quick script here which turns on a switch when any item is sold. I hardcoded it to turn on Switch #20. Just replace that number with whatever switch # you decide to use.



Then you can have your conditional branch at the end of shop processing call the plugin command and turn off the above switch.
1688447856050.png

P.S. Let me know if you want this for a specific item only and/or if the # of items sold matters.
No, I think the whole sell for profession experience is bogus, I'll just scrach that.
I am using a crafting plugin that can run an eval as a result of crafting so I was thinking using that for running the plugin command but I don't see how, I could just use CGMV Crafting system but the other Crafting plugin looks better. what to do
Does the crafting plugin have script calls to increase the exp? It would be a bit easier to use those in an eval.
The CGMV Crafting plugin has direct BUT strict compatibility with CGMV professions, means that there is only categories that have the same name as professions, so there would be no problem but I wanted to use the YR_Item Crafting that doesn't have that compatibility, has multiple categories and subcategories while also letting me choose how many items I can craft, but the only way I see to call for exp increase in a profession is with that plugin command, and with the YR_Item Craft I only see the notetag Result eval or Result Variable that could do something but I dont know how to.

This is YR_Item Craft
https://www.dropbox.com/s/5kzfxergt63aono/YR_ItemCrafting.js?dl=0

Original thread: https://forums.rpgmakerweb.com/threads/sell-items-for-profession-exp.158940/