Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oldGameInterpreter_command111 = Game_Interpreter.prototype.command111;
- Game_Interpreter.prototype.command111 = function() {
- var result = false;
- if (this._params[0] == 2) {
- if (this._commonEventId > 0) {
- var key = ['common-event', this._commonEventId, this._params[1]];
- result = ($gameSelfSwitches.value(key) === (this._params[2] === 0));
- this._branch[this._indent] = result;
- if (this._branch[this._indent] === false) {
- this.skipBranch();
- }
- return true;
- }
- }
- return oldGameInterpreter_command111.apply(this, arguments);
- };
- var oldGameInterpreter_setupReservedCommonEvent = Game_Interpreter.prototype.setupReservedCommonEvent;
- Game_Interpreter.prototype.setupReservedCommonEvent = function() {
- if ($gameTemp.isCommonEventReserved()) {
- var event = $gameTemp.reservedCommonEvent();
- this.setup(event.list);
- this._commonEventId = event.id;
- $gameTemp.clearCommonEvent();
- return true;
- } else {
- return false;
- }
- };
- var oldGameInterpreter_clear = Game_Interpreter.prototype.clear;
- Game_Interpreter.prototype.clear = function() {
- oldGameInterpreter_clear.apply(this, arguments);
- this._commonEventId = 0;
- };
- var oldGameInterpreter_command123 = Game_Interpreter.prototype.command123;
- Game_Interpreter.prototype.command123 = function() {
- if (this._commonEventId > 0) {
- var key = ['common-event', this._commonEventId, this._params[0]];
- $gameSelfSwitches.setValue(key, this._params[1] === 0);
- return true;
- }
- return oldGameInterpreter_command123.apply(this, arguments);
- };
- var oldGameInterpreter_setupChild = Game_Interpreter.prototype.setupChild;
- Game_Interpreter.prototype.setupChild = function(list, eventId) {
- oldGameInterpreter_setupChild.apply(this, arguments);
- this._childInterpreter._commonEventId = eventId;
- };
- var oldGameCommonEvent_refresh = Game_CommonEvent.prototype.refresh;
- Game_CommonEvent.prototype.refresh = function() {
- oldGameCommonEvent_refresh.apply(this, arguments);
- if (this._interpreter) {
- this._interpreter._commonEventId = this._commonEventId;
- }
- };
- var oldGameCommonEvent_update = Game_CommonEvent.prototype.update;
- Game_CommonEvent.prototype.update = function() {
- if (this._interpreter) {
- if (!this._interpreter.isRunning()) {
- this._interpreter.setup(this.list());
- this._interpreter._commonEventId = this._commonEventId;
- }
- this._interpreter.update();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement