Problem about plugin command

How can I use plugin command through script. (I am not creating plugin)

I want something like this
$gameMessage.add("Show Text Script Call");
$gameParty.gainGold(n);
$gameParty.removeActor(n);
that is using event command with script.
And this time I want to use plugin command.
(I am not creating plugin)

Thanks for reading my question.
If you're not creating a plugin, then why not use a plugin command separately from that script?
Using plugin commands through script is possible, but I don't really like it. However, you can find it
Spoiler: here
Those things are called via script because they are script commands. They are not plugin commands. There is no plugin to do what those script calls do.

You only need to use a plugin command to run functionality that has been introduced by the plugins you've added to your project.
If you're not creating a plugin, then why not use a plugin command separately from that script?
Using plugin commands through script is possible, but I don't really like it. However, you can find it
Spoiler: here


Well I just want to know how to use it because I can do the other event command with script but I can't do it with plugin command.
So I was wondering if I can do it with plugin command.
After reading, I still failed to do it.

I guess this is for plugin

var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
aliasPluginCommand.call(this, command, args);
if (command === 'plugincommandtextname') {
dostuff(args);
}
};

right?
Can you tell me how to use it?
I just change 'plugincommandtextname' to a plugin command but I fail.
If it's ok, could you give me an example.

Maybe use
http://sumrndm.site/camera-core/
the roomin plugin command for example.
ZoomIn [scale] [duration]

Really, really thank you for your reply.
I know I may be an idiot, but I'll try to learn.
Thank you, thank you really much.
If you use the ZoomIn [scale] [duration] plugin command, you simply enter it to Plugin command, there is no magic in that. The functions inside the plugin will take care of the rest. If you wish to use a plugin command through script call, I have posted the script calls list earlier.

Btw. The function aliasPluginCommand is an universal thing for all plugin commands inside the plugin, so editing it won't do any good.
You said you are not writing a plugin. But the code you've put above is writing a plugin.

You do not change the code in the rpg_objects.js file. You ADD a NEW plugin and add your functionality to that.

There are hundreds of examples of plugins. Find a very, very simple one that has plugin commands, and see how it does it.


The commands you put in your first post, you CANNOT run through plugin commands, unless you WRITE a plugin to accept those codes and process them. Plugin commands are useless unless you have a plugin that processes them.
@Shaz I think you misunderstand.
The OP isn't writing a plugin.
They are using a bunch of script calls and want to execute a plugin command after them. However, since the Plugin command didn't work through the button, they asked how to do it via script.
Ah, that makes sense. The OP should probably state what the plugin is, and provide a link. If the plugin command didn't work, then it either wasn't written correctly, or there's a problem with the plugin itself - either not installed/activated properly, wrong version, or maybe a compatibility issue.

I can't figure out if the camera zoom is the plugin he/she is trying to use or not, due to the "for example". All those commands are event commands - none of them need to be done as script calls.

Better to try and figure out the problem than come up with a workaround. If the plugin isn't installed properly or there are compatibility issues, a script call isn't going to work either.
Well
open

My issue is
Plugin I am using work well with plugin command in event command page 3.
I was wondering using event command page 3 the last one "script"
Can I use this to call plugin command or not?
https://drive.google.com/open?id=0B0krCihZd3ovRkNKM0pBLXVMWkE
No

There are two different event commands because they do different things.
Theoretically you could do the same effect with a script command, but that will require you to specifically make a script call for each different plugin.

It's simply too mich of a hassle to try to do this by script call unless the Plugin writer already created script functions for this - some scripters do that, but only a minority.
OK I got it.
I'll just use plugin command not using script.
Thank you all for reply.

Original thread: https://forums.rpgmakerweb.com/threads/problem-about-plugin-command.83344/