I could be misinterpretting the question, but I believe they want to know how to replicate making a plugin command.
I think he asked how to run a plugin command from JavaScript.
Anyway, this would not work. You can't call functions with 'prototype' in them without an object of that class.
Well, I tried and it worked.
If the function doesn't use this inside you can safely call it, in this particular case the original pluginCommand is just an empty function that does nothing, but of course, if any plugin that patch it uses `this` inside to call any Game_Interpreter methods it will not work.
There are 4 instance of Game_Interpreter in the code of which are 2 always available in $gameTroop or $gameMap, but for the same reason as above, if anyone patches those you cannot rely on it, also those variables are not available before
DataManager.createGameObjects, so the best way is, how you suggest, to create your own Game_Interpreter instance and call the method from there.
var myInterpreter = new Game_Interpreter()myInterpreter.pluginCommand('OpenNewWindow', ['http://www.google.com'])
You could run it fine from a script command as this.pluginCommand('OpenNewWindow', ['
http://www.google.com/])
Not sure what you mean by script command, are you talking about the one in the event page?
EDIT:
Just checked and that's what you mean
