﻿﻿﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Ultima Forum - JS]]></title>
		<link>https://forum.ultimateam.pl/</link>
		<description><![CDATA[Ultima Forum - https://forum.ultimateam.pl]]></description>
		<pubDate>Tue, 28 Apr 2026 06:23:36 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Przybliżenie Mapy]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Przybli%C5%BCenie-Mapy</link>
			<pubDate>Sun, 14 Mar 2021 12:15:14 +0100</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Przybli%C5%BCenie-Mapy</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ MBS_MapZoom ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na przybliżanie i oddalanie ekranu (mapy). Dodatkowo, można określić które obrazki z folderu "img/pictures" są tym objęte.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Masked<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
Yoroiookami<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// MBS - Przybliżenie Mapy / Map Zoom (v1.3.5)<br />
//-----------------------------------------------------------------------------<br />
// por Masked<br />
//=============================================================================<br />
//-----------------------------------------------------------------------------<br />
// Specyfikacje pluginu (Nie modyfikować!)<br />
//<br />
/*:<br />
 *<br />
 * @author Masked<br />
 * @plugindesc Umożliwia przybliżanie i oddalanie ekranu.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
 * <br />
 * &lt;MBS MapZoom&gt;<br />
 * @help<br />
 * ===========================================================================<br />
 * Wstęp<br />
 * ===========================================================================<br />
 * Ten skrypt pozwala na przybliżanie i oddalanie ekranu na mapie<br />
 *<br />
 * ===========================================================================<br />
 * Sposób użycia<br />
 * ===========================================================================<br />
 * Można zmienić przybliżenie za pomocą takiego Plugin Command:<br />
 * <br />
 * MapZoom set x [y [duration n]]<br />
 * <br />
 * Wystarczy zamienić 'x' oraz 'y' na wybraną wartość przybliżenia (float).<br />
 * Parametr 'y' jest zupełnie opcjonalny, jeżeli nie zostanie użyty, skrypt <br />
 * założy że 'y' jest równy 'x'.<br />
 * Opcjonalnie można określić czas przybliżenia jako ilość klatek przez <br />
 * którą ma to trwać.<br />
 * Jeżeli czas trwania przejścia nie zostanie wpisany, skrypt automatycznie <br />
 * założy, że ma to być 60 klatek.<br />
 * Wartość '2.0' przybliży ekran dwukrotnie, a '0.5' oddali go dwukrotnie.<br />
 * <br />
 * Przykład:<br />
 * MapZoom set 0.5<br />
 * MapZoom set 2.0 duration 120<br />
 * MapZoom set 2.0 1.5 duration 20<br />
 *<br />
 * Jeżeli przybliżenie ma być skupione na dokładnym punkcie X i Y <br />
 * lub na zdarzeniu, należy użyć tej komendy:<br />
 * MapZoom center x y<br />
 * MapZoom center event id<br />
 *<br />
 * Przykład:<br />
 * MapZoom center 5 7<br />
 * MapZoom center event 3<br />
 *<br />
 * Aby skupić się na graczu, wystarczy użyć resetu:<br />
 * MapZoom center reset<br />
 *<br />
 * A żeby zresetować przybliżenie, można użyć:<br />
 * MapZoom reset [d]<br />
 *<br />
 * Wystarczy zamienić [d] na ilość klatek.<br />
 * Przykład:<br />
 * MapZoom reset 30<br />
 *<br />
 * Można też przybliżyć wybrane obrazki razem z resztą mapy, <br />
 * dodając "[Zoom]" do ich nazwy.<br />
 * Przykład:<br />
 * "img/pictures/PrzykładowyObrazek1 [Zoom].png"<br />
 *<br />
 * ===========================================================================<br />
 * Kredytki / Credits<br />
 * ===========================================================================<br />
 * - Masked, za stworzenie skryptu.<br />
 * - Yoroiookami, za tłumaczenie.<br />
 *<br />
 * @param Reset przy zmianie mapy<br />
 * @desc Jeżeli przybliżenie nie ma być resetowane przy zmianie mapy, należy <br />
 * przestawić ten parametr na "false".<br />
 * @default true<br />
 *<br />
 * @param Domyślne przybliżenie<br />
 * @desc Domyślna wartość przybliżenia obejmująca wszystkie mapy.<br />
 * @default 1.0<br />
 *<br />
 */<br />
/*:pt<br />
 */<br />
<br />
var Imported = Imported || {};<br />
<br />
var MBS = MBS || {};<br />
MBS.MapZoom = {};<br />
<br />
"use strict";<br />
<br />
(function (&#36;) {<br />
<br />
&nbsp;&nbsp;&#36;.Parameters = &#36;plugins.filter(function(p) {return p.description.contains('&lt;MBS MapZoom&gt;');})[0].parameters;<br />
&nbsp;&nbsp;&#36;.Param = &#36;.Param || {};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Settings<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;// Flag to enable/disable resetting the zoom on map change<br />
&nbsp;&nbsp;&#36;.Param.resetOnMapChange = (&#36;.Parameters["Reset przy zmianie mapy"].toLowerCase() === "true");<br />
<br />
&nbsp;&nbsp;// Default zoom ratio<br />
&nbsp;&nbsp;&#36;.Param.defaultZoom = Number(&#36;.Parameters["Domyślne przybliżenie"]);<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Map<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// The game map object. Here the main changes for controlling the map zoom were<br />
&nbsp;&nbsp;// made.<br />
<br />
&nbsp;&nbsp;// Aliases<br />
&nbsp;&nbsp;var _GameMap_initialize = Game_Map.prototype.initialize;<br />
&nbsp;&nbsp;var _GameMap_setup = Game_Map.prototype.setup;<br />
&nbsp;&nbsp;var _GameMap_update = Game_Map.prototype.update;<br />
<br />
&nbsp;&nbsp;// Object initialization. Here the zoom-related variables are created.<br />
&nbsp;&nbsp;Game_Map.prototype.initialize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_initialize.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom = this._destZoom || new PIXI.Point(0, 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = this._zoomDuration || 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoom = this._zoom || new PIXI.Point(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = null;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Map setup. This will reset the map zoom if 'Reset on map change' is true.<br />
&nbsp;&nbsp;Game_Map.prototype.setup = function(mapId) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_setup.call(this, mapId);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;.Param.resetOnMapChange)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoom = new PIXI.Point(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Map update. This method controls the gradual zoom when a duration <br />
&nbsp;&nbsp;// is specified.<br />
&nbsp;&nbsp;Game_Map.prototype.update = function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_update.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._zoomDuration &gt; this._zoomTime) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.zoom.x += this._spdZoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.zoom.y += this._spdZoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime++;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.onZoomChange();<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else if (this._zoomTime &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._spdZoom = new Point(0, 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Sets the game map zoom ratio.<br />
&nbsp;&nbsp; * @param {Number} x The horizontal zoom ratio<br />
&nbsp;&nbsp; * @param {Number} y The vertical zoom ratio<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.setZoom = function(x, y, duration) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration = duration || 60;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration = Math.round(duration &lt;= 0 ? 1 : duration) * 1.0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom.x = this._destZoom.y = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom.y = y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._spdZoom = new PIXI.Point((this._destZoom.x - this._zoom.x) / duration, (this._destZoom.y - this._zoom.y) / duration);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = duration;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Sets the game map zoom origin.<br />
&nbsp;&nbsp; * @param {mixed} a Either a X coordinate or a Game_Character to center the zoom.<br />
&nbsp;&nbsp; * @param {Number} (Optional) A Y coordinate to center the zoom.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.setZoomCenter = function(a, b) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (b) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = new PIXI.Point(a, b);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (a) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = a;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = null;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Function called when the map zoom changes.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.onZoomChange = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;gamePlayer.center((this._zoomCenter || &#36;gamePlayer)._realX, (this._zoomCenter || &#36;gamePlayer)._realY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Gets a map coordinate from a screen coordinate.<br />
&nbsp;&nbsp; * @param {Number} x The screen coordinate<br />
&nbsp;&nbsp; * @return The X position of the tile below the screen X given.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.canvasToMapX = function(x) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileWidth = this.tileWidth() * this.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var originX = this.displayX() * tileWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var mapX = Math.floor((originX + x) / tileWidth);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this.roundX(mapX);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Gets a map coordinate from a screen coordinate.<br />
&nbsp;&nbsp; * @param {Number} y The screen coordinate<br />
&nbsp;&nbsp; * @return The Y position of the tile below the screen Y given.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.canvasToMapY = function(y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileHeight = this.tileHeight() * this.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var originY = this.displayY() * tileHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var mapY = Math.floor((originY + y) / tileHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this.roundY(mapY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Zoom property<br />
&nbsp;&nbsp;Game_Map.prototype.__defineGetter__('zoom', function() { return this._zoom; });<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Player<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Player character class. Changed to fix the screen center/scroll while <br />
&nbsp;&nbsp;// zoomming.<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _GamePlayer_centerX = Game_Player.prototype.centerX;<br />
&nbsp;&nbsp;var _GamePlayer_centerY = Game_Player.prototype.centerY;<br />
&nbsp;&nbsp;var _GamePlayer_updateScroll = Game_Player.prototype.updateScroll;<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.centerX = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return _GamePlayer_centerX.call(this) / &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.centerY = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return _GamePlayer_centerY.call(this) / &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.updateScroll = function(lastScrolledX, lastScrolledY) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!&#36;gameMap._zoomCenter || &#36;gameMap._zoomCenter === this) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GamePlayer_updateScroll.apply(this, arguments);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Event<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Game events class. Changed it to center the screen into the event when it's <br />
&nbsp;&nbsp;// given as the zoomCenter for &#36;gameMap.<br />
<br />
&nbsp;&nbsp;var Game_Event_update = Game_Event.prototype.update;<br />
<br />
&nbsp;&nbsp;// Copies the Game_Player scroll update function into the event class<br />
&nbsp;&nbsp;Game_Event.prototype.centerX = Game_Player.prototype.centerX;<br />
&nbsp;&nbsp;Game_Event.prototype.centerY = Game_Player.prototype.centerY;<br />
&nbsp;&nbsp;Game_Event.prototype.updateScroll = Game_Player.prototype.updateScroll;<br />
<br />
&nbsp;&nbsp;Game_Event.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var lastScrolledX = this.scrolledX();<br />
&nbsp;&nbsp;&nbsp;&nbsp;var lastScrolledY = this.scrolledY();<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event_update.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this === &#36;gameMap._zoomCenter)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.updateScroll(lastScrolledX, lastScrolledY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Spriteset_Map<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Map spriteset. This is where the real zooming happens.<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _SpritesetMap_createLowLayer = Spriteset_Map.prototype.createLowerLayer;<br />
&nbsp;&nbsp;var _SpritesetMap_update = Spriteset_Map.prototype.update;<br />
<br />
&nbsp;&nbsp;Spriteset_Map.prototype.createLowerLayer = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_SpritesetMap_createLowLayer.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;gameMap.zoom.x, &#36;gameMap.zoom.y, 1);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Spriteset_Map.prototype.updatePosition = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var scale = &#36;gameMap.zoom;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var screen = &#36;gameScreen;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.x = Math.round(-&#36;gameMap.zoom.x * (scale.x - 1));<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.y = Math.round(-&#36;gameMap.zoom.y * (scale.x - 1));<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.x += Math.round(screen.shake());<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this.scale.x !== scale.x || this.scale.y !== scale.y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var destScale = &#36;gameMap._destZoom;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sw = Graphics.width / destScale.x + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sh = Graphics.height / destScale.y + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((this.scale.x &gt; destScale.x || this.scale.y &gt; destScale.y) &amp;&amp; !(this.width === sw &amp;&amp; this.height === sh)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//var w = &#36;gameMap.width() * &#36;gameMap.tileWidth() + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//var h = &#36;gameMap.height() * &#36;gameMap.tileHeight() + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var r = sw &gt; this._tilemap.width || sh &gt; this._tilemap.height;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (r) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.width = sw;//Math.max(w, sw);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.height = sh;//Math.max(h, sh);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.refresh();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.scale = new PIXI.Point(scale.x, scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._pictureContainer.scale = new PIXI.Point(1.0 / scale.x,&nbsp;&nbsp;1.0 / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._weather.scale = new PIXI.Point(1.0 / scale.x,&nbsp;&nbsp;1.0 / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._parallax.move(this._parallax.x, this._parallax.y, Graphics.width / scale.x, Graphics.height / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Tilemap<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;Tilemap.prototype._createLayers = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var width = this._width;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var height = this._height;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var margin = this._margin;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileCols = Math.ceil(width / this._tileWidth) + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileRows = Math.ceil(height / this._tileHeight) + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var layerWidth = tileCols * this._tileWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var layerHeight = tileRows * this._tileHeight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._lowerBitmap) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap.clear();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap.resize(layerWidth, layerHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap = new Bitmap(layerWidth, layerHeight);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._upperBitmap) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap.clear();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap.resize(layerWidth, layerHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap = new Bitmap(layerWidth, layerHeight);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._layerWidth = layerWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._layerHeight = layerHeight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer = this._lowerLayer || new Sprite();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.removeChildren();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.move(-margin, -margin, width, height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.z = 0;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer = this._upperLayer || new Sprite();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.removeChildren();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.move(-margin, -margin, width, height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.z = 4;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; 4; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.addChild(new Sprite(this._lowerBitmap));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.addChild(new Sprite(this._upperBitmap));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._lowerLayer);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._upperLayer);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Picture<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Game pictures object. Changed to apply zoom on images marked with [Zoom].<br />
<br />
&nbsp;&nbsp;var _GamePicture_update = Game_Picture.prototype.update;<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GamePicture_update.apply(this, arguments)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this.mapZoom()) this.updateZoom();<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.updateZoom = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._duration &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var d = this._duration;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleX = (this._scaleX&nbsp;&nbsp;* (d - 1) + this._targetScaleX)&nbsp;&nbsp;/ d * &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleY = (this._scaleX&nbsp;&nbsp;* (d - 1) + this._targetScaleX)&nbsp;&nbsp;/ d * &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleX = this._targetScaleX * &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleY = this._targetScaleY * &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.mapZoom = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return !!this.name().match(/&#92;[zoom&#92;]/i);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Map<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;Game_Map.prototype.screenTileX = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return Graphics.width / this.tileWidth() / &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Map.prototype.screenTileY = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return Graphics.height / this.tileHeight() / &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Plugin command<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _GameInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;<br />
<br />
&nbsp;&nbsp;Game_Interpreter.prototype.pluginCommand = function (command, args) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GameInterpreter_pluginCommand.call(this, command, args);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (command == "MapZoom") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[0] == "set") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[2]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[2] == "duration") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[3]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[1]) * &#36;.Param.defaultZoom, Number(args[3]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[3] == "duration") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[4]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[2]) * &#36;.Param.defaultZoom, Number(args[4]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[2]) * &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[0] == "reset") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom, Number(args[1]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[0] == "center") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1] == "event") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ev = &#36;gameMap.event(Number(args[2]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (ev)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter(ev);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[1] == "reset") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter(Number(args[1]), Number(args[2]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;gameMap._destZoom.x, &#36;gameMap._destZoom.y, &#36;gameMap._zoomDuration - &#36;gameMap._spdZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
})(MBS.MapZoom);<br />
<br />
if (Imported["MVCommons"]) {<br />
&nbsp;&nbsp;PluginManager.register("MBS_MapZoom", 1.3, "Makes it possible to zoom in and out the game map whenever you want", {&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email: "masked.rpg@gmail.com",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: "Masked", <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;website: "N/A"<br />
&nbsp;&nbsp;&nbsp;&nbsp;}, "2016-07-26");<br />
}</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/HeBCYDH.png" border="0" alt="[Obrazek: HeBCYDH.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=12" target="_blank">MBS_MapZoom.js</a> (Rozmiar: 15.82 KB / Pobrań: 1)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ MBS_MapZoom ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na przybliżanie i oddalanie ekranu (mapy). Dodatkowo, można określić które obrazki z folderu "img/pictures" są tym objęte.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Masked<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
Yoroiookami<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// MBS - Przybliżenie Mapy / Map Zoom (v1.3.5)<br />
//-----------------------------------------------------------------------------<br />
// por Masked<br />
//=============================================================================<br />
//-----------------------------------------------------------------------------<br />
// Specyfikacje pluginu (Nie modyfikować!)<br />
//<br />
/*:<br />
 *<br />
 * @author Masked<br />
 * @plugindesc Umożliwia przybliżanie i oddalanie ekranu.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
 * <br />
 * &lt;MBS MapZoom&gt;<br />
 * @help<br />
 * ===========================================================================<br />
 * Wstęp<br />
 * ===========================================================================<br />
 * Ten skrypt pozwala na przybliżanie i oddalanie ekranu na mapie<br />
 *<br />
 * ===========================================================================<br />
 * Sposób użycia<br />
 * ===========================================================================<br />
 * Można zmienić przybliżenie za pomocą takiego Plugin Command:<br />
 * <br />
 * MapZoom set x [y [duration n]]<br />
 * <br />
 * Wystarczy zamienić 'x' oraz 'y' na wybraną wartość przybliżenia (float).<br />
 * Parametr 'y' jest zupełnie opcjonalny, jeżeli nie zostanie użyty, skrypt <br />
 * założy że 'y' jest równy 'x'.<br />
 * Opcjonalnie można określić czas przybliżenia jako ilość klatek przez <br />
 * którą ma to trwać.<br />
 * Jeżeli czas trwania przejścia nie zostanie wpisany, skrypt automatycznie <br />
 * założy, że ma to być 60 klatek.<br />
 * Wartość '2.0' przybliży ekran dwukrotnie, a '0.5' oddali go dwukrotnie.<br />
 * <br />
 * Przykład:<br />
 * MapZoom set 0.5<br />
 * MapZoom set 2.0 duration 120<br />
 * MapZoom set 2.0 1.5 duration 20<br />
 *<br />
 * Jeżeli przybliżenie ma być skupione na dokładnym punkcie X i Y <br />
 * lub na zdarzeniu, należy użyć tej komendy:<br />
 * MapZoom center x y<br />
 * MapZoom center event id<br />
 *<br />
 * Przykład:<br />
 * MapZoom center 5 7<br />
 * MapZoom center event 3<br />
 *<br />
 * Aby skupić się na graczu, wystarczy użyć resetu:<br />
 * MapZoom center reset<br />
 *<br />
 * A żeby zresetować przybliżenie, można użyć:<br />
 * MapZoom reset [d]<br />
 *<br />
 * Wystarczy zamienić [d] na ilość klatek.<br />
 * Przykład:<br />
 * MapZoom reset 30<br />
 *<br />
 * Można też przybliżyć wybrane obrazki razem z resztą mapy, <br />
 * dodając "[Zoom]" do ich nazwy.<br />
 * Przykład:<br />
 * "img/pictures/PrzykładowyObrazek1 [Zoom].png"<br />
 *<br />
 * ===========================================================================<br />
 * Kredytki / Credits<br />
 * ===========================================================================<br />
 * - Masked, za stworzenie skryptu.<br />
 * - Yoroiookami, za tłumaczenie.<br />
 *<br />
 * @param Reset przy zmianie mapy<br />
 * @desc Jeżeli przybliżenie nie ma być resetowane przy zmianie mapy, należy <br />
 * przestawić ten parametr na "false".<br />
 * @default true<br />
 *<br />
 * @param Domyślne przybliżenie<br />
 * @desc Domyślna wartość przybliżenia obejmująca wszystkie mapy.<br />
 * @default 1.0<br />
 *<br />
 */<br />
/*:pt<br />
 */<br />
<br />
var Imported = Imported || {};<br />
<br />
var MBS = MBS || {};<br />
MBS.MapZoom = {};<br />
<br />
"use strict";<br />
<br />
(function (&#36;) {<br />
<br />
&nbsp;&nbsp;&#36;.Parameters = &#36;plugins.filter(function(p) {return p.description.contains('&lt;MBS MapZoom&gt;');})[0].parameters;<br />
&nbsp;&nbsp;&#36;.Param = &#36;.Param || {};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Settings<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;// Flag to enable/disable resetting the zoom on map change<br />
&nbsp;&nbsp;&#36;.Param.resetOnMapChange = (&#36;.Parameters["Reset przy zmianie mapy"].toLowerCase() === "true");<br />
<br />
&nbsp;&nbsp;// Default zoom ratio<br />
&nbsp;&nbsp;&#36;.Param.defaultZoom = Number(&#36;.Parameters["Domyślne przybliżenie"]);<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Map<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// The game map object. Here the main changes for controlling the map zoom were<br />
&nbsp;&nbsp;// made.<br />
<br />
&nbsp;&nbsp;// Aliases<br />
&nbsp;&nbsp;var _GameMap_initialize = Game_Map.prototype.initialize;<br />
&nbsp;&nbsp;var _GameMap_setup = Game_Map.prototype.setup;<br />
&nbsp;&nbsp;var _GameMap_update = Game_Map.prototype.update;<br />
<br />
&nbsp;&nbsp;// Object initialization. Here the zoom-related variables are created.<br />
&nbsp;&nbsp;Game_Map.prototype.initialize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_initialize.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom = this._destZoom || new PIXI.Point(0, 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = this._zoomDuration || 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoom = this._zoom || new PIXI.Point(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = null;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Map setup. This will reset the map zoom if 'Reset on map change' is true.<br />
&nbsp;&nbsp;Game_Map.prototype.setup = function(mapId) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_setup.call(this, mapId);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;.Param.resetOnMapChange)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoom = new PIXI.Point(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Map update. This method controls the gradual zoom when a duration <br />
&nbsp;&nbsp;// is specified.<br />
&nbsp;&nbsp;Game_Map.prototype.update = function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GameMap_update.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._zoomDuration &gt; this._zoomTime) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.zoom.x += this._spdZoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.zoom.y += this._spdZoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime++;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.onZoomChange();<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else if (this._zoomTime &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._spdZoom = new Point(0, 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Sets the game map zoom ratio.<br />
&nbsp;&nbsp; * @param {Number} x The horizontal zoom ratio<br />
&nbsp;&nbsp; * @param {Number} y The vertical zoom ratio<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.setZoom = function(x, y, duration) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration = duration || 60;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;duration = Math.round(duration &lt;= 0 ? 1 : duration) * 1.0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom.x = this._destZoom.y = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._destZoom.y = y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._spdZoom = new PIXI.Point((this._destZoom.x - this._zoom.x) / duration, (this._destZoom.y - this._zoom.y) / duration);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomDuration = duration;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._zoomTime = 0;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Sets the game map zoom origin.<br />
&nbsp;&nbsp; * @param {mixed} a Either a X coordinate or a Game_Character to center the zoom.<br />
&nbsp;&nbsp; * @param {Number} (Optional) A Y coordinate to center the zoom.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.setZoomCenter = function(a, b) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (b) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = new PIXI.Point(a, b);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (a) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = a;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._zoomCenter = null;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Function called when the map zoom changes.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.onZoomChange = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;gamePlayer.center((this._zoomCenter || &#36;gamePlayer)._realX, (this._zoomCenter || &#36;gamePlayer)._realY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Gets a map coordinate from a screen coordinate.<br />
&nbsp;&nbsp; * @param {Number} x The screen coordinate<br />
&nbsp;&nbsp; * @return The X position of the tile below the screen X given.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.canvasToMapX = function(x) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileWidth = this.tileWidth() * this.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var originX = this.displayX() * tileWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var mapX = Math.floor((originX + x) / tileWidth);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this.roundX(mapX);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/**<br />
&nbsp;&nbsp; * Gets a map coordinate from a screen coordinate.<br />
&nbsp;&nbsp; * @param {Number} y The screen coordinate<br />
&nbsp;&nbsp; * @return The Y position of the tile below the screen Y given.<br />
&nbsp;&nbsp; */<br />
&nbsp;&nbsp;Game_Map.prototype.canvasToMapY = function(y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileHeight = this.tileHeight() * this.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var originY = this.displayY() * tileHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var mapY = Math.floor((originY + y) / tileHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this.roundY(mapY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;// Zoom property<br />
&nbsp;&nbsp;Game_Map.prototype.__defineGetter__('zoom', function() { return this._zoom; });<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Player<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Player character class. Changed to fix the screen center/scroll while <br />
&nbsp;&nbsp;// zoomming.<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _GamePlayer_centerX = Game_Player.prototype.centerX;<br />
&nbsp;&nbsp;var _GamePlayer_centerY = Game_Player.prototype.centerY;<br />
&nbsp;&nbsp;var _GamePlayer_updateScroll = Game_Player.prototype.updateScroll;<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.centerX = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return _GamePlayer_centerX.call(this) / &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.centerY = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return _GamePlayer_centerY.call(this) / &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Player.prototype.updateScroll = function(lastScrolledX, lastScrolledY) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!&#36;gameMap._zoomCenter || &#36;gameMap._zoomCenter === this) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GamePlayer_updateScroll.apply(this, arguments);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Event<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Game events class. Changed it to center the screen into the event when it's <br />
&nbsp;&nbsp;// given as the zoomCenter for &#36;gameMap.<br />
<br />
&nbsp;&nbsp;var Game_Event_update = Game_Event.prototype.update;<br />
<br />
&nbsp;&nbsp;// Copies the Game_Player scroll update function into the event class<br />
&nbsp;&nbsp;Game_Event.prototype.centerX = Game_Player.prototype.centerX;<br />
&nbsp;&nbsp;Game_Event.prototype.centerY = Game_Player.prototype.centerY;<br />
&nbsp;&nbsp;Game_Event.prototype.updateScroll = Game_Player.prototype.updateScroll;<br />
<br />
&nbsp;&nbsp;Game_Event.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var lastScrolledX = this.scrolledX();<br />
&nbsp;&nbsp;&nbsp;&nbsp;var lastScrolledY = this.scrolledY();<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event_update.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this === &#36;gameMap._zoomCenter)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.updateScroll(lastScrolledX, lastScrolledY);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Spriteset_Map<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Map spriteset. This is where the real zooming happens.<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _SpritesetMap_createLowLayer = Spriteset_Map.prototype.createLowerLayer;<br />
&nbsp;&nbsp;var _SpritesetMap_update = Spriteset_Map.prototype.update;<br />
<br />
&nbsp;&nbsp;Spriteset_Map.prototype.createLowerLayer = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;_SpritesetMap_createLowLayer.apply(this, arguments);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;gameMap.zoom.x, &#36;gameMap.zoom.y, 1);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Spriteset_Map.prototype.updatePosition = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var scale = &#36;gameMap.zoom;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var screen = &#36;gameScreen;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.x = Math.round(-&#36;gameMap.zoom.x * (scale.x - 1));<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.y = Math.round(-&#36;gameMap.zoom.y * (scale.x - 1));<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.x += Math.round(screen.shake());<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this.scale.x !== scale.x || this.scale.y !== scale.y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var destScale = &#36;gameMap._destZoom;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sw = Graphics.width / destScale.x + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var sh = Graphics.height / destScale.y + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((this.scale.x &gt; destScale.x || this.scale.y &gt; destScale.y) &amp;&amp; !(this.width === sw &amp;&amp; this.height === sh)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//var w = &#36;gameMap.width() * &#36;gameMap.tileWidth() + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//var h = &#36;gameMap.height() * &#36;gameMap.tileHeight() + this._tilemap._margin * 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var r = sw &gt; this._tilemap.width || sh &gt; this._tilemap.height;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (r) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.width = sw;//Math.max(w, sw);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.height = sh;//Math.max(h, sh);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._tilemap.refresh();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.scale = new PIXI.Point(scale.x, scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._pictureContainer.scale = new PIXI.Point(1.0 / scale.x,&nbsp;&nbsp;1.0 / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._weather.scale = new PIXI.Point(1.0 / scale.x,&nbsp;&nbsp;1.0 / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._parallax.move(this._parallax.x, this._parallax.y, Graphics.width / scale.x, Graphics.height / scale.y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Tilemap<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;Tilemap.prototype._createLayers = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var width = this._width;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var height = this._height;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var margin = this._margin;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileCols = Math.ceil(width / this._tileWidth) + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var tileRows = Math.ceil(height / this._tileHeight) + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var layerWidth = tileCols * this._tileWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var layerHeight = tileRows * this._tileHeight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._lowerBitmap) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap.clear();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap.resize(layerWidth, layerHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerBitmap = new Bitmap(layerWidth, layerHeight);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._upperBitmap) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap.clear();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap.resize(layerWidth, layerHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperBitmap = new Bitmap(layerWidth, layerHeight);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._layerWidth = layerWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._layerHeight = layerHeight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer = this._lowerLayer || new Sprite();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.removeChildren();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.move(-margin, -margin, width, height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.z = 0;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer = this._upperLayer || new Sprite();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.removeChildren();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.move(-margin, -margin, width, height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.z = 4;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; 4; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._lowerLayer.addChild(new Sprite(this._lowerBitmap));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._upperLayer.addChild(new Sprite(this._upperBitmap));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._lowerLayer);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._upperLayer);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Picture<br />
&nbsp;&nbsp;//<br />
&nbsp;&nbsp;// Game pictures object. Changed to apply zoom on images marked with [Zoom].<br />
<br />
&nbsp;&nbsp;var _GamePicture_update = Game_Picture.prototype.update;<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GamePicture_update.apply(this, arguments)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this.mapZoom()) this.updateZoom();<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.updateZoom = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._duration &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var d = this._duration;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleX = (this._scaleX&nbsp;&nbsp;* (d - 1) + this._targetScaleX)&nbsp;&nbsp;/ d * &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleY = (this._scaleX&nbsp;&nbsp;* (d - 1) + this._targetScaleX)&nbsp;&nbsp;/ d * &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleX = this._targetScaleX * &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._scaleY = this._targetScaleY * &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Picture.prototype.mapZoom = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return !!this.name().match(/&#92;[zoom&#92;]/i);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Game_Map<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;Game_Map.prototype.screenTileX = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return Graphics.width / this.tileWidth() / &#36;gameMap.zoom.x;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;Game_Map.prototype.screenTileY = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return Graphics.height / this.tileHeight() / &#36;gameMap.zoom.y;<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;//-----------------------------------------------------------------------------<br />
&nbsp;&nbsp;// Plugin command<br />
&nbsp;&nbsp;//<br />
<br />
&nbsp;&nbsp;// Alias<br />
&nbsp;&nbsp;var _GameInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;<br />
<br />
&nbsp;&nbsp;Game_Interpreter.prototype.pluginCommand = function (command, args) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_GameInterpreter_pluginCommand.call(this, command, args);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (command == "MapZoom") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[0] == "set") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[2]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[2] == "duration") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[3]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[1]) * &#36;.Param.defaultZoom, Number(args[3]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[3] == "duration") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[4]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[2]) * &#36;.Param.defaultZoom, Number(args[4]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]) * &#36;.Param.defaultZoom, Number(args[2]) * &#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(Number(args[1]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[0] == "reset") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;.Param.defaultZoom, &#36;.Param.defaultZoom, Number(args[1]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;.Param.defaultZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[0] == "center") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args[1] == "event") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ev = &#36;gameMap.event(Number(args[2]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (ev)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter(ev);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (args[1] == "reset") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoomCenter(Number(args[1]), Number(args[2]));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameMap.setZoom(&#36;gameMap._destZoom.x, &#36;gameMap._destZoom.y, &#36;gameMap._zoomDuration - &#36;gameMap._spdZoom);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
})(MBS.MapZoom);<br />
<br />
if (Imported["MVCommons"]) {<br />
&nbsp;&nbsp;PluginManager.register("MBS_MapZoom", 1.3, "Makes it possible to zoom in and out the game map whenever you want", {&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email: "masked.rpg@gmail.com",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: "Masked", <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;website: "N/A"<br />
&nbsp;&nbsp;&nbsp;&nbsp;}, "2016-07-26");<br />
}</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/HeBCYDH.png" border="0" alt="[Obrazek: HeBCYDH.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=12" target="_blank">MBS_MapZoom.js</a> (Rozmiar: 15.82 KB / Pobrań: 1)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Niezależna Zmiana Rozdzielczości i Rozmiaru Okna Gry]]></title>
			<link>https://forum.ultimateam.pl/Thread-MZ-Niezale%C5%BCna-Zmiana-Rozdzielczo%C5%9Bci-i-Rozmiaru-Okna-Gry</link>
			<pubDate>Mon, 24 Aug 2020 20:57:30 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MZ-Niezale%C5%BCna-Zmiana-Rozdzielczo%C5%9Bci-i-Rozmiaru-Okna-Gry</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Resolution Changer by B.N.F ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Względnie prosty skrypt na zmianę rozdzielczości jak i rozmiaru okna gry, niezależnie od siebie. Oznacza to że pozwala na przeskalowanie rozdzielczości gry, tak by pasowała do rozmiaru okna. Możliwe jest zarówno przeskalowanie w dół jak i górę, na co niestety nie pozwala domyślna zmiana rozdzielczości w ustawieniach RM MZ.<br />
Najkrócej rzecz ujmując, skrypt pozwala na stworzenie gry w okienku o rozmiarach np Full HD (1920x1080), ale np o rozdzielczości gry 896x504. dzięki czemu postacie są nadal duże i widoczny jest tylko nieznaczna część mapy. Kiedy przy domyślnych ustawieniach rozdzielczości na np 1920x1080 w samym programie, uzyskuje się maluteńkie postaci i ogromną przestrzeń mapy widoczną przez cały czas. Ciekawe porównanie w screenach poniżej.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
B.N.F<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
(B.N.F ?) Plugin domyślnie jest po polsku<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// RPG Maker MZ - Resolution Changer by B.N.F<br />
//=============================================================================<br />
<br />
/*:<br />
 * @target MZ<br />
 * @plugindesc Możliwość zmiany rozdzielczości i okna gry<br />
 * @author B.N.F<br />
 *<br />
 * @param OknoX<br />
 * @desc Wpisz dowolną szerokość okna gry w pixelach<br />
 * @default 816<br />
 *<br />
 * @param OknoY<br />
 * @desc Wpisz dowolną wysokość okna gry w pixelach<br />
 * @default 624<br />
 *<br />
 * @param RozdzielczoscX<br />
 * @desc Wpisz dowolną szerokość rozdzielczości gry w pixelach<br />
 * @default 816<br />
 *<br />
 * @param RozdzielczoscY<br />
 * @desc Wpisz dowolną wysokość rozdzielczości gry w pixelach<br />
 * @default 624<br />
 *<br />
 * @help --------------------------------------------<br />
 * INFORMACJA<br />
 * --------------------------------------------<br />
 * <br />
 * Ten prosty plugin pozwala zmienić rozmiar okna oraz rozdzielczość gry.<br />
 *<br />
 * Nie zapewnia żadnych komend do użytku.<br />
 */<br />
<br />
 (function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var parameters = PluginManager.parameters('BNF-Resolution');<br />
&nbsp;&nbsp;&nbsp;&nbsp;var SzerokoscOkna = Number(parameters['OknoX']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var WysokoscOkna = Number(parameters['OknoY']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var SzerokoscGry = Number(parameters['RozdzielczoscX']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var WysokoscGry = Number(parameters['RozdzielczoscY']);<br />
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scene_Boot.prototype.adjustWindow = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (Utils.isNwjs()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const xDelta = SzerokoscOkna - window.innerWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const yDelta = WysokoscOkna - window.innerHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.moveBy(-xDelta / 2, -yDelta / 2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.resizeBy(xDelta, yDelta);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}};<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scene_Boot.prototype.resizeScreen = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const screenWidth = SzerokoscGry;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const screenHeight = WysokoscGry;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics.resize(screenWidth, screenHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.adjustBoxSize();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.adjustWindow();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br />
 })();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/oH2S5ix.png" border="0" alt="[Obrazek: oH2S5ix.png]" /><br />
<img class="postimage" src="https://i.imgur.com/YCmRGHN.png" border="0" alt="[Obrazek: YCmRGHN.png]" /><br />
<img class="postimage" src="https://i.imgur.com/uUdfrgG.png" border="0" alt="[Obrazek: uUdfrgG.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt nie będzie kompatybilny z żadnym innym skryptem na zmianę rozdzielczości czy wielkości okna gry (W chwili pisania tego postu, o ile mi wiadomo żaden taki skrypt nie istnieje) w celu prawidłowego działania zalecane jest ustawienie skryptu jako pierwszego w kolejności.<br />
<br />
Skrypt nie jest kompatybilny z RM MV<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=11" target="_blank">BNF-Resolution.js</a> (Rozmiar: 1.89 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Resolution Changer by B.N.F ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Względnie prosty skrypt na zmianę rozdzielczości jak i rozmiaru okna gry, niezależnie od siebie. Oznacza to że pozwala na przeskalowanie rozdzielczości gry, tak by pasowała do rozmiaru okna. Możliwe jest zarówno przeskalowanie w dół jak i górę, na co niestety nie pozwala domyślna zmiana rozdzielczości w ustawieniach RM MZ.<br />
Najkrócej rzecz ujmując, skrypt pozwala na stworzenie gry w okienku o rozmiarach np Full HD (1920x1080), ale np o rozdzielczości gry 896x504. dzięki czemu postacie są nadal duże i widoczny jest tylko nieznaczna część mapy. Kiedy przy domyślnych ustawieniach rozdzielczości na np 1920x1080 w samym programie, uzyskuje się maluteńkie postaci i ogromną przestrzeń mapy widoczną przez cały czas. Ciekawe porównanie w screenach poniżej.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
B.N.F<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
(B.N.F ?) Plugin domyślnie jest po polsku<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// RPG Maker MZ - Resolution Changer by B.N.F<br />
//=============================================================================<br />
<br />
/*:<br />
 * @target MZ<br />
 * @plugindesc Możliwość zmiany rozdzielczości i okna gry<br />
 * @author B.N.F<br />
 *<br />
 * @param OknoX<br />
 * @desc Wpisz dowolną szerokość okna gry w pixelach<br />
 * @default 816<br />
 *<br />
 * @param OknoY<br />
 * @desc Wpisz dowolną wysokość okna gry w pixelach<br />
 * @default 624<br />
 *<br />
 * @param RozdzielczoscX<br />
 * @desc Wpisz dowolną szerokość rozdzielczości gry w pixelach<br />
 * @default 816<br />
 *<br />
 * @param RozdzielczoscY<br />
 * @desc Wpisz dowolną wysokość rozdzielczości gry w pixelach<br />
 * @default 624<br />
 *<br />
 * @help --------------------------------------------<br />
 * INFORMACJA<br />
 * --------------------------------------------<br />
 * <br />
 * Ten prosty plugin pozwala zmienić rozmiar okna oraz rozdzielczość gry.<br />
 *<br />
 * Nie zapewnia żadnych komend do użytku.<br />
 */<br />
<br />
 (function () {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var parameters = PluginManager.parameters('BNF-Resolution');<br />
&nbsp;&nbsp;&nbsp;&nbsp;var SzerokoscOkna = Number(parameters['OknoX']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var WysokoscOkna = Number(parameters['OknoY']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var SzerokoscGry = Number(parameters['RozdzielczoscX']);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var WysokoscGry = Number(parameters['RozdzielczoscY']);<br />
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scene_Boot.prototype.adjustWindow = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (Utils.isNwjs()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const xDelta = SzerokoscOkna - window.innerWidth;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const yDelta = WysokoscOkna - window.innerHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.moveBy(-xDelta / 2, -yDelta / 2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.resizeBy(xDelta, yDelta);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}};<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scene_Boot.prototype.resizeScreen = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const screenWidth = SzerokoscGry;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;const screenHeight = WysokoscGry;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Graphics.resize(screenWidth, screenHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.adjustBoxSize();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.adjustWindow();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};<br />
 })();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/oH2S5ix.png" border="0" alt="[Obrazek: oH2S5ix.png]" /><br />
<img class="postimage" src="https://i.imgur.com/YCmRGHN.png" border="0" alt="[Obrazek: YCmRGHN.png]" /><br />
<img class="postimage" src="https://i.imgur.com/uUdfrgG.png" border="0" alt="[Obrazek: uUdfrgG.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt nie będzie kompatybilny z żadnym innym skryptem na zmianę rozdzielczości czy wielkości okna gry (W chwili pisania tego postu, o ile mi wiadomo żaden taki skrypt nie istnieje) w celu prawidłowego działania zalecane jest ustawienie skryptu jako pierwszego w kolejności.<br />
<br />
Skrypt nie jest kompatybilny z RM MV<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=11" target="_blank">BNF-Resolution.js</a> (Rozmiar: 1.89 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Niewstrzymanie Ruchu]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Niewstrzymanie-Ruchu</link>
			<pubDate>Tue, 14 Jul 2020 23:54:32 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Niewstrzymanie-Ruchu</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ KeepMoving ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt umożliwia interakcję ze zdarzeniami podczas ich poruszania się. Takie zdarzenia nie przestaną się poruszać i nie obrócą się w naszym kierunku, tylko będą szły dalej. <br />
<br />
Można ten skrypt wykorzystać do ustawienia zachowania zdarzenia zależnie od tego w którym kierunku jest obrócone przy interakcji. To idealne rozwiązanie do gier ze skradaniem, gdzie chcemy np. uderzyć przeciwnika od tyłu żeby stracił przytomność.<br />
<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Shaz<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
Yoroiookami<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// Niewstrzymanie Ruchu (Keep Moving)<br />
// Skrypt napisany przez Shaza<br />
// Przetłumaczony przez Yoroiookami<br />
// Ostatni update: 04.11.2015<br />
//=============================================================================<br />
 <br />
/*:<br />
 * @plugindesc Pozwala zdarzeniom na poruszanie się, nawet podczas rozmowy.<br />
 * @author Shaz<br />
 *<br />
 * @help<br />
 * Ten plugin zmienia zwykłe zachowanie zdarzeń, gdzie podczas rozmowy <br />
 * zwykle zatrzymują się i obracają w kierunku gracza.<br />
 *<br />
 * Użyj tego "plugin command" (3 strona zdarzenia) w wybranym zdarzeniu:<br />
 *&nbsp;&nbsp; KeepMoving<br />
 */<br />
 <br />
(function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_initMembers = Game_Event.prototype.initMembers;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.initMembers = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_initMembers.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_clearPageSettings = Game_Event.prototype.clearPageSettings;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.clearPageSettings = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_clearPageSettings.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_setupPageSettings = Game_Event.prototype.setupPageSettings;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.setupPageSettings = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_setupPageSettings.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this.list().some(function(cmd) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return cmd.code === 356 &amp;&amp; cmd.parameters[0].split(" ").shift().toUpperCase() === "KEEPMOVING";<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_lock = Game_Event.prototype.lock;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.lock = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!this._nolock) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_lock.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp;})();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/iGpPev0.png" border="0" alt="[Obrazek: iGpPev0.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=10" target="_blank">KeepMoving.js</a> (Rozmiar: 1.67 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ KeepMoving ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt umożliwia interakcję ze zdarzeniami podczas ich poruszania się. Takie zdarzenia nie przestaną się poruszać i nie obrócą się w naszym kierunku, tylko będą szły dalej. <br />
<br />
Można ten skrypt wykorzystać do ustawienia zachowania zdarzenia zależnie od tego w którym kierunku jest obrócone przy interakcji. To idealne rozwiązanie do gier ze skradaniem, gdzie chcemy np. uderzyć przeciwnika od tyłu żeby stracił przytomność.<br />
<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Shaz<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Tłumaczenie:</span></span><br />
Yoroiookami<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// Niewstrzymanie Ruchu (Keep Moving)<br />
// Skrypt napisany przez Shaza<br />
// Przetłumaczony przez Yoroiookami<br />
// Ostatni update: 04.11.2015<br />
//=============================================================================<br />
 <br />
/*:<br />
 * @plugindesc Pozwala zdarzeniom na poruszanie się, nawet podczas rozmowy.<br />
 * @author Shaz<br />
 *<br />
 * @help<br />
 * Ten plugin zmienia zwykłe zachowanie zdarzeń, gdzie podczas rozmowy <br />
 * zwykle zatrzymują się i obracają w kierunku gracza.<br />
 *<br />
 * Użyj tego "plugin command" (3 strona zdarzenia) w wybranym zdarzeniu:<br />
 *&nbsp;&nbsp; KeepMoving<br />
 */<br />
 <br />
(function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_initMembers = Game_Event.prototype.initMembers;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.initMembers = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_initMembers.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_clearPageSettings = Game_Event.prototype.clearPageSettings;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.clearPageSettings = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_clearPageSettings.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_setupPageSettings = Game_Event.prototype.setupPageSettings;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.setupPageSettings = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_setupPageSettings.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this.list().some(function(cmd) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return cmd.code === 356 &amp;&amp; cmd.parameters[0].split(" ").shift().toUpperCase() === "KEEPMOVING";<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._nolock = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;var _Game_Event_lock = Game_Event.prototype.lock;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Game_Event.prototype.lock = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!this._nolock) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_Game_Event_lock.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;};<br />
&nbsp;&nbsp;})();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/iGpPev0.png" border="0" alt="[Obrazek: iGpPev0.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=10" target="_blank">KeepMoving.js</a> (Rozmiar: 1.67 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Progresywne kondycje]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Progresywne-kondycje</link>
			<pubDate>Wed, 04 Jul 2018 21:02:48 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Progresywne-kondycje</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Progresywne kondycje / Progressive states ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na wywołanie kondycji <span style="font-style: italic;">(stanu)</span> po zakończeniu się poprzedniej. <br />
Przykładowo, można ustawić że po przebudzeniu z uśpienia <span style="font-style: italic;">(sleep)</span>, bohater odczuwa gniew <span style="font-style: italic;">(rage)</span>.<br />
W okienku <span style="font-weight: bold;">Note</span> w <span style="font-weight: bold;">States</span> należy wstawić:<br />
<div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>&lt;progressive state: ID&gt;</code></div></div>
Gdzie ID jest ID stanu, który zostanie wywołany.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
HimeWorks<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>/*:<br />
-------------------------------------------------------------------------<br />
@title Progressive States<br />
@author Hime --&gt; HimeWorks (http://himeworks.com)<br />
@date Nov 20, 2015<br />
@filename HIME_ProgressiveStates.js<br />
@url http://himeworks.com/2015/11/progressive-states-mv/<br />
<br />
If you enjoy my work, consider supporting me on Patreon!<br />
<br />
https://www.patreon.com/himeworks<br />
<br />
If you have any questions or concerns, you can contact me at any of<br />
the following sites:<br />
<br />
Main Website: http://himeworks.com<br />
Facebook: https://www.facebook.com/himeworkscom/<br />
Twitter: https://twitter.com/HimeWorks<br />
Youtube: https://www.youtube.com/c/HimeWorks<br />
Tumblr: http://himeworks.tumblr.com/<br />
<br />
-------------------------------------------------------------------------<br />
@plugindesc Allows you to create states where whenever the state is<br />
removed due to expiry, a new state will be added afterwards.<br />
@help <br />
-------------------------------------------------------------------------<br />
== Description ==<br />
<br />
Video: https://www.youtube.com/watch?v=9vjzhg36GqU<br />
<br />
Do you have states that automatically change into other states after<br />
a certain amount of turns or actions have elapsed?<br />
<br />
For example, you have a Doom state that counts down every turn,<br />
and when the countdown reaches 0, the battler will automatically die.<br />
<br />
Or perhaps you have a Poison state that will worsen if it's not<br />
treated, and after walking around for 50 steps, the poison state<br />
automatically turns into a deadlier poison state.<br />
<br />
Or perhaps you have a Frozen state that prevents the battler from<br />
moving, but if it gets hit by any damage, it will immediately die.<br />
<br />
This plugin allows you to set up your states so that when the state is<br />
removed automatically, new states will be added.<br />
<br />
== Terms of Use ==<br />
<br />
- Free for use in non-commercial projects with credits<br />
- Contact me for commercial use<br />
<br />
== Change Log ==<br />
<br />
Nov 20, 2015 - refactored code to make it easier to check states<br />
Nov 19, 2015 - initial release<br />
<br />
== Usage ==<br />
<br />
To specify what states will be added when a state is automatically<br />
removed, add the note-tag<br />
<br />
&nbsp;&nbsp;&lt;progressive state: ID&gt;<br />
&nbsp;&nbsp;<br />
Where the ID is the ID of the state that will be added. You can add<br />
multiple states by adding additional notetags.<br />
<br />
-------------------------------------------------------------------------<br />
 */ <br />
var Imported = Imported || {} ;<br />
var TH = TH || {};<br />
Imported.ProgressiveStates = 1;<br />
TH.ProgressiveStates = TH.ProgressiveStates || {};<br />
<br />
(function (&#36;) {<br />
<br />
&nbsp;&nbsp;&#36;.Regex = /&lt;progressive[-_ ]state:&#92;s*(&#92;d+)&#92;s*&gt;/img<br />
<br />
&nbsp;&nbsp;&#36;.getProgressiveStates = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (state.progressiveStates !== undefined) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return state.progressiveStates;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;state.progressiveStates = [];<br />
&nbsp;&nbsp;&nbsp;&nbsp;var res;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;while (res = &#36;.Regex.exec(state.note)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var id = Math.floor(res[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state.progressiveStates.push(id);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;return state.progressiveStates;<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;/* Remove by walking */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_updateStateSteps = Game_Actor.prototype.updateStateSteps;<br />
&nbsp;&nbsp;Game_Actor.prototype.updateStateSteps = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_updateStateSteps.call(this, state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!this.isStateAffected(state.id)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/* Remove by damage */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_removeStatesByDamage = Game_Battler.prototype.removeStatesByDamage;<br />
&nbsp;&nbsp;Game_Battler.prototype.removeStatesByDamage = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var oldStates = this._states.clone();<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_removeStatesByDamage.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var newStates = this._states;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.checkProgressiveStates(oldStates, newStates);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/* Remove by turn end and action end */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_removeStatesAuto = Game_Battler.prototype.removeStatesAuto;<br />
&nbsp;&nbsp;Game_Battler.prototype.removeStatesAuto = function(timing) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var oldStates = this._states.clone();<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_removeStatesAuto.call(this, timing);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var newStates = this._states;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.checkProgressiveStates(oldStates, newStates);<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Game_Battler.prototype.checkProgressiveStates = function(oldStates, newStates) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0, len = oldStates.length; i &lt; len; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var stateId = oldStates[i];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var state = &#36;dataStates[stateId];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!newStates.contains(stateId)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Game_Battler.prototype.addProgressiveStates = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var progStates = &#36;.getProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0, len = progStates.length; i &lt; len; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addState(progStates[i]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
})(TH.ProgressiveStates);</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/GqBsyhf.png" border="0" alt="[Obrazek: GqBsyhf.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=9" target="_blank">HIME_ProgressiveStates.js</a> (Rozmiar: 4.59 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Progresywne kondycje / Progressive states ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na wywołanie kondycji <span style="font-style: italic;">(stanu)</span> po zakończeniu się poprzedniej. <br />
Przykładowo, można ustawić że po przebudzeniu z uśpienia <span style="font-style: italic;">(sleep)</span>, bohater odczuwa gniew <span style="font-style: italic;">(rage)</span>.<br />
W okienku <span style="font-weight: bold;">Note</span> w <span style="font-weight: bold;">States</span> należy wstawić:<br />
<div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>&lt;progressive state: ID&gt;</code></div></div>
Gdzie ID jest ID stanu, który zostanie wywołany.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
HimeWorks<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>/*:<br />
-------------------------------------------------------------------------<br />
@title Progressive States<br />
@author Hime --&gt; HimeWorks (http://himeworks.com)<br />
@date Nov 20, 2015<br />
@filename HIME_ProgressiveStates.js<br />
@url http://himeworks.com/2015/11/progressive-states-mv/<br />
<br />
If you enjoy my work, consider supporting me on Patreon!<br />
<br />
https://www.patreon.com/himeworks<br />
<br />
If you have any questions or concerns, you can contact me at any of<br />
the following sites:<br />
<br />
Main Website: http://himeworks.com<br />
Facebook: https://www.facebook.com/himeworkscom/<br />
Twitter: https://twitter.com/HimeWorks<br />
Youtube: https://www.youtube.com/c/HimeWorks<br />
Tumblr: http://himeworks.tumblr.com/<br />
<br />
-------------------------------------------------------------------------<br />
@plugindesc Allows you to create states where whenever the state is<br />
removed due to expiry, a new state will be added afterwards.<br />
@help <br />
-------------------------------------------------------------------------<br />
== Description ==<br />
<br />
Video: https://www.youtube.com/watch?v=9vjzhg36GqU<br />
<br />
Do you have states that automatically change into other states after<br />
a certain amount of turns or actions have elapsed?<br />
<br />
For example, you have a Doom state that counts down every turn,<br />
and when the countdown reaches 0, the battler will automatically die.<br />
<br />
Or perhaps you have a Poison state that will worsen if it's not<br />
treated, and after walking around for 50 steps, the poison state<br />
automatically turns into a deadlier poison state.<br />
<br />
Or perhaps you have a Frozen state that prevents the battler from<br />
moving, but if it gets hit by any damage, it will immediately die.<br />
<br />
This plugin allows you to set up your states so that when the state is<br />
removed automatically, new states will be added.<br />
<br />
== Terms of Use ==<br />
<br />
- Free for use in non-commercial projects with credits<br />
- Contact me for commercial use<br />
<br />
== Change Log ==<br />
<br />
Nov 20, 2015 - refactored code to make it easier to check states<br />
Nov 19, 2015 - initial release<br />
<br />
== Usage ==<br />
<br />
To specify what states will be added when a state is automatically<br />
removed, add the note-tag<br />
<br />
&nbsp;&nbsp;&lt;progressive state: ID&gt;<br />
&nbsp;&nbsp;<br />
Where the ID is the ID of the state that will be added. You can add<br />
multiple states by adding additional notetags.<br />
<br />
-------------------------------------------------------------------------<br />
 */ <br />
var Imported = Imported || {} ;<br />
var TH = TH || {};<br />
Imported.ProgressiveStates = 1;<br />
TH.ProgressiveStates = TH.ProgressiveStates || {};<br />
<br />
(function (&#36;) {<br />
<br />
&nbsp;&nbsp;&#36;.Regex = /&lt;progressive[-_ ]state:&#92;s*(&#92;d+)&#92;s*&gt;/img<br />
<br />
&nbsp;&nbsp;&#36;.getProgressiveStates = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (state.progressiveStates !== undefined) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return state.progressiveStates;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;state.progressiveStates = [];<br />
&nbsp;&nbsp;&nbsp;&nbsp;var res;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;while (res = &#36;.Regex.exec(state.note)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var id = Math.floor(res[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state.progressiveStates.push(id);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;return state.progressiveStates;<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;/* Remove by walking */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_updateStateSteps = Game_Actor.prototype.updateStateSteps;<br />
&nbsp;&nbsp;Game_Actor.prototype.updateStateSteps = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_updateStateSteps.call(this, state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!this.isStateAffected(state.id)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/* Remove by damage */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_removeStatesByDamage = Game_Battler.prototype.removeStatesByDamage;<br />
&nbsp;&nbsp;Game_Battler.prototype.removeStatesByDamage = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var oldStates = this._states.clone();<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_removeStatesByDamage.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var newStates = this._states;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.checkProgressiveStates(oldStates, newStates);<br />
&nbsp;&nbsp;};<br />
<br />
&nbsp;&nbsp;/* Remove by turn end and action end */<br />
&nbsp;&nbsp;var TH_ProgressiveStates_GameBattler_removeStatesAuto = Game_Battler.prototype.removeStatesAuto;<br />
&nbsp;&nbsp;Game_Battler.prototype.removeStatesAuto = function(timing) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var oldStates = this._states.clone();<br />
&nbsp;&nbsp;&nbsp;&nbsp;TH_ProgressiveStates_GameBattler_removeStatesAuto.call(this, timing);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var newStates = this._states;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.checkProgressiveStates(oldStates, newStates);<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Game_Battler.prototype.checkProgressiveStates = function(oldStates, newStates) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0, len = oldStates.length; i &lt; len; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var stateId = oldStates[i];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var state = &#36;dataStates[stateId];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!newStates.contains(stateId)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;Game_Battler.prototype.addProgressiveStates = function(state) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var progStates = &#36;.getProgressiveStates(state);<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0, len = progStates.length; i &lt; len; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.addState(progStates[i]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;};<br />
})(TH.ProgressiveStates);</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/GqBsyhf.png" border="0" alt="[Obrazek: GqBsyhf.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=9" target="_blank">HIME_ProgressiveStates.js</a> (Rozmiar: 4.59 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rozmowa z towarzyszem]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Rozmowa-z-towarzyszem</link>
			<pubDate>Wed, 04 Jul 2018 20:49:32 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Rozmowa-z-towarzyszem</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Rozmowa z towarzyszem / Talk to follower ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na rozmowę z towarzyszem, pod warunkiem że w party są tylko dwie osoby. Okienka rozmów można ustawić w wybranym Common Event. Do poprawnego działania skryptu, wymagany jest <a href="http://forum.ultimateam.pl/Thread-MV-Obr%C3%B3t-w-miejscu" target="_blank">Obrót w miejscu</a>.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//==============================================================================<br />
// TalkToFollower.js<br />
//==============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.TalkToFollower = true;<br />
<br />
var TTF = {};<br />
<br />
/*:<br />
* @plugindesc Allows the player to talk to a follower, specifically, the one party member right behind them.<br />
* @author mjshi<br />
* <br />
* @param Common Event ID<br />
* @desc ID of the common event to be called when the player attempts to talk to a follower<br />
* @default 1<br />
* <br />
* @help <br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Talk To Follower v1.01 by mjshi<br />
*&nbsp;&nbsp; Free for both commercial and non-commercial use, with credit.<br />
* ----------------------------------------------------------------------------<br />
* &gt; Requires Turn In Place: http://mjshi.weebly.com/mv-turn-in-place.html<br />
* &gt; Only works when the player has exactly 1 follower.<br />
*<br />
* &gt; Update v1.01: Fixed a bug that occurs if there are no followers<br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Built-in functions for conditional branches. Case Sensitive!<br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; TTF.fIs(ID)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; checks if the follower's ID is ID <br />
*&nbsp;&nbsp; TTF.mapIs(ID)&nbsp;&nbsp;&nbsp;&nbsp; checks if player/follower are in map ID<br />
*&nbsp;&nbsp; TTF.regionIs(ID)&nbsp;&nbsp;checks if player is in region ID<br />
*&nbsp;&nbsp; TTF.fregionIs(ID) checks if follower is in region ID<br />
*&nbsp;&nbsp; <br />
*&nbsp;&nbsp; Use &amp;&amp; and || to connect these statements! For example,<br />
*<br />
*&nbsp;&nbsp; TTF.regionIs(ID) || TTF.fregionIs(ID)<br />
*&nbsp;&nbsp; checks if follower OR player are in region ID<br />
*<br />
*&nbsp;&nbsp; TTF.regionIs(ID) &amp;&amp; TTF.fregionIs(ID)<br />
*&nbsp;&nbsp; checks if follower AND player are in region ID<br />
* ----------------------------------------------------------------------------<br />
*<br />
* &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
*&nbsp;&nbsp; try my best to help you!<br />
*/<br />
<br />
TTF.Parameters = PluginManager.parameters('TalkToFollower');<br />
TTF.eventID = Number(TTF.Parameters['Common Event ID']);<br />
<br />
if (Imported.TurnInPlace) {<br />
<br />
TTF.mapIs = function (ID) {return (&#36;gameMap._mapId == ID)}<br />
TTF.fIs = function (ID) {return (&#36;gameParty._actors[1] == ID)}<br />
TTF.regionIs = function (ID) {return (&#36;gameMap.regionId(&#36;gamePlayer._x, &#36;gamePlayer._y) == ID)}<br />
TTF.fregionIs = function (ID) {return (&#36;gameMap.regionId(&#36;gamePlayer._followers.visibleFollowers()[0]._x, &#36;gamePlayer._followers.visibleFollowers()[0]._y) == ID)}<br />
<br />
ttf_alias_Scene_Map_updateScene = Scene_Map.prototype.updateScene;<br />
Scene_Map.prototype.updateScene = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;ttf_alias_Scene_Map_updateScene.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (SceneManager.isSceneChanging()) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;gameMap.isEventRunning()) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Input.isTriggered('ok') || (TouchInput.isTriggered() &amp;&amp; TouchInput.clickedOnFollower())) {this.checkTalking()};<br />
};<br />
<br />
TouchInput.clickedOnFollower = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var x = Math.floor(this._x / 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var y = Math.floor(this._y / 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var f = &#36;gamePlayer._followers.visibleFollowers()[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (f === undefined) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;return (x == f._x &amp;&amp; y == f._y);<br />
};<br />
<br />
Scene_Map.prototype.checkTalking = function() {&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var f = &#36;gamePlayer._followers.visibleFollowers()[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!f) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;var p = &#36;gamePlayer;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var pd = p._direction;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fd = f._direction;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if ((pd == 8 &amp;&amp; fd == 2 &amp;&amp; p._y - f._y == 1) || (pd == 2 &amp;&amp; fd == 8 &amp;&amp; p._y - f._y == -1) || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pd == 4 &amp;&amp; fd == 6 &amp;&amp; p._x - f._x == 1) || (pd == 6 &amp;&amp; fd == 4 &amp;&amp; p._x - f._x == -1))<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&#36;gameTemp.reserveCommonEvent(TTF.eventID)}<br />
};<br />
}</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/YcfMXlA.png" border="0" alt="[Obrazek: YcfMXlA.png]" /><img class="postimage" src="https://i.imgur.com/5wQQSXv.png" border="0" alt="[Obrazek: 5wQQSXv.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=8" target="_blank">TalkToFollower.js</a> (Rozmiar: 3.51 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Rozmowa z towarzyszem / Talk to follower ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na rozmowę z towarzyszem, pod warunkiem że w party są tylko dwie osoby. Okienka rozmów można ustawić w wybranym Common Event. Do poprawnego działania skryptu, wymagany jest <a href="http://forum.ultimateam.pl/Thread-MV-Obr%C3%B3t-w-miejscu" target="_blank">Obrót w miejscu</a>.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//==============================================================================<br />
// TalkToFollower.js<br />
//==============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.TalkToFollower = true;<br />
<br />
var TTF = {};<br />
<br />
/*:<br />
* @plugindesc Allows the player to talk to a follower, specifically, the one party member right behind them.<br />
* @author mjshi<br />
* <br />
* @param Common Event ID<br />
* @desc ID of the common event to be called when the player attempts to talk to a follower<br />
* @default 1<br />
* <br />
* @help <br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Talk To Follower v1.01 by mjshi<br />
*&nbsp;&nbsp; Free for both commercial and non-commercial use, with credit.<br />
* ----------------------------------------------------------------------------<br />
* &gt; Requires Turn In Place: http://mjshi.weebly.com/mv-turn-in-place.html<br />
* &gt; Only works when the player has exactly 1 follower.<br />
*<br />
* &gt; Update v1.01: Fixed a bug that occurs if there are no followers<br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Built-in functions for conditional branches. Case Sensitive!<br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; TTF.fIs(ID)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; checks if the follower's ID is ID <br />
*&nbsp;&nbsp; TTF.mapIs(ID)&nbsp;&nbsp;&nbsp;&nbsp; checks if player/follower are in map ID<br />
*&nbsp;&nbsp; TTF.regionIs(ID)&nbsp;&nbsp;checks if player is in region ID<br />
*&nbsp;&nbsp; TTF.fregionIs(ID) checks if follower is in region ID<br />
*&nbsp;&nbsp; <br />
*&nbsp;&nbsp; Use &amp;&amp; and || to connect these statements! For example,<br />
*<br />
*&nbsp;&nbsp; TTF.regionIs(ID) || TTF.fregionIs(ID)<br />
*&nbsp;&nbsp; checks if follower OR player are in region ID<br />
*<br />
*&nbsp;&nbsp; TTF.regionIs(ID) &amp;&amp; TTF.fregionIs(ID)<br />
*&nbsp;&nbsp; checks if follower AND player are in region ID<br />
* ----------------------------------------------------------------------------<br />
*<br />
* &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
*&nbsp;&nbsp; try my best to help you!<br />
*/<br />
<br />
TTF.Parameters = PluginManager.parameters('TalkToFollower');<br />
TTF.eventID = Number(TTF.Parameters['Common Event ID']);<br />
<br />
if (Imported.TurnInPlace) {<br />
<br />
TTF.mapIs = function (ID) {return (&#36;gameMap._mapId == ID)}<br />
TTF.fIs = function (ID) {return (&#36;gameParty._actors[1] == ID)}<br />
TTF.regionIs = function (ID) {return (&#36;gameMap.regionId(&#36;gamePlayer._x, &#36;gamePlayer._y) == ID)}<br />
TTF.fregionIs = function (ID) {return (&#36;gameMap.regionId(&#36;gamePlayer._followers.visibleFollowers()[0]._x, &#36;gamePlayer._followers.visibleFollowers()[0]._y) == ID)}<br />
<br />
ttf_alias_Scene_Map_updateScene = Scene_Map.prototype.updateScene;<br />
Scene_Map.prototype.updateScene = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;ttf_alias_Scene_Map_updateScene.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (SceneManager.isSceneChanging()) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;gameMap.isEventRunning()) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Input.isTriggered('ok') || (TouchInput.isTriggered() &amp;&amp; TouchInput.clickedOnFollower())) {this.checkTalking()};<br />
};<br />
<br />
TouchInput.clickedOnFollower = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var x = Math.floor(this._x / 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var y = Math.floor(this._y / 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var f = &#36;gamePlayer._followers.visibleFollowers()[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (f === undefined) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;return (x == f._x &amp;&amp; y == f._y);<br />
};<br />
<br />
Scene_Map.prototype.checkTalking = function() {&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var f = &#36;gamePlayer._followers.visibleFollowers()[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!f) {return}<br />
&nbsp;&nbsp;&nbsp;&nbsp;var p = &#36;gamePlayer;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var pd = p._direction;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fd = f._direction;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if ((pd == 8 &amp;&amp; fd == 2 &amp;&amp; p._y - f._y == 1) || (pd == 2 &amp;&amp; fd == 8 &amp;&amp; p._y - f._y == -1) || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pd == 4 &amp;&amp; fd == 6 &amp;&amp; p._x - f._x == 1) || (pd == 6 &amp;&amp; fd == 4 &amp;&amp; p._x - f._x == -1))<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&#36;gameTemp.reserveCommonEvent(TTF.eventID)}<br />
};<br />
}</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/YcfMXlA.png" border="0" alt="[Obrazek: YcfMXlA.png]" /><img class="postimage" src="https://i.imgur.com/5wQQSXv.png" border="0" alt="[Obrazek: 5wQQSXv.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=8" target="_blank">TalkToFollower.js</a> (Rozmiar: 3.51 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Obrót w miejscu]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Obr%C3%B3t-w-miejscu</link>
			<pubDate>Wed, 04 Jul 2018 20:46:37 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Obr%C3%B3t-w-miejscu</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Obrót w miejscu / Turn in place ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na obrócenie postaci w miejscu przy zmianie kierunku chodzenia na przeciwny. Skrypt ten jest potrzebny do poprawnego działania skryptu <a href="http://forum.ultimateam.pl/Thread-Rozmowa-z-towarzyszem" target="_blank">Rozmowa z towarzyszem</a>.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>[code]//==============================================================================<br />
// TurnInPlace.js<br />
//==============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.TurnInPlace = true;<br />
<br />
var TurnInPlace = {};<br />
<br />
/*:<br />
* @plugindesc Allows the player to turn in place before moving.<br />
* @author mjshi<br />
* <br />
* @param Wait Count<br />
* @desc Wait count in frames. 60 frames = 1 second<br />
* @default 8<br />
* <br />
* @help <br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Turn In Place v1.0 by mjshi<br />
*&nbsp;&nbsp; Free for both commercial and non-commercial use, with credit.<br />
* ----------------------------------------------------------------------------<br />
* &gt; Inspired by "Player Turn &amp; Move" by SirBilly (silentkingdom.com)<br />
*&nbsp;&nbsp; (but the way things are handled differ completely)<br />
*<br />
* &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
*&nbsp;&nbsp; try my best to help you!<br />
*/<br />
<br />
<br />
TurnInPlace.Parameters = PluginManager.parameters('TurnInPlace');<br />
TurnInPlace.waitCount = Number(TurnInPlace.Parameters['Wait Count']);<br />
<br />
var turn_in_place_alias_game_player_initialize = Game_Player.prototype.initialize;<br />
Game_Player.prototype.initialize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;turn_in_place_alias_game_player_initialize.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._waitCount = TurnInPlace.waitCount;<br />
};<br />
<br />
var turn_in_place_alias_game_player_update = Game_Player.prototype.update;<br />
Game_Player.prototype.update = function(sceneActive) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;gameMap.isEventRunning()) {this._waitCount = 0}<br />
&nbsp;&nbsp;&nbsp;&nbsp;turn_in_place_alias_game_player_update.call(this, sceneActive);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!(Input.isPressed("up") || Input.isPressed("down") || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Input.isPressed("left") || Input.isPressed("right") || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TouchInput.isPressed())) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._waitCount = TurnInPlace.waitCount}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._waitCount &gt; 0) {this._waitCount -= 1}<br />
};<br />
<br />
Game_Player.prototype.moveByInput = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!this.isMoving() &amp;&amp; this.canMove()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var direction = this.getInputDirection();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (direction &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameTemp.clearDestination();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (&#36;gameTemp.isDestinationValid()){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var x = &#36;gameTemp.destinationX();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var y = &#36;gameTemp.destinationY();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction = this.findDirectionTo(x, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((direction &gt; 0 || TouchInput.isTriggered()) &amp;&amp; this._waitCount == 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.executeMove(direction);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.setDirection(direction);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._followers._data[0].turnTowardPlayer();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};</code></div></div>
[/code]</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/1EdN7io.png" border="0" alt="[Obrazek: 1EdN7io.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=7" target="_blank">TurnInPlace.js</a> (Rozmiar: 2.46 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Obrót w miejscu / Turn in place ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt pozwala na obrócenie postaci w miejscu przy zmianie kierunku chodzenia na przeciwny. Skrypt ten jest potrzebny do poprawnego działania skryptu <a href="http://forum.ultimateam.pl/Thread-Rozmowa-z-towarzyszem" target="_blank">Rozmowa z towarzyszem</a>.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>[code]//==============================================================================<br />
// TurnInPlace.js<br />
//==============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.TurnInPlace = true;<br />
<br />
var TurnInPlace = {};<br />
<br />
/*:<br />
* @plugindesc Allows the player to turn in place before moving.<br />
* @author mjshi<br />
* <br />
* @param Wait Count<br />
* @desc Wait count in frames. 60 frames = 1 second<br />
* @default 8<br />
* <br />
* @help <br />
* ----------------------------------------------------------------------------<br />
*&nbsp;&nbsp; Turn In Place v1.0 by mjshi<br />
*&nbsp;&nbsp; Free for both commercial and non-commercial use, with credit.<br />
* ----------------------------------------------------------------------------<br />
* &gt; Inspired by "Player Turn &amp; Move" by SirBilly (silentkingdom.com)<br />
*&nbsp;&nbsp; (but the way things are handled differ completely)<br />
*<br />
* &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
*&nbsp;&nbsp; try my best to help you!<br />
*/<br />
<br />
<br />
TurnInPlace.Parameters = PluginManager.parameters('TurnInPlace');<br />
TurnInPlace.waitCount = Number(TurnInPlace.Parameters['Wait Count']);<br />
<br />
var turn_in_place_alias_game_player_initialize = Game_Player.prototype.initialize;<br />
Game_Player.prototype.initialize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;turn_in_place_alias_game_player_initialize.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._waitCount = TurnInPlace.waitCount;<br />
};<br />
<br />
var turn_in_place_alias_game_player_update = Game_Player.prototype.update;<br />
Game_Player.prototype.update = function(sceneActive) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (&#36;gameMap.isEventRunning()) {this._waitCount = 0}<br />
&nbsp;&nbsp;&nbsp;&nbsp;turn_in_place_alias_game_player_update.call(this, sceneActive);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!(Input.isPressed("up") || Input.isPressed("down") || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Input.isPressed("left") || Input.isPressed("right") || <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TouchInput.isPressed())) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._waitCount = TurnInPlace.waitCount}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._waitCount &gt; 0) {this._waitCount -= 1}<br />
};<br />
<br />
Game_Player.prototype.moveByInput = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!this.isMoving() &amp;&amp; this.canMove()) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var direction = this.getInputDirection();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (direction &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;gameTemp.clearDestination();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (&#36;gameTemp.isDestinationValid()){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var x = &#36;gameTemp.destinationX();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var y = &#36;gameTemp.destinationY();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction = this.findDirectionTo(x, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((direction &gt; 0 || TouchInput.isTriggered()) &amp;&amp; this._waitCount == 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.executeMove(direction);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.setDirection(direction);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._followers._data[0].turnTowardPlayer();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};</code></div></div>
[/code]</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="https://i.imgur.com/1EdN7io.png" border="0" alt="[Obrazek: 1EdN7io.png]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins.<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=7" target="_blank">TurnInPlace.js</a> (Rozmiar: 2.46 KB / Pobrań: 0)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Paski HP przeciwników]]></title>
			<link>https://forum.ultimateam.pl/Thread-MV-Paski-HP-przeciwnik%C3%B3w</link>
			<pubDate>Sat, 16 Jun 2018 12:34:17 +0200</pubDate>
			<guid isPermaLink="false">https://forum.ultimateam.pl/Thread-MV-Paski-HP-przeciwnik%C3%B3w</guid>
			<description><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Paski HP przeciwników / Pretty Sleek Gauges ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt wyświetla animowane paski HP przeciwników podczas walki. Ich kształt można dowolnie modyfikować, zmieniając ustawienia wtyczki.<br />
<br />
Kompatybilny z innymi systemami walki.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Vlue, Rocketmancer, mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// PrettySleekGauges.js<br />
//=============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.PrettySleekGauges = true;<br />
<br />
/*:<br />
 * @plugindesc Sleek Gauges! Look at them go, so shiny, so cool. And they're even better when you can change what they look like and use them in battles!<br />
 * @author Vlue Au'Vier (sleek), Rocketmancer​ (pretty), mjshi (pretty sleek)<br />
 *<br />
 * @param Bar Shape<br />
 * @desc Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default //<br />
 *<br />
 * @param HP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param MP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param TP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param EXP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default ||<br />
 *<br />
 * @param Gauge Height<br />
 * @desc Default height of the gauges<br />
 * @type number<br />
 * @default 8<br />
 *<br />
 * @param Outline Color<br />
 * @desc Hex color.<br />
 * @default #FFFFFF<br />
 *<br />
 * @param Enemy Gauges<br />
 *<br />
 * @param Enemy HP Gauge<br />
 * @parent Enemy Gauges<br />
 *<br />
 * @param Enemy MP Gauge<br />
 * @parent Enemy Gauges<br />
 *<br />
 * @param Show Enemy HP Gauges<br />
 * @parent Enemy HP Gauge<br />
 * @type select<br />
 * @default show over<br />
 * @desc Shows the enemy hp bar over/under animations. <br />
 * (show under/show over/don't show)<br />
 * @option show over<br />
 * @option show under<br />
 * @option don't show<br />
 *<br />
 * @param Show Enemy HP Text<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show the word "HP"?<br />
 * (true/false)<br />
 * @default false<br />
 * @type boolean<br />
 *<br />
 * @param HP Text Y Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc Y offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param Show Enemy HP Value<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show how much HP the enemy has left?<br />
 * (true/false)<br />
 * @default true<br />
 * @type boolean<br />
 *<br />
 * @param Show Up Top<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show the enemy hp gauges above the enemy?<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Bar Width<br />
 * @parent Enemy HP Gauge<br />
 * @desc Width of the Enemy HP gauge<br />
 * @type number<br />
 * @default 120<br />
 *<br />
 * @param HP Gauge X Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc X offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param HP Gauge Y Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc Y offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param Image Height Multiplier<br />
 * @parent Enemy HP Gauge<br />
 * @desc How far up the image to place the HP bar, in a decimal percentage.<br />
 * @type number<br />
 * @decimals 2<br />
 * @default 0.9<br />
 *<br />
 * @param State Positioning<br />
 * @parent Enemy Gauges<br />
 * @desc Since our HP gauge covers parts of it.<br />
 *<br />
 * @param State X Offset<br />
 * @parent State Positioning<br />
 * @desc X offset of the enemy states<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param State Y Offset<br />
 * @parent State Positioning<br />
 * @desc Y offset of the enemy states<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 30<br />
 *<br />
 * @param State Height Multiplier<br />
 * @parent State Positioning<br />
 * @desc How far up the image to place the state icons, in a decimal percentage.<br />
 * @type number<br />
 * @decimals 2<br />
 * @default 0.9<br />
 *<br />
 * @param Show Enemy MP<br />
 * @parent Enemy MP Gauge<br />
 * @type boolean<br />
 * @desc Show a tiny MP gauge?<br />
 * (true/false)<br />
 * @default true<br />
 *<br />
 * @param Show MP Bar When MMP is 0<br />
 * @parent Enemy MP Gauge<br />
 * @type boolean<br />
 * @desc Show the MP bar when the enemy's max mp is 0?<br />
 * (true/false)<br />
 * @default false<br />
 *<br />
 * @param Tiny Gauge Height<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @desc Height of the tiny gauge<br />
 * @default 2<br />
 *<br />
 * @param Tiny Gauge X Offset<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc X Offset of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Tiny Gauge Y Offset<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc Y Offset of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Tiny Gauge Width Adjust<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc Adjust the width of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Animated Numbers<br />
 * @desc Whether or not numbers count down/up<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Animated Gauge<br />
 * @desc Whether or not the gauge is animated<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Extras<br />
 *<br />
 * @param Critical HP Change<br />
 * @desc HP text becomes red when HP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default true<br />
 *<br />
 * @param Critical MP Change<br />
 * @desc MP text becomes red when MP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default true<br />
 *<br />
 * @param Critical TP Change<br />
 * @desc TP text becomes red when TP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default false<br />
 *<br />
 * @param Show EXP Bar<br />
 * @parent Extras<br />
 * @desc Show the EXP bar?<br />
 * (true/false)<br />
 * @default true<br />
 * @type boolean<br />
 *<br />
 * @param Status Icon XY Offset<br />
 * @parent Extras<br />
 * @desc Manually control where status icons are placed. Leave blank if you don't have out of battle statuses. Format: X, Y<br />
 * @default <br />
 *<br />
 * @param<br />
 * @help <br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp; Pretty Sleek Gauges v1.02b<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp; Free to use in any project with credit to:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; Vlue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (original plugin)<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; Rocketmancer (Prettier Gauges)<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; mjshi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(merging, edits, and enemy HP bars)<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Extra Notetags:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;If there's just that ONE enemy (looking at you, Slime) that has its<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;face covered up by the HP bar, you can use these notetags:<br />
 *<br />
 *&nbsp;&nbsp;&lt;HPBarXOffset:#&gt;<br />
 *&nbsp;&nbsp;&lt;HPBarYOffset:#&gt;<br />
 * <br />
 *&nbsp;&nbsp;&nbsp;&nbsp;to manually put it in its place.<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;The # can be positive or negative. So in that slime example, with the<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;default settings, having a &lt;HPBarYOffset:-20&gt; there fixes the issue.<br />
 *<br />
 *&nbsp;&nbsp;Also, for bosses, you can hide the HP or MP bar via these:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;&lt;HideEnemyHPBar&gt;<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;&lt;HideEnemyMPBar&gt;<br />
 *<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Original Plugin By Vlue<br />
 *<br />
 *&nbsp;&nbsp;Facebook: https://www.facebook.com/DaimoniousTailsGames/<br />
 *&nbsp;&nbsp;Website: http://daimonioustails.weebly.com/<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Merged with Prettier Gauges/Custom Gauges by Rocketmancer​<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;https://forums.rpgmakerweb.com/index.php?threads/prettier-gauges.47077/<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Changes from the forum version:<br />
 *&nbsp;&nbsp;- merged a couple functions<br />
 *&nbsp;&nbsp;- added support for &#92; style gauges<br />
 *&nbsp;&nbsp;- fixed issue with overfilling the gauge<br />
 *&nbsp;&nbsp;- added support for enemy HP gauges<br />
 *&nbsp;&nbsp;- added support for individual HP gauge offsets<br />
 *&nbsp;&nbsp;- added support for EXP gauges and individual bar styles<br />
 * ----------------------------------------------------------------------------<br />
 * &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
 *&nbsp;&nbsp; try my best to help you!<br />
 * <br />
 */<br />
<br />
<br />
function Special_Gauge() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
}<br />
<br />
(function() {<br />
<br />
var parameters = PluginManager.parameters('PrettySleekGauges');<br />
var defaultHeight = Number(parameters['Gauge Height'] || 8);<br />
var defaultTinyHeight = Number(parameters['Tiny Gauge Height'] || 2);<br />
var animatedNumbers = (parameters['Animated Numbers'] || "true") === "true";<br />
var animatedGauges = (parameters['Animated Gauges'] || "true") === "true";<br />
var gaugeOutColor = parameters['Outline Color'] || "#FFFFFF";<br />
<br />
var barTypeLeft = String(parameters['Bar Shape']).substring(0,1);<br />
var barTypeRight = String(parameters['Bar Shape']).substring(1,2);<br />
var saveBarTypeLeft = barTypeLeft;<br />
var saveBarTypeRight = barTypeRight;<br />
var hpBarTypeLeft = (parameters['HP Bar Shape'].length === 2) ? String(parameters['HP Bar Shape']).substring(0,1) : false;<br />
var hpBarTypeRight = (parameters['HP Bar Shape'].length === 2) ? String(parameters['HP Bar Shape']).substring(1,2) : false;<br />
var mpBarTypeLeft = (parameters['MP Bar Shape'].length === 2) ? String(parameters['MP Bar Shape']).substring(0,1) : false;<br />
var mpBarTypeRight = (parameters['MP Bar Shape'].length === 2) ? String(parameters['MP Bar Shape']).substring(1,2) : false;<br />
var tpBarTypeLeft = (parameters['TP Bar Shape'].length === 2) ? String(parameters['TP Bar Shape']).substring(0,1) : false;<br />
var tpBarTypeRight = (parameters['TP Bar Shape'].length === 2) ? String(parameters['TP Bar Shape']).substring(1,2) : false;<br />
var expBarTypeLeft = (parameters['EXP Bar Shape'].length === 2) ? String(parameters['EXP Bar Shape']).substring(0,1) : false;<br />
var expBarTypeRight = (parameters['EXP Bar Shape'].length === 2) ? String(parameters['EXP Bar Shape']).substring(1,2) : false;<br />
<br />
var showEnemyHP = (parameters['Show Enemy HP Gauges']).startsWith("show");<br />
var showOver = (parameters['Show Enemy HP Gauges']).endsWith("over");<br />
var showUpTop = (parameters['Show Up Top'] || "true") === "true";<br />
var EHPXOffset = parseInt(parameters['HP Gauge X Offset']) || 0;<br />
var EHPYOffset = parseInt(parameters['HP Gauge Y Offset']) || 0;<br />
var EHPbarWidth = parseInt(parameters['Bar Width']) || 120;<br />
var showEHPHP = (parameters['Show Enemy HP Text'] || "false") === "true";<br />
var textYOffset = parseInt(parameters['HP Text Y Offset']) || 0;<br />
var showEHPText = (parameters['Show Enemy HP Value'] || "true") === "true";<br />
var EHPYMultiplier = parseInt(parameters['Image Height Multiplier']) || 0.9;<br />
var EHPStateXOffset = parseInt(parameters['State X Offset']) || 0;<br />
var EHPStateYOffset = parseInt(parameters['State Y Offset']) || 30;<br />
var shouldDrawEnemyMP = (parameters['Show Enemy MP'] || "true") === "true";<br />
var drawEnemyMPWhenNoMP = (parameters['Show MP Bar When MMP is 0'] || "true") === "true";<br />
var defaultTinyHeight = parseInt(parameters['Tiny Gauge Height']) || 2;<br />
var tinyWidthAdjust = parseInt(parameters['Tiny Gauge Width Adjust']) || 0;<br />
var tinyGaugeXOffset = parseInt(parameters['Tiny Gauge X Offset']) || 0;<br />
var tinyGaugeYOffset = parseInt(parameters['Tiny Gauge Y Offset']) || 0;<br />
// var shouldDrawEnemyTP = (parameters['Show Enemy TP'] || "true") === "true";<br />
<br />
var criticalHP = (parameters['Critical HP Change'] || "true") === "true";<br />
var criticalMP = (parameters['Critical MP Change'] || "true") === "true";<br />
var criticalTP = (parameters['Critical TP Change'] || "false") === "true";<br />
var showEXP = (parameters['Show EXP Bar'] || "true") === "true";<br />
var statusXY = (parameters['Status Icon XY Offset'] || "true").split(", ").map(Number);<br />
<br />
//=============================================================================<br />
// Sleek Gauges<br />
//=============================================================================<br />
Window_Base.prototype.drawAnimatedGauge = function(x, y, width, rate, c1, c2, criticalColor) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges == null) this._gauges = {};<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gkey = this.makeGaugeKey(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges[gkey]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey].setRate(rate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey] = new Special_Gauge(x, y, width, rate, c1, c2, this, defaultHeight, criticalColor);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
var windowBaseUpdate = Window_Base.prototype.update;<br />
Window_Base.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;windowBaseUpdate.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges) for(var bar in this._gauges) this._gauges[bar].update();<br />
}<br />
<br />
Window_Base.prototype.makeGaugeKey = function(x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return "k" + x + "-" + y;<br />
}<br />
<br />
Window_Base.prototype.drawActorHp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.hpRate(), this.hpGaugeColor1(), this.hpGaugeColor2(), criticalHP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.hpA, actor.hp, actor.mhp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_Base.prototype.drawActorMp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.mpRate(), this.mpGaugeColor1(), this.mpGaugeColor2(), criticalMP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.mpA, actor.mp, actor.mmp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_Base.prototype.drawActorTp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.tpRate(), this.tpGaugeColor1(), this.tpGaugeColor2(), criticalTP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.tpA, actor.tp, 100);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_MenuStatus.prototype.drawActorEXP = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!showEXP) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var rate = (actor.currentExp() - actor.currentLevelExp()) / (actor.nextLevelExp() - actor.currentLevelExp());<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (actor.level === actor.maxLevel()) rate = 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawExpGauge(x, y, width, rate, this.textColor(0), this.textColor(8));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(TextManager.expA, x, y, 44);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText((Math.floor(rate * 10000) / 100) + "%", x, y, width,"right");<br />
};<br />
<br />
Window_Base.prototype.drawExpGauge = function(x, y, width, rate, c1, c2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = expBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = expBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var height = defaultHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = width * rate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = y + this.lineHeight() - height - 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, width - 2, height, this.gaugeBackColor(), true);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, fill_w, height, c1, c2, "atop");<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, width - 2, height, gaugeOutColor);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
};<br />
<br />
Window_MenuStatus.prototype.drawActorSimpleStatus = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (statusXY.length === 2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var lineHeight = this.lineHeight();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var x2 = x + 180;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var width2 = Math.min(200, width - 180 - this.textPadding());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorName(actor, x, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorLevel(actor, x, y + lineHeight * 1);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorIcons(actor, x + statusXY[0], y + lineHeight * 2 + statusXY[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorClass(actor, x2, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorHp(actor, x2, y + lineHeight * 1, width2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorMp(actor, x2, y + lineHeight * 2, width2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.drawActorSimpleStatus.call(this, actor, x, y, width);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Imported.YEP_CoreEngine) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorEXP(actor, x, y + this.lineHeight()*2, 145);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorEXP(actor, x, y + this.lineHeight()*2, Math.min(200, width - 200 - this.textPadding()));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};<br />
<br />
// cede to Yanfly for level drawing<br />
if (!Imported.YEP_CoreEngine) {<br />
Window_MenuStatus.prototype.drawActorLevel = function(actor, x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(TextManager.levelA, x, y, 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.resetTextColor();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(actor.level, x + 130, y, 36, 'right');<br />
};<br />
}<br />
<br />
Special_Gauge.prototype.constructor = Special_Gauge;<br />
Special_Gauge.prototype.initialize = function(x, y, w, r, c1, c2, basewindow, h, critText) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._x = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._y = y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._width = w;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._curRate = this._maxRate = r;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._vocab = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._color = [c1, c2];<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window = basewindow;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._speed = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._speedRate = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._height = h;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._fallSprites = [];<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPHP = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPText = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._critTextColor = critText;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.setTextVisibility = function(hpText, hpNum) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPHP = hpText;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPText = hpNum;<br />
}<br />
<br />
Special_Gauge.prototype.doneUpdating = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this._curRate === this._maxRate &amp;&amp; this._curVal === this._setVal;<br />
};<br />
<br />
Special_Gauge.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this.doneUpdating()) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curRate &gt; this._maxRate) this._curRate -= this._speedRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &gt; this._setVal) this._curVal -= this._speed;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curRate &lt; this._maxRate) this._curRate += this._speedRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &lt; this._setVal) this._curVal += this._speed;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Math.abs(this._curRate - this._maxRate) &lt; this._speedRate) this._curRate = this._maxRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Math.abs(this._curVal - this._setVal) &lt; this._speed) this._curVal = this._setVal;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!animatedNumbers) this._curVal = this._setVal;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!animatedGauges) this._curRate = this._maxRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.refresh = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._vocab) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x-1, this._y, this._width+2, this._window.lineHeight());&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height - 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x, gy, this._width, this._height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawGauge();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText();<br />
}<br />
<br />
Special_Gauge.prototype.setRate = function(rate) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (rate != this._maxRate) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._maxRate = rate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._speedRate = Math.abs(this._curRate - this._maxRate) / 60;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//TODO: More Falling Sprite Stuff<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
Special_Gauge.prototype.setExtra = function(text, val, max, yOffset) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._vocab = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._text = text;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._maxVal = max;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (val != this._setVal) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._speed = Math.max(0, Math.abs(this._curVal - val) / 60);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._setVal = val;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal == null) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._curVal = val;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._yOffset = yOffset ? yOffset : 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.drawGauge = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = Math.round((this._width - 2) * this._curRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_ww = Math.round((this._width - 2) * this._maxRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height - 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (this._text) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.hpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = hpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = hpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.mpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = mpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = mpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.tpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = tpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = tpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, this._width - 2, this._height, this._window.gaugeBackColor(), true);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, fill_w, this._height, this._color[0], this._color[1], "atop");<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, this._width - 2, this._height, gaugeOutColor);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
}<br />
<br />
Special_Gauge.prototype.fontSize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return 28;<br />
}<br />
<br />
Special_Gauge.prototype.drawText = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._vocab) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.fontSize = this.fontSize();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._showEHPHP) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(this._text, this._x + 1, this._y + this._yOffset, 30);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._showEHPText) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._critTextColor) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &lt; this._maxVal / 10) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.deathColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (this._curVal &lt; this._maxVal / 4) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.crisisColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var xr = this._x + this._width;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._width &lt; 186) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(Math.round(this._curVal), xr - 40, this._y + this._yOffset, 40, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(Math.round(this._curVal), xr - 92, this._y + this._yOffset, 42, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText("/", xr - 52, this._y + this._yOffset, 12, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(this._maxVal, xr - 42, this._y + this._yOffset, 40, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
//=============================================================================<br />
// Pretty Gauges<br />
//=============================================================================<br />
Bitmap.prototype.drawTrap = function(x, y, width, height, color1, color2, shouldFill) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var context = this._context;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var grad = context.createLinearGradient(x, y, x + width, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var startCoords = [];<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (typeof color2 === 'boolean') {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shouldFill = color2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color2 = undefined;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (color2 === undefined) color2 = color1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldFill === "atop") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.globalCompositeOperation = 'source-atop';<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.globalCompositeOperation = 'source-over';<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;grad.addColorStop(0, color1);<br />
&nbsp;&nbsp;&nbsp;&nbsp;grad.addColorStop(1, color2);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.save();<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.beginPath();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (barTypeLeft) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "|":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "/":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + height, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&lt;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height/2, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height/2, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y + height/2)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + height/2, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "(":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height, y + height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.bezierCurveTo(x, y + height, x, y, x + height, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ".":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&#92;&#92;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (barTypeRight) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "|":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "/":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&gt;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height/2, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height/2)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height/2, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ")":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.bezierCurveTo(x + width, y, x + width, y + height, x + width - height, y + height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ".":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&#92;&#92;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(startCoords[0], startCoords[1])<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldFill) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.fillStyle = grad;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.fill();<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.strokeStyle = grad;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.stroke();<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.restore();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._setDirty();<br />
}<br />
<br />
//=============================================================================<br />
// EnemyGauges<br />
//=============================================================================<br />
if (showEnemyHP) {<br />
<br />
function Window_EnemyHPBars() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
};<br />
<br />
Window_EnemyHPBars.prototype = Object.create(Window_Base.prototype);<br />
Window_EnemyHPBars.prototype.constructor = Window_EnemyHPBars;<br />
<br />
Window_EnemyHPBars.prototype.initialize = function(sprites) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.initialize.call(this, 0, 0, Graphics.boxWidth, Graphics.boxHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.opacity = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemySprites = sprites.slice().reverse();<br />
};<br />
<br />
Window_EnemyHPBars.prototype.standardPadding = function() {<br />
&nbsp;&nbsp; return 0;<br />
};<br />
<br />
Window_EnemyHPBars.prototype.drawActorHp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges &amp;&amp; this._gauges[this.makeGaugeKey(x, y)] &amp;&amp; this._gauges[this.makeGaugeKey(x, y)]._curVal === 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.contents.clearRect(x - defaultHeight, y, width + defaultHeight, this.lineHeight() + defaultHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!&#36;dataEnemies[actor.enemyId()].meta.HideEnemyHPBar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = &#36;dataEnemies[actor.enemyId()].meta.BarTypeLeft || hpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = &#36;dataEnemies[actor.enemyId()].meta.BarTypeRight || hpBarTypeRight || barTypeRight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.hpRate(), this.hpGaugeColor1(), this.hpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.hpA, actor.hp, actor.mhp, textYOffset);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setTextVisibility(showEHPHP, showEHPText);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldDrawEnemyMP &amp;&amp; (drawEnemyMPWhenNoMP || actor.mmp &gt; 0) &amp;&amp; !&#36;dataEnemies[actor.enemyId()].meta.HideEnemyMPBar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawTinyGauge(x + tinyGaugeXOffset, y + 1 + tinyGaugeYOffset, width + tinyWidthAdjust, actor.mpRate(), this.mpGaugeColor1(), this.mpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeTGaugeKey(x + tinyGaugeXOffset, y + 1 + tinyGaugeYOffset)].setExtra(TextManager.mpA, actor.mp, actor.mmp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;// Maybe this'll be useful someday<br />
&nbsp;&nbsp;&nbsp;&nbsp;// y += defaultTinyHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;// if (shouldDrawEnemyTP &amp;&amp; actor.mtp &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;// &nbsp;&nbsp;&nbsp;&nbsp;this.drawTinyGauge(x + tinyGaugeXOffset, y + 1 + defaultTinyHeight, width, actor.tpRate(), this.tpGaugeColor1(), this.tpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;// &nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeTGaugeKey(x + tinyGaugeXOffset, y + 1 + defaultTinyHeight)].setExtra(TextManager.tpA, actor.tp, actor.mtp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;// }<br />
}<br />
<br />
Window_EnemyHPBars.prototype.makeTGaugeKey = function(x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return "tk" + x + "-" + y;<br />
}<br />
<br />
Window_EnemyHPBars.prototype.drawTinyGauge = function(x, y, width, rate, c1, c2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges == null) { this._gauges = {} };<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gkey = this.makeTGaugeKey(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges[gkey]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey].setRate(rate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey] = new Line_Gauge(x, y, width, rate, c1, c2, this, defaultTinyHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
Window_EnemyHPBars.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.update.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var width = EHPbarWidth, x, y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; &#36;gameTroop._enemies.length; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!this._enemySprites[i].height || !this._enemySprites[i].width) continue;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = &#36;gameTroop._enemies[i].screenX() - (width + this.textPadding())/2 + EHPXOffset + (parseInt(&#36;dataEnemies[&#36;gameTroop._enemies[i].enemyId()].meta.HPBarXOffset) || 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = &#36;gameTroop._enemies[i].screenY() - this.lineHeight() + EHPYOffset + (parseInt(&#36;dataEnemies[&#36;gameTroop._enemies[i].enemyId()].meta.HPBarYOffset) || 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (showUpTop) y -= this._enemySprites[i].height * EHPYMultiplier;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorHp(&#36;gameTroop._enemies[i], x, y, width);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
function Line_Gauge() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
}<br />
Line_Gauge.prototype = Object.create(Special_Gauge.prototype);<br />
Line_Gauge.prototype.constructor = Line_Gauge;<br />
<br />
Line_Gauge.prototype.refresh = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x, this.y, this._width, this._height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawGauge();<br />
}<br />
<br />
Line_Gauge.prototype.drawGauge = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = Math.round((this._width - 2 - defaultHeight) * this._curRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_ww = Math.round((this._width - 2) * this._maxRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.fillRect(this._x - 1, gy, this._width - defaultHeight, this._height + 2, gaugeOutColor);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.fillRect(this._x, gy + 1, this._width - 2 - defaultHeight, this._height, this._window.gaugeBackColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.gradientFillRect(this._x, gy + 1, fill_w, this._height, this._color[0], this._color[1]);<br />
}<br />
<br />
Line_Gauge.prototype.drawText = function() {};<br />
<br />
if (showOver) {<br />
var alias_Scene_Battle_createSpriteset = Scene_Battle.prototype.createSpriteset;<br />
Scene_Battle.prototype.createSpriteset = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;alias_Scene_Battle_createSpriteset.call(this);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow = new Window_EnemyHPBars(this._spriteset._enemySprites);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._enemyHPBarWindow);<br />
};<br />
<br />
} else {<br />
var alias_Spriteset_Battle_createEnemies = Spriteset_Battle.prototype.createEnemies;<br />
Spriteset_Battle.prototype.createEnemies = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;alias_Spriteset_Battle_createEnemies.call(this);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow = new Window_EnemyHPBars(this._enemySprites);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow.z = 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._battleField.addChild(this._enemyHPBarWindow);<br />
};<br />
}<br />
<br />
Sprite_Enemy.prototype.updateStateSprite = function() {<br />
&nbsp;&nbsp; this._stateIconSprite.y = -Math.round((this.bitmap.height + EHPStateYOffset) * 0.9);<br />
&nbsp;&nbsp; if (this._stateIconSprite.y &lt; 20 - this.y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this._stateIconSprite.y = 20 - this.y;<br />
&nbsp;&nbsp; }<br />
&nbsp;&nbsp; this._stateIconSprite.y += (parseInt(&#36;dataEnemies[this._enemy.enemyId()].meta.HPBarYOffset) || 0);<br />
&nbsp;&nbsp; this._stateIconSprite.x = EHPStateXOffset + (parseInt(&#36;dataEnemies[this._enemy.enemyId()].meta.HPBarXOffset) || 0);<br />
};<br />
} // End Enemy HP bars<br />
<br />
})();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="http://forum.ultimateam.pl/files/plugins/screen/PrettySleekGauges.jpg" border="0" alt="[Obrazek: PrettySleekGauges.jpg]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=5" target="_blank">PrettySleekGauges.js</a> (Rozmiar: 28.21 KB / Pobrań: 10)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<center><span style="font-size: medium;"><span style="color: red;"><span style="font-weight: bold;">~ Paski HP przeciwników / Pretty Sleek Gauges ~</span></span></span></center><br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Krótki opis:</span></span><br />
Skrypt wyświetla animowane paski HP przeciwników podczas walki. Ich kształt można dowolnie modyfikować, zmieniając ustawienia wtyczki.<br />
<br />
Kompatybilny z innymi systemami walki.<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Autor:</span></span><br />
Vlue, Rocketmancer, mjshi<br />
<br />
<span style="color: red;"><span style="font-weight: bold;">Skrypt:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><div class="codeblock">
<div class="title">Kod:<br />
</div><div class="body" dir="ltr"><code>//=============================================================================<br />
// PrettySleekGauges.js<br />
//=============================================================================<br />
<br />
var Imported = Imported || {};<br />
Imported.PrettySleekGauges = true;<br />
<br />
/*:<br />
 * @plugindesc Sleek Gauges! Look at them go, so shiny, so cool. And they're even better when you can change what they look like and use them in battles!<br />
 * @author Vlue Au'Vier (sleek), Rocketmancer​ (pretty), mjshi (pretty sleek)<br />
 *<br />
 * @param Bar Shape<br />
 * @desc Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default //<br />
 *<br />
 * @param HP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param MP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param TP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default <br />
 *<br />
 * @param EXP Bar Shape<br />
 * @parent Bar Shape<br />
 * @desc Leave blank to use default. Use any combination of | / . &lt; &gt; ( ) &#92; Ex. // (&gt; or /|<br />
 * @default ||<br />
 *<br />
 * @param Gauge Height<br />
 * @desc Default height of the gauges<br />
 * @type number<br />
 * @default 8<br />
 *<br />
 * @param Outline Color<br />
 * @desc Hex color.<br />
 * @default #FFFFFF<br />
 *<br />
 * @param Enemy Gauges<br />
 *<br />
 * @param Enemy HP Gauge<br />
 * @parent Enemy Gauges<br />
 *<br />
 * @param Enemy MP Gauge<br />
 * @parent Enemy Gauges<br />
 *<br />
 * @param Show Enemy HP Gauges<br />
 * @parent Enemy HP Gauge<br />
 * @type select<br />
 * @default show over<br />
 * @desc Shows the enemy hp bar over/under animations. <br />
 * (show under/show over/don't show)<br />
 * @option show over<br />
 * @option show under<br />
 * @option don't show<br />
 *<br />
 * @param Show Enemy HP Text<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show the word "HP"?<br />
 * (true/false)<br />
 * @default false<br />
 * @type boolean<br />
 *<br />
 * @param HP Text Y Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc Y offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param Show Enemy HP Value<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show how much HP the enemy has left?<br />
 * (true/false)<br />
 * @default true<br />
 * @type boolean<br />
 *<br />
 * @param Show Up Top<br />
 * @parent Enemy HP Gauge<br />
 * @desc Show the enemy hp gauges above the enemy?<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Bar Width<br />
 * @parent Enemy HP Gauge<br />
 * @desc Width of the Enemy HP gauge<br />
 * @type number<br />
 * @default 120<br />
 *<br />
 * @param HP Gauge X Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc X offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param HP Gauge Y Offset<br />
 * @parent Enemy HP Gauge<br />
 * @desc Y offset of the enemy hp gauges<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param Image Height Multiplier<br />
 * @parent Enemy HP Gauge<br />
 * @desc How far up the image to place the HP bar, in a decimal percentage.<br />
 * @type number<br />
 * @decimals 2<br />
 * @default 0.9<br />
 *<br />
 * @param State Positioning<br />
 * @parent Enemy Gauges<br />
 * @desc Since our HP gauge covers parts of it.<br />
 *<br />
 * @param State X Offset<br />
 * @parent State Positioning<br />
 * @desc X offset of the enemy states<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 0<br />
 *<br />
 * @param State Y Offset<br />
 * @parent State Positioning<br />
 * @desc Y offset of the enemy states<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @default 30<br />
 *<br />
 * @param State Height Multiplier<br />
 * @parent State Positioning<br />
 * @desc How far up the image to place the state icons, in a decimal percentage.<br />
 * @type number<br />
 * @decimals 2<br />
 * @default 0.9<br />
 *<br />
 * @param Show Enemy MP<br />
 * @parent Enemy MP Gauge<br />
 * @type boolean<br />
 * @desc Show a tiny MP gauge?<br />
 * (true/false)<br />
 * @default true<br />
 *<br />
 * @param Show MP Bar When MMP is 0<br />
 * @parent Enemy MP Gauge<br />
 * @type boolean<br />
 * @desc Show the MP bar when the enemy's max mp is 0?<br />
 * (true/false)<br />
 * @default false<br />
 *<br />
 * @param Tiny Gauge Height<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @desc Height of the tiny gauge<br />
 * @default 2<br />
 *<br />
 * @param Tiny Gauge X Offset<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc X Offset of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Tiny Gauge Y Offset<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc Y Offset of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Tiny Gauge Width Adjust<br />
 * @parent Enemy MP Gauge<br />
 * @type number<br />
 * @min -100000000000000000000000<br />
 * @desc Adjust the width of the tiny gauge<br />
 * @default 0<br />
 *<br />
 * @param Animated Numbers<br />
 * @desc Whether or not numbers count down/up<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Animated Gauge<br />
 * @desc Whether or not the gauge is animated<br />
 * (true/false)<br />
 * @type boolean<br />
 * @default true<br />
 *<br />
 * @param Extras<br />
 *<br />
 * @param Critical HP Change<br />
 * @desc HP text becomes red when HP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default true<br />
 *<br />
 * @param Critical MP Change<br />
 * @desc MP text becomes red when MP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default true<br />
 *<br />
 * @param Critical TP Change<br />
 * @desc TP text becomes red when TP is critically low<br />
 * (true/false)<br />
 * @type boolean<br />
 * @parent Extras<br />
 * @default false<br />
 *<br />
 * @param Show EXP Bar<br />
 * @parent Extras<br />
 * @desc Show the EXP bar?<br />
 * (true/false)<br />
 * @default true<br />
 * @type boolean<br />
 *<br />
 * @param Status Icon XY Offset<br />
 * @parent Extras<br />
 * @desc Manually control where status icons are placed. Leave blank if you don't have out of battle statuses. Format: X, Y<br />
 * @default <br />
 *<br />
 * @param<br />
 * @help <br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp; Pretty Sleek Gauges v1.02b<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp; Free to use in any project with credit to:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; Vlue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (original plugin)<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; Rocketmancer (Prettier Gauges)<br />
 *&nbsp;&nbsp;&nbsp;&nbsp; mjshi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(merging, edits, and enemy HP bars)<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Extra Notetags:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;If there's just that ONE enemy (looking at you, Slime) that has its<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;face covered up by the HP bar, you can use these notetags:<br />
 *<br />
 *&nbsp;&nbsp;&lt;HPBarXOffset:#&gt;<br />
 *&nbsp;&nbsp;&lt;HPBarYOffset:#&gt;<br />
 * <br />
 *&nbsp;&nbsp;&nbsp;&nbsp;to manually put it in its place.<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;The # can be positive or negative. So in that slime example, with the<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;default settings, having a &lt;HPBarYOffset:-20&gt; there fixes the issue.<br />
 *<br />
 *&nbsp;&nbsp;Also, for bosses, you can hide the HP or MP bar via these:<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;&lt;HideEnemyHPBar&gt;<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;&lt;HideEnemyMPBar&gt;<br />
 *<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Original Plugin By Vlue<br />
 *<br />
 *&nbsp;&nbsp;Facebook: https://www.facebook.com/DaimoniousTailsGames/<br />
 *&nbsp;&nbsp;Website: http://daimonioustails.weebly.com/<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Merged with Prettier Gauges/Custom Gauges by Rocketmancer​<br />
 *&nbsp;&nbsp;&nbsp;&nbsp;https://forums.rpgmakerweb.com/index.php?threads/prettier-gauges.47077/<br />
 * ----------------------------------------------------------------------------<br />
 *&nbsp;&nbsp;Changes from the forum version:<br />
 *&nbsp;&nbsp;- merged a couple functions<br />
 *&nbsp;&nbsp;- added support for &#92; style gauges<br />
 *&nbsp;&nbsp;- fixed issue with overfilling the gauge<br />
 *&nbsp;&nbsp;- added support for enemy HP gauges<br />
 *&nbsp;&nbsp;- added support for individual HP gauge offsets<br />
 *&nbsp;&nbsp;- added support for EXP gauges and individual bar styles<br />
 * ----------------------------------------------------------------------------<br />
 * &gt; Is something broken? Go to http://mjshi.weebly.com/contact.html and I'll<br />
 *&nbsp;&nbsp; try my best to help you!<br />
 * <br />
 */<br />
<br />
<br />
function Special_Gauge() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
}<br />
<br />
(function() {<br />
<br />
var parameters = PluginManager.parameters('PrettySleekGauges');<br />
var defaultHeight = Number(parameters['Gauge Height'] || 8);<br />
var defaultTinyHeight = Number(parameters['Tiny Gauge Height'] || 2);<br />
var animatedNumbers = (parameters['Animated Numbers'] || "true") === "true";<br />
var animatedGauges = (parameters['Animated Gauges'] || "true") === "true";<br />
var gaugeOutColor = parameters['Outline Color'] || "#FFFFFF";<br />
<br />
var barTypeLeft = String(parameters['Bar Shape']).substring(0,1);<br />
var barTypeRight = String(parameters['Bar Shape']).substring(1,2);<br />
var saveBarTypeLeft = barTypeLeft;<br />
var saveBarTypeRight = barTypeRight;<br />
var hpBarTypeLeft = (parameters['HP Bar Shape'].length === 2) ? String(parameters['HP Bar Shape']).substring(0,1) : false;<br />
var hpBarTypeRight = (parameters['HP Bar Shape'].length === 2) ? String(parameters['HP Bar Shape']).substring(1,2) : false;<br />
var mpBarTypeLeft = (parameters['MP Bar Shape'].length === 2) ? String(parameters['MP Bar Shape']).substring(0,1) : false;<br />
var mpBarTypeRight = (parameters['MP Bar Shape'].length === 2) ? String(parameters['MP Bar Shape']).substring(1,2) : false;<br />
var tpBarTypeLeft = (parameters['TP Bar Shape'].length === 2) ? String(parameters['TP Bar Shape']).substring(0,1) : false;<br />
var tpBarTypeRight = (parameters['TP Bar Shape'].length === 2) ? String(parameters['TP Bar Shape']).substring(1,2) : false;<br />
var expBarTypeLeft = (parameters['EXP Bar Shape'].length === 2) ? String(parameters['EXP Bar Shape']).substring(0,1) : false;<br />
var expBarTypeRight = (parameters['EXP Bar Shape'].length === 2) ? String(parameters['EXP Bar Shape']).substring(1,2) : false;<br />
<br />
var showEnemyHP = (parameters['Show Enemy HP Gauges']).startsWith("show");<br />
var showOver = (parameters['Show Enemy HP Gauges']).endsWith("over");<br />
var showUpTop = (parameters['Show Up Top'] || "true") === "true";<br />
var EHPXOffset = parseInt(parameters['HP Gauge X Offset']) || 0;<br />
var EHPYOffset = parseInt(parameters['HP Gauge Y Offset']) || 0;<br />
var EHPbarWidth = parseInt(parameters['Bar Width']) || 120;<br />
var showEHPHP = (parameters['Show Enemy HP Text'] || "false") === "true";<br />
var textYOffset = parseInt(parameters['HP Text Y Offset']) || 0;<br />
var showEHPText = (parameters['Show Enemy HP Value'] || "true") === "true";<br />
var EHPYMultiplier = parseInt(parameters['Image Height Multiplier']) || 0.9;<br />
var EHPStateXOffset = parseInt(parameters['State X Offset']) || 0;<br />
var EHPStateYOffset = parseInt(parameters['State Y Offset']) || 30;<br />
var shouldDrawEnemyMP = (parameters['Show Enemy MP'] || "true") === "true";<br />
var drawEnemyMPWhenNoMP = (parameters['Show MP Bar When MMP is 0'] || "true") === "true";<br />
var defaultTinyHeight = parseInt(parameters['Tiny Gauge Height']) || 2;<br />
var tinyWidthAdjust = parseInt(parameters['Tiny Gauge Width Adjust']) || 0;<br />
var tinyGaugeXOffset = parseInt(parameters['Tiny Gauge X Offset']) || 0;<br />
var tinyGaugeYOffset = parseInt(parameters['Tiny Gauge Y Offset']) || 0;<br />
// var shouldDrawEnemyTP = (parameters['Show Enemy TP'] || "true") === "true";<br />
<br />
var criticalHP = (parameters['Critical HP Change'] || "true") === "true";<br />
var criticalMP = (parameters['Critical MP Change'] || "true") === "true";<br />
var criticalTP = (parameters['Critical TP Change'] || "false") === "true";<br />
var showEXP = (parameters['Show EXP Bar'] || "true") === "true";<br />
var statusXY = (parameters['Status Icon XY Offset'] || "true").split(", ").map(Number);<br />
<br />
//=============================================================================<br />
// Sleek Gauges<br />
//=============================================================================<br />
Window_Base.prototype.drawAnimatedGauge = function(x, y, width, rate, c1, c2, criticalColor) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges == null) this._gauges = {};<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gkey = this.makeGaugeKey(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges[gkey]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey].setRate(rate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey] = new Special_Gauge(x, y, width, rate, c1, c2, this, defaultHeight, criticalColor);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
var windowBaseUpdate = Window_Base.prototype.update;<br />
Window_Base.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;windowBaseUpdate.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges) for(var bar in this._gauges) this._gauges[bar].update();<br />
}<br />
<br />
Window_Base.prototype.makeGaugeKey = function(x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return "k" + x + "-" + y;<br />
}<br />
<br />
Window_Base.prototype.drawActorHp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.hpRate(), this.hpGaugeColor1(), this.hpGaugeColor2(), criticalHP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.hpA, actor.hp, actor.mhp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_Base.prototype.drawActorMp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.mpRate(), this.mpGaugeColor1(), this.mpGaugeColor2(), criticalMP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.mpA, actor.mp, actor.mmp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_Base.prototype.drawActorTp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.tpRate(), this.tpGaugeColor1(), this.tpGaugeColor2(), criticalTP);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.tpA, actor.tp, 100);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].update();<br />
}<br />
<br />
Window_MenuStatus.prototype.drawActorEXP = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!showEXP) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var rate = (actor.currentExp() - actor.currentLevelExp()) / (actor.nextLevelExp() - actor.currentLevelExp());<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (actor.level === actor.maxLevel()) rate = 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawExpGauge(x, y, width, rate, this.textColor(0), this.textColor(8));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(TextManager.expA, x, y, 44);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText((Math.floor(rate * 10000) / 100) + "%", x, y, width,"right");<br />
};<br />
<br />
Window_Base.prototype.drawExpGauge = function(x, y, width, rate, c1, c2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = expBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = expBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var height = defaultHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = width * rate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = y + this.lineHeight() - height - 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, width - 2, height, this.gaugeBackColor(), true);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, fill_w, height, c1, c2, "atop");<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.contents.drawTrap(x, gy, width - 2, height, gaugeOutColor);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
};<br />
<br />
Window_MenuStatus.prototype.drawActorSimpleStatus = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (statusXY.length === 2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var lineHeight = this.lineHeight();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var x2 = x + 180;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var width2 = Math.min(200, width - 180 - this.textPadding());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorName(actor, x, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorLevel(actor, x, y + lineHeight * 1);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorIcons(actor, x + statusXY[0], y + lineHeight * 2 + statusXY[1]);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorClass(actor, x2, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorHp(actor, x2, y + lineHeight * 1, width2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorMp(actor, x2, y + lineHeight * 2, width2);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.drawActorSimpleStatus.call(this, actor, x, y, width);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Imported.YEP_CoreEngine) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorEXP(actor, x, y + this.lineHeight()*2, 145);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorEXP(actor, x, y + this.lineHeight()*2, Math.min(200, width - 200 - this.textPadding()));<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
};<br />
<br />
// cede to Yanfly for level drawing<br />
if (!Imported.YEP_CoreEngine) {<br />
Window_MenuStatus.prototype.drawActorLevel = function(actor, x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.changeTextColor(this.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(TextManager.levelA, x, y, 48);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.resetTextColor();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText(actor.level, x + 130, y, 36, 'right');<br />
};<br />
}<br />
<br />
Special_Gauge.prototype.constructor = Special_Gauge;<br />
Special_Gauge.prototype.initialize = function(x, y, w, r, c1, c2, basewindow, h, critText) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._x = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._y = y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._width = w;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._curRate = this._maxRate = r;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._vocab = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._color = [c1, c2];<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window = basewindow;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._speed = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._speedRate = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._height = h;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._fallSprites = [];<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPHP = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPText = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._critTextColor = critText;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.setTextVisibility = function(hpText, hpNum) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPHP = hpText;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._showEHPText = hpNum;<br />
}<br />
<br />
Special_Gauge.prototype.doneUpdating = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this._curRate === this._maxRate &amp;&amp; this._curVal === this._setVal;<br />
};<br />
<br />
Special_Gauge.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this.doneUpdating()) return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curRate &gt; this._maxRate) this._curRate -= this._speedRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &gt; this._setVal) this._curVal -= this._speed;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curRate &lt; this._maxRate) this._curRate += this._speedRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &lt; this._setVal) this._curVal += this._speed;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Math.abs(this._curRate - this._maxRate) &lt; this._speedRate) this._curRate = this._maxRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (Math.abs(this._curVal - this._setVal) &lt; this._speed) this._curVal = this._setVal;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!animatedNumbers) this._curVal = this._setVal;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!animatedGauges) this._curRate = this._maxRate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.refresh = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._vocab) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x-1, this._y, this._width+2, this._window.lineHeight());&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height - 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x, gy, this._width, this._height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawGauge();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawText();<br />
}<br />
<br />
Special_Gauge.prototype.setRate = function(rate) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (rate != this._maxRate) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._maxRate = rate;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._speedRate = Math.abs(this._curRate - this._maxRate) / 60;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//TODO: More Falling Sprite Stuff<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
Special_Gauge.prototype.setExtra = function(text, val, max, yOffset) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._vocab = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._text = text;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._maxVal = max;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (val != this._setVal) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._speed = Math.max(0, Math.abs(this._curVal - val) / 60);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._setVal = val;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal == null) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._curVal = val;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._yOffset = yOffset ? yOffset : 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.refresh();<br />
}<br />
<br />
Special_Gauge.prototype.drawGauge = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = Math.round((this._width - 2) * this._curRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_ww = Math.round((this._width - 2) * this._maxRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height - 1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (this._text) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.hpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = hpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = hpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.mpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = mpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = mpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case TextManager.tpA:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = tpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = tpBarTypeRight || barTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, this._width - 2, this._height, this._window.gaugeBackColor(), true);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, fill_w, this._height, this._color[0], this._color[1], "atop");<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.drawTrap(this._x, gy, this._width - 2, this._height, gaugeOutColor);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
}<br />
<br />
Special_Gauge.prototype.fontSize = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return 28;<br />
}<br />
<br />
Special_Gauge.prototype.drawText = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._vocab) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.fontSize = this.fontSize();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._showEHPHP) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.systemColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(this._text, this._x + 1, this._y + this._yOffset, 30);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._showEHPText) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._critTextColor) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._curVal &lt; this._maxVal / 10) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.deathColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (this._curVal &lt; this._maxVal / 4) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.crisisColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var xr = this._x + this._width;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this._width &lt; 186) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(Math.round(this._curVal), xr - 40, this._y + this._yOffset, 40, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(Math.round(this._curVal), xr - 92, this._y + this._yOffset, 42, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.changeTextColor(this._window.normalColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText("/", xr - 52, this._y + this._yOffset, 12, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._window.drawText(this._maxVal, xr - 42, this._y + this._yOffset, 40, "right");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
//=============================================================================<br />
// Pretty Gauges<br />
//=============================================================================<br />
Bitmap.prototype.drawTrap = function(x, y, width, height, color1, color2, shouldFill) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var context = this._context;<br />
&nbsp;&nbsp;&nbsp;&nbsp;var grad = context.createLinearGradient(x, y, x + width, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var startCoords = [];<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (typeof color2 === 'boolean') {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shouldFill = color2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color2 = undefined;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (color2 === undefined) color2 = color1;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldFill === "atop") {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.globalCompositeOperation = 'source-atop';<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.globalCompositeOperation = 'source-over';<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;grad.addColorStop(0, color1);<br />
&nbsp;&nbsp;&nbsp;&nbsp;grad.addColorStop(1, color2);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.save();<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.beginPath();<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (barTypeLeft) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "|":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "/":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + height, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&lt;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height/2, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height/2, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y + height/2)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + height/2, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "(":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height, y + height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.bezierCurveTo(x, y + height, x, y, x + height, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ".":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&#92;&#92;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startCoords = [x + height, y + height]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.moveTo(x + height, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;switch (barTypeRight) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "|":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "/":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&gt;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height/2, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height/2)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height/2, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ")":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.bezierCurveTo(x + width, y, x + width, y + height, x + width - height, y + height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case ".":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case "&#92;&#92;":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width - height, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(x + width, y + height)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.lineTo(startCoords[0], startCoords[1])<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldFill) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.fillStyle = grad;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.fill();<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.strokeStyle = grad;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.stroke();<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;context.restore();<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._setDirty();<br />
}<br />
<br />
//=============================================================================<br />
// EnemyGauges<br />
//=============================================================================<br />
if (showEnemyHP) {<br />
<br />
function Window_EnemyHPBars() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
};<br />
<br />
Window_EnemyHPBars.prototype = Object.create(Window_Base.prototype);<br />
Window_EnemyHPBars.prototype.constructor = Window_EnemyHPBars;<br />
<br />
Window_EnemyHPBars.prototype.initialize = function(sprites) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.initialize.call(this, 0, 0, Graphics.boxWidth, Graphics.boxHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.opacity = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemySprites = sprites.slice().reverse();<br />
};<br />
<br />
Window_EnemyHPBars.prototype.standardPadding = function() {<br />
&nbsp;&nbsp; return 0;<br />
};<br />
<br />
Window_EnemyHPBars.prototype.drawActorHp = function(actor, x, y, width) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;width = width || 186;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges &amp;&amp; this._gauges[this.makeGaugeKey(x, y)] &amp;&amp; this._gauges[this.makeGaugeKey(x, y)]._curVal === 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.contents.clearRect(x - defaultHeight, y, width + defaultHeight, this.lineHeight() + defaultHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (!&#36;dataEnemies[actor.enemyId()].meta.HideEnemyHPBar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = &#36;dataEnemies[actor.enemyId()].meta.BarTypeLeft || hpBarTypeLeft || barTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = &#36;dataEnemies[actor.enemyId()].meta.BarTypeRight || hpBarTypeRight || barTypeRight;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawAnimatedGauge(x, y, width, actor.hpRate(), this.hpGaugeColor1(), this.hpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setExtra(TextManager.hpA, actor.hp, actor.mhp, textYOffset);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeGaugeKey(x, y)].setTextVisibility(showEHPHP, showEHPText);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeLeft = saveBarTypeLeft;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;barTypeRight = saveBarTypeRight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (shouldDrawEnemyMP &amp;&amp; (drawEnemyMPWhenNoMP || actor.mmp &gt; 0) &amp;&amp; !&#36;dataEnemies[actor.enemyId()].meta.HideEnemyMPBar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawTinyGauge(x + tinyGaugeXOffset, y + 1 + tinyGaugeYOffset, width + tinyWidthAdjust, actor.mpRate(), this.mpGaugeColor1(), this.mpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeTGaugeKey(x + tinyGaugeXOffset, y + 1 + tinyGaugeYOffset)].setExtra(TextManager.mpA, actor.mp, actor.mmp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;// Maybe this'll be useful someday<br />
&nbsp;&nbsp;&nbsp;&nbsp;// y += defaultTinyHeight;<br />
&nbsp;&nbsp;&nbsp;&nbsp;// if (shouldDrawEnemyTP &amp;&amp; actor.mtp &gt; 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;// &nbsp;&nbsp;&nbsp;&nbsp;this.drawTinyGauge(x + tinyGaugeXOffset, y + 1 + defaultTinyHeight, width, actor.tpRate(), this.tpGaugeColor1(), this.tpGaugeColor2());<br />
&nbsp;&nbsp;&nbsp;&nbsp;// &nbsp;&nbsp;&nbsp;&nbsp;this._gauges[this.makeTGaugeKey(x + tinyGaugeXOffset, y + 1 + defaultTinyHeight)].setExtra(TextManager.tpA, actor.tp, actor.mtp);<br />
&nbsp;&nbsp;&nbsp;&nbsp;// }<br />
}<br />
<br />
Window_EnemyHPBars.prototype.makeTGaugeKey = function(x, y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;return "tk" + x + "-" + y;<br />
}<br />
<br />
Window_EnemyHPBars.prototype.drawTinyGauge = function(x, y, width, rate, c1, c2) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges == null) { this._gauges = {} };<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gkey = this.makeTGaugeKey(x, y)<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (this._gauges[gkey]) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey].setRate(rate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this._gauges[gkey] = new Line_Gauge(x, y, width, rate, c1, c2, this, defaultTinyHeight);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
Window_EnemyHPBars.prototype.update = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;Window_Base.prototype.update.call(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var width = EHPbarWidth, x, y;<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var i = 0; i &lt; &#36;gameTroop._enemies.length; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!this._enemySprites[i].height || !this._enemySprites[i].width) continue;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = &#36;gameTroop._enemies[i].screenX() - (width + this.textPadding())/2 + EHPXOffset + (parseInt(&#36;dataEnemies[&#36;gameTroop._enemies[i].enemyId()].meta.HPBarXOffset) || 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = &#36;gameTroop._enemies[i].screenY() - this.lineHeight() + EHPYOffset + (parseInt(&#36;dataEnemies[&#36;gameTroop._enemies[i].enemyId()].meta.HPBarYOffset) || 0);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (showUpTop) y -= this._enemySprites[i].height * EHPYMultiplier;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.drawActorHp(&#36;gameTroop._enemies[i], x, y, width);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
function Line_Gauge() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.initialize.apply(this, arguments);<br />
}<br />
Line_Gauge.prototype = Object.create(Special_Gauge.prototype);<br />
Line_Gauge.prototype.constructor = Line_Gauge;<br />
<br />
Line_Gauge.prototype.refresh = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.clearRect(this._x, this.y, this._width, this._height);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.drawGauge();<br />
}<br />
<br />
Line_Gauge.prototype.drawGauge = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_w = Math.round((this._width - 2 - defaultHeight) * this._curRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var fill_ww = Math.round((this._width - 2) * this._maxRate);<br />
&nbsp;&nbsp;&nbsp;&nbsp;var gy = this._y + this._window.lineHeight() - this._height;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.fillRect(this._x - 1, gy, this._width - defaultHeight, this._height + 2, gaugeOutColor);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.fillRect(this._x, gy + 1, this._width - 2 - defaultHeight, this._height, this._window.gaugeBackColor());<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._window.contents.gradientFillRect(this._x, gy + 1, fill_w, this._height, this._color[0], this._color[1]);<br />
}<br />
<br />
Line_Gauge.prototype.drawText = function() {};<br />
<br />
if (showOver) {<br />
var alias_Scene_Battle_createSpriteset = Scene_Battle.prototype.createSpriteset;<br />
Scene_Battle.prototype.createSpriteset = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;alias_Scene_Battle_createSpriteset.call(this);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow = new Window_EnemyHPBars(this._spriteset._enemySprites);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this.addChild(this._enemyHPBarWindow);<br />
};<br />
<br />
} else {<br />
var alias_Spriteset_Battle_createEnemies = Spriteset_Battle.prototype.createEnemies;<br />
Spriteset_Battle.prototype.createEnemies = function() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;alias_Spriteset_Battle_createEnemies.call(this);<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow = new Window_EnemyHPBars(this._enemySprites);<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._enemyHPBarWindow.z = 2;<br />
&nbsp;&nbsp;&nbsp;&nbsp;this._battleField.addChild(this._enemyHPBarWindow);<br />
};<br />
}<br />
<br />
Sprite_Enemy.prototype.updateStateSprite = function() {<br />
&nbsp;&nbsp; this._stateIconSprite.y = -Math.round((this.bitmap.height + EHPStateYOffset) * 0.9);<br />
&nbsp;&nbsp; if (this._stateIconSprite.y &lt; 20 - this.y) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this._stateIconSprite.y = 20 - this.y;<br />
&nbsp;&nbsp; }<br />
&nbsp;&nbsp; this._stateIconSprite.y += (parseInt(&#36;dataEnemies[this._enemy.enemyId()].meta.HPBarYOffset) || 0);<br />
&nbsp;&nbsp; this._stateIconSprite.x = EHPStateXOffset + (parseInt(&#36;dataEnemies[this._enemy.enemyId()].meta.HPBarXOffset) || 0);<br />
};<br />
} // End Enemy HP bars<br />
<br />
})();</code></div></div>
</div></div><span style="color: red;"><span style="font-weight: bold;">Screeny:</span></span><br />
<div class="spoiler"><div class="spoiler_header">Spoiler: <a href="javascript:void(0);" onclick="javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Otwórz)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Zamknij)';}"> (Otwórz) </a></div><div class="spoiler_body" style="display: none;"><img class="postimage" src="http://forum.ultimateam.pl/files/plugins/screen/PrettySleekGauges.jpg" border="0" alt="[Obrazek: PrettySleekGauges.jpg]" /><br />
</div></div><span style="color: red;"><span style="font-weight: bold;">Dodatkowe informacje:</span></span><br />
Skrypt w postaci pliku .js należy umieścić w folderze gry <img class="postimage" src="/images/smiles/icon_arrow.gif" style="vertical-align: middle;" border="0" alt=":arrow:" title=":arrow:" /> js/plugins<br /><!-- start: postbit_attachments_attachment -->
<br /><img src="images/attachtypes/txt.gif" border="0" alt=".js" />&nbsp;&nbsp;<a href="attachment.php?aid=5" target="_blank">PrettySleekGauges.js</a> (Rozmiar: 28.21 KB / Pobrań: 10)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
	</channel>
</rss>