it sounds like you need an event bound item, like the guards pass in the legend of Zelda that gets you the Hylean Shield cheaper than the original price, this would probably require a script that has a variable system, where you add a script note to the item in the database and it activates the script
but don't ask me to make it because i cant yet. i'm still waiting for the simply ruby tutorial to finish up, try asking modern algebra, he has some really good scripts and maybe already has one that's close enough to what you need.