Good job.

It may require more looking into, because the Essential's wiki has a category for money, experience and prizes, but it's incomplete and red. I have a feeling it's a matter of just scripting "You got ___P from the Trainer!" and then using a script to simply add P to your character. But that is a little cumbersome. Also, for future reference, the only items trainers have been programmed to know how to use is basic Potions, stat Heal effects and "X" items. SO just use those. I'm not sure if Full Restore counts so we'll have to test and see.