Okay: here you go
http://pastebin.com/aPEXFt4y
Copy paste this into a .js file, name it ProtagonistRequest and you should be good to go.
I also added a parameter that if not 0 will register the maximum amount of TP spent during the battle and put it inside game variable of id provided inside the parameter.
It works in my blank test project, tell me if you have any difficulties.
Terms of Use as follows (inside the plugin for reference):
// Free to use both commercially and non commercially. Free to edit and repost.
// Don't claim as your own, credits not required.