@ramza
Can u show an example?
Can u show an example?
Window_ScrollText.prototype.refresh = function () {
var textState = { index: 0 };
textState.text = this.convertEscapeCharacters(this._text);
this.resetFontSettings();
this._allTextHeight = this.calcTextHeight(textState, true);
this.createContents();
this.origin.y = -this.height;
var text = this._text;
var tw = this.textWidthEx(text);
var textX = (Graphics.boxWidth / 2) - (tw / 2);
this.drawTextEx(text, textX, 1);
};
Window_ScrollText.prototype.refresh = function () {
var textState = { index: 0 };
textState.text = this.convertEscapeCharacters(this._text);
this.resetFontSettings();
this._allTextHeight = this.calcTextHeight(textState, true);
this.createContents();
this.origin.y = -this.height;
var text = this._text;
var tw = this.textWidthEx(text);
var textX = 168 // (Graphics.boxWidth / 2) - (tw / 2);
this.drawTextEx(text, textX, 1);
};
Scene_Map.prototype.createScrollTextWindow = function() {
this._scrollTextWindow = new Window_ScrollText();
this._scrollTextWindow.x = 168;
this._scrollTextWindow.width = 816;
this.addWindow(this._scrollTextWindow);
};

Window_Command.prototype.windowHeight = function() {
return 3000;
};
but nothing changes and the window stays on the screen. Any suggestions would be helpful. The full plugin is here.
/*
* clockoutLockPickWindow.js
* 2017-06-01
* Copyright (c) 2017 Dominic Herrera
* License: Do anything you want.
* Disclaimer: NO WARRANTY.
*/
/*:
* @plugindesc Show lock pick count window via plugin command.
* @author Clock Out
*
* @help
* SYNOPSIS
* Toggle the lock pick count window.
*
* SYNTAX
* LP <ON|OFF>
*
* EXAMPLE
* LP ON
*/
var clockout = clockout || {};
clockout.window = clockout.window || {};
/**
* Create a window to track a $gameVariable value.
* @returns {object} The new window.
*/
clockout.window.lockPickWindow = function () {
"use strict";
var config = {
name: "Lock Pick",
numLines: 1,
variableId: 94,
width: 220,
x: 530,
y: 0
};
var window = Object.create(Window_Base.prototype);
window.refresh = function () {
var x;
window.contents.clear();
x = window.drawTextEx(
config.name,
0,
0,
window.windowWidth(),
"left"
);
window.drawText(
":" + $gameVariables.value(config.variableId),
x + 15,
0,
window.textWidth("000"),
"right"
);
};
window.initialize = (function (alias) {
return function () {
alias.apply(this, arguments);
this.openness = 0;
};
}(window.initialize));
window.update = (function (alias) {
return function () {
alias.call(this);
if (this.isOpen()) {
window.refresh();
}
};
}(window.update));
window.windowHeight = function () {
return window.fittingHeight(config.numLines);
};
window.windowWidth = function () {
return config.width;
};
// Setup the window.
window.initialize(
config.x,
config.y,
window.windowWidth(),
window.windowHeight()
);
window.refresh();
return window;
};
// Alias pluginCommand.
(function (alias) {
"use strict";
function pluginCommand(command, args) {
var isLoaded = SceneManager._scene.hasOwnProperty("lockPickWindow");
var window;
alias.call(this, command, args);
if (command !== "LP") {
return;
}
if (isLoaded === false) {
window = clockout.window.lockPickWindow();
SceneManager._scene.addWindow(window);
SceneManager._scene.lockPickWindow = window;
}
switch (args[0]) {
case "ON":
SceneManager._scene.lockPickWindow.open();
break;
case "OFF":
SceneManager._scene.lockPickWindow.close();
break;
}
}
Game_Interpreter.prototype.pluginCommand = pluginCommand;
}(Game_Interpreter.prototype.pluginCommand));
Original thread: https://forums.rpgmakerweb.com/threads/javascript-questions-that-dont-deserve-their-own-thread.46341/