Black_Mage icon

Skip Message Feature RMVXA Script

Black_Mage | PRO | 12/31/23 10:57:45 AM UTC (Edited) | 0 ⭐ | 1109 👁️ | Never ⏰ | []
Ruby |

4.27 KB

|

None

|

0 👍

/

0 👎

#==============================================================================
# ** Skip Message Script by Black Mage
# Version: 1.5
#
# https://burningwizard.wordpress.com/2015/04/23/skip-message-feature-script-rmvxace-rgss3/
#
#==============================================================================
# With this you can skip messages by pressing CTRL.
#==============================================================================
 
=begin
#==============================================================================
# MIT License
#==============================================================================
Copyright 2015-2023 Black Mage
 
Permission is hereby granted, free of charge, to any person obtaining a copy of 
this software and associated documentation files (the “Software”), to deal in 
the Software without restriction, including without limitation the rights to use, 
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 
Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#==============================================================================
=end
 
#==============================================================================
# Changelog
#==============================================================================
# Version 1.5
#   - Add compatibility with Regendo's Menu While Message.
#   - Add compatibility with MKXP.
#
# Version 1.4
#   - Integrate the script to $imported.
#
# Version 1.3
#   - Add compatibility with Vlue's Basic Mouse System.
#
# Version 1.2
#   - Simplify the codes.
#
# Version 1.1
#   - Gave the script some enhanced performance.
#
# Version 1.0
#   - Initial version.
#==============================================================================
 
#==============================================================================
# Notes
#==============================================================================
# 1. If you're using Vlue's Basic Mouse System, put this script below it.
# 2. If you're using Regendo's Menu While Message, put this script below it.
#==============================================================================
 
#------------------------------------------------------------------------------
# * Beyond this is the sacred land of code. You need programming qualification
#   to dwelve deeper, or it'll cause many unnecessary problems. Proceed on your
#   own risk.
#------------------------------------------------------------------------------
 
$imported = {} if $imported.nil?
$imported["BLACK_MAGE-SkipMessage"] = true
 
class Window_Message < Window_Base 
  # Redefine input_pause method.
  def input_pause
    self.pause = true; wait(10)
    # Check if Regendo's module is defined.
    if defined?(Regendo)
      case BUTTON
      when Input::B
        Fiber.yield until Input.trigger?(:C) || Input.press?(:CTRL)
      when Input::C
        Fiber.yield until Input.trigger?(:B)|| Input.press?(:CTRL)
      else
        Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C)|| Input.press?(:CTRL)
      end
    #check if Vlue's Mouse module is defined.
    elsif defined?(Mouse)
      Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C) || Input.press?(:CTRL) || Mouse.lclick?
    else
      Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C) || Input.press?(:CTRL)
    end
    Input.update; self.pause = false
  end
  alias skip_u_s_f update_show_fast
  def update_show_fast; Input.press?(:CTRL) ? @show_fast = true : skip_u_s_f; end
  alias skip_wait wait
  def wait(duration); return if Input.press?(:CTRL); skip_wait(duration); end 
end

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎