查看: 2008|回复: 3

[有事请教] JS插件里的代码可以直接运行插件命令吗?

[复制链接]
梦石
0
星屑
1689
在线时间
934 小时
注册时间
2008-7-26
回帖
126
发表于 2021-12-14 19:52:56 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
             JS插件里的代码可以直接运行插件命令吗?


                // \nは改行マーク。\\c[1]は文章上の文字カラー変更の制御文字と同じです。(¥c[1])
                // ほかの制御文字もほとんど使うことができます(ウェイトなどは使えません)。
                this._helpText =
                    "Return to the title screen?\n\\c[1](Your progress will not be saved.)\\c[0]";
                this._yesMethod =  this.onTitleOk.bind(this);.bind(this);
                break;
            case '_comQLoad':
                this._helpText =
                    "Do you want to Quickload?\n\\c[1](Your progress will not be saved.)\\c[0]";
                this._yesMethod = this.onQloadOk.bind(this);
                break;
        }

    };

这个是一个JS插件里的代码,我想在                  

  "Return to the title screen?\n\\c[1](Your progress will not be saved.)\\c[0]";
                this._yesMethod =  this.onTitleOk.bind(this);.bind(this);
                break; 这里把this.onTitleOk.;改成可以运行YEP_X_MessageBacklog 插件命令OpenMessageBacklog,这样可能吗
梦石
0
星屑
3053
在线时间
318 小时
注册时间
2015-4-30
回帖
92
发表于 2021-12-14 22:02:15 | 显示全部楼层
会报错。
需要对插件指令做一下中转。
可以重写Game_Interpreter.prototype.command356
然后在需要触发的地方调用$gameMap._interpreter.command356();
回复

使用道具 举报

梦石
0
星屑
2866
在线时间
446 小时
注册时间
2016-9-26
回帖
1175
发表于 2021-12-14 22:59:41 | 显示全部楼层
若是能随意修改大佬们的插件,基本也都可以直接自己做插件了吧,俺寻思
回复

使用道具 举报

梦石
0
星屑
2866
在线时间
446 小时
注册时间
2016-9-26
回帖
1175
发表于 2021-12-14 23:01:50 | 显示全部楼层
\n是换行\\c其实就是字体换颜色\f是换页
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部