RPG maker VX
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

[ Ver toda la lista ]


La mayor cantidad de usuarios en línea fue 117 el Mar 09 Ago 2011, 3:39 pm.

[Aporte]Banner para todo[VX]

Ir abajo

RPG Maker Vx [Aporte]Banner para todo[VX]

Mensaje por luistop12 el Miér 03 Abr 2013, 11:35 am

¿Qué hace?


Crea un banner que te dice tu lugar actual, Cuanto dinero has ganado, Que items has ganado y demás.

¿Como se usa?

Simplemente pega sobre main

Captura

[Tienes que estar registrado y conectado para ver esa imagen]
[Tienes que estar registrado y conectado para ver esa imagen]

Script


Spoiler:
Código:
# ============================================================================ #
# Message Queue v1.0 by Marc (of Fall From Eden)                              #
# This script is licensed under the Creative Commons BY-SA 3.0 license.        #
# ============================================================================ #
# DESCRIPTION                                                                  #
# ---------------------------------------------------------------------------- #
# This script creates a "message banner" at the top of the screen for showing  #
# non-critical (but useful) information to the player during gameplay. This    #
# banner can contain any messages you wish to place in it. These messages are  #
# handled in a "first-in, first-out" manner, creating a queue of messages to  #
# show to the player. Only one message is displayed at a time, but others can  #
# be added to the queue to display after the first message has faded out.      #
# ============================================================================ #
# USAGE INSTRUCTIONS                                                          #
# ---------------------------------------------------------------------------- #
# This script comes with its own assortment of "add-ons." The message banner  #
# does not show any messages ITSELF, but adding or creating methods which ADD  #
# to the banner can be incredibly easy.                                        #
#                                                                              #
# By default, the add-ons included in this script are automatic. There is no  #
# coding needed on your part to get them to work. You can find a list of these #
# add-ons in the Marc::Queue module below and set them as you desire. Setting  #
# an add-on to "true" will show the message while setting it to "false" will  #
# keep the message from displaying and run the original method the add-on      #
# aliased.                                                                    #
#                                                                              #
# NOTE: Messages shown for map names exclude text written between brackets.    #
# Map names will only show on the banner if the name of the new map is not the #
# same as the previous map. This keeps the banner from showing up more than    #
# once for the map if the player goes to the menu, and lets you define whole  #
# sections where you want the name shown only once. For instance, you could    #
# create an inn with two floors, one named "Inn[1F]" and the other "Inn[2F]".  #
# The banner would only display if the player entered from a location that is  #
# not named "Inn" in that case (like the town where the inn is located). ;)    #
#                                                                              #
# Also, by default, the banner will NOT show duplicate messages. If two of the #
# messages in the queue are identical, the duplicate message will be removed  #
# from the queue. You can change this behavior in the Marc::Queue module below #
# if that is not desired.                                                      #
#                                                                              #
# If you want to add messages to the banner yourself, you can easily do so in  #
# an event's Script command. Simply add the following:                        #
#                                                                              #
#    $game_map.queue.push("Your message here.")                              #
#                                                                              #
# If your message is too long to write on a single line, you can do this to    #
# get the same result:                                                        #
#                                                                              #
#    m = "Your message here."                                                #
#    $game_map.queue.push(m)                                                  #
#                                                                              #
# For scripters: the banner reads messages from the array @queue in $game_map. #
# Adding or modifying methods to show messages is therefore simple, requiring  #
# nothing more than pushing a string to the end of the array. You could also  #
# write scripts that rearrange or modify the contents of the banner, if you so #
# desire. :)                                                                  #
#                                                                              #
# Have fun! :)                                                                #
#    - Marc                                                                  #
# ============================================================================ #

module Marc
  module Queue
    # Set this to the switch you want to activate or deactivate the message
    # banner.
    SWITCH = 1
    # Should this switch be turned on automatically when starting a new game?
    ENABLED = true
   
    # The text alignment for the message banner. 0 is left-aligned, 1 is
    # centered, and 2 is right-aligned.
    ALIGNMENT = 1
    # The font you want the banner to display. By default, this is set to
    # Font.default_name, but you can specify an array of fonts instead. If the
    # first font in the array can't be used, it'll use the next, and so on.
    # For example: FONT = ["Verdana", "Arial", "Courier New"]
    FONT = Font.default_name
    # The background color of the message banner. Must be an instance of Color.
    # Write as Color.new(red, green, blue, transparency). Maximum values for
    # each are 255 (0 transparency is fully opaque, 255 fully transparent).
    BACKGROUND = Color.new(0, 0, 0, 128)
    # How much opacity is changed per frame when fading in or out. Increasing
    # this will cause messages to fade in and out faster, while decreasing it
    # will cause them to fade more slowly.
    FADE_STEP = 8
    # How long to show the message in frames after the fade-in is completed.
    WAIT = 120
    # Delete duplicate entries in the queue?
    REMOVE_DUPLICATES = true
   
    # Show message when a new map is loaded?
    MSG_MAP = true
    # Show message when gold is gained or lost?
    MSG_GOLD = true
    # Show message when items are gained or lost?
    MSG_ITEM = true
    # Show a message when a member is added or removed from the party?
    MSG_PARTY = true
    # Show a message when Change HP is used in an event?
    MSG_HP = true
    # Show a message when Change MP is used in an event?
    MSG_MP = true
    # Show a message when a state is added or removed in an event?
    MSG_STATE = true
    # Show a message when Recover All is used in an event?
    MSG_RECOVER = true
    # Show a message when experience is changed in an event?
    MSG_EXP = true
    # Show a message when a level is changed in an event?
    MSG_LEVEL = true
    # Show a message when an actor's parameters are changed in an event?
    MSG_PARAMETERS = true
    # Show a message when an actor learns or forgets a skill?
    MSG_SKILLS = true
    # Show a message when an actor's equipment changes in an event?
    MSG_EQUIPMENT = true
    # Show a message when an actor's name changes in an event?
    MSG_NAME = true
    # Show a message when an actor's class changes in an event?
    MSG_CLASS = true
  end
end # module Marc::Queue

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #
# !                      DO NOT EDIT BEYOND THIS POINT.                      ! #
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #

$imported = {} if $imported == nil
$imported["Marc_Message_Queue"] = true

# ============================================================================ #
# Game_Temp                                                                    #
# ---------------------------------------------------------------------------- #
# Aliased method: initialize                                                  #
# ============================================================================ #
if Marc::Queue::MSG_MAP
  class Game_Temp
    attr_accessor :old_map_name
   
    alias marc_queue_addons_initialize initialize
    def initialize
      @old_map_name = nil
      marc_queue_addons_initialize
    end # initialize
  end # class Game_Temp
end

# ============================================================================ #
# Game_Switches                                                                #
# ---------------------------------------------------------------------------- #
# Aliased methods: initialize                                                  #
# ============================================================================ #
if Marc::Queue::ENABLED
  class Game_Switches
    alias marc_queue_initialize initialize
    def initialize
      marc_queue_initialize
      @data[Marc::Queue::SWITCH] = true
    end # initialize
  end # class Game_Switches
end # if Marc::Queue::ENABLED

# ============================================================================ #
# Game_Map                                                                    #
# ---------------------------------------------------------------------------- #
# Aliased methods: initialize, setup                                          #
# New method: map_name                                                        #
# ============================================================================ #
class Game_Map
  attr_accessor :queue
   
  alias marc_queue_initialize initialize
  def initialize
    @queue = []
    marc_queue_initialize
  end # initialize
   
  if Marc::Queue::MSG_MAP
    alias marc_queue_addons_setup setup
    def setup(map_id)
      marc_queue_addons_setup(map_id)
      if $game_temp.old_map_name != map_name
        $game_temp.old_map_name = map_name
        unless map_name == "" or not $game_switches[Marc::Queue::SWITCH]
            @queue.push("You have entered #{map_name}.")
        end
      end
    end # setup
       
    def map_name
      data = load_data("Data/MapInfos.rvdata")
      return data[@map_id].name.gsub(/\[.*?\]/, "").strip
    end # map_name
  end
end # class Game_Map

# ============================================================================ #
# Game_Party                                                                  #
# ---------------------------------------------------------------------------- #
# Aliased methods: gain_gold, gain_item                                        #
# ============================================================================ #
if Marc::Queue::MSG_GOLD or Marc::Queue::MSG_ITEM
  class Game_Party < Game_Unit
    if Marc::Queue::MSG_GOLD
      alias marc_queue_addons_gain_gold gain_gold
      def gain_gold(n)
        marc_queue_addons_gain_gold(n)
        return if not $scene.is_a?(Scene_Map)
        return if not $game_switches[Marc::Queue::SWITCH]
        if n > 0
          if n == 1
            $game_map.queue.push("Found a #{Vocab::gold}.")
          else
            $game_map.queue.push("Found #{n} #{Vocab::gold}s.")
          end
        else
          if n == -1
            $game_map.queue.push("Lost a #{Vocab::gold}.")
          else
            $game_map.queue.push("Lost #{n.abs} #{Vocab::gold}s.")
          end
        end
      end # gain_gold
    end
   
    if Marc::Queue::MSG_ITEM
      alias marc_queue_addons_gain_item gain_item
      def gain_item(item, n, include_equip = false)
        queue_item = item.name.to_s unless item.nil?
        marc_queue_addons_gain_item(item, n, include_equip = false)
        return if not $scene.is_a?(Scene_Map)
        return if not $game_switches[Marc::Queue::SWITCH]
        unless item.nil?
          if n > 0
            if n == 1
              if queue_item =~ /^[aeiou]/i
                $game_map.queue.push("Found an #{queue_item}.")
              else
                $game_map.queue.push("Found a #{queue_item}.")
              end
            else
              $game_map.queue.push("Found #{n} #{queue_item}s.")
            end
          else
            if n == -1
              if queue_item =~ /^[aeiou]/i
                $game_map.queue.push("Lost an #{queue_item}.")
              else
                $game_map.queue.push("Lost a #{queue_item}.")
              end
            else
              $game_map.queue.push("Lost #{n} #{queue_item}s.")
            end
          end
        end
      end # gain_item
    end
  end # class Game_Party
end

# ============================================================================ #
# Game_Interpreter                                                            #
# ---------------------------------------------------------------------------- #
# Aliased methods: command_129, command_311, command_312, command_313,        #
#    command_314, command_315, command_316, command_317, command_318,        #
#    command_319, command_320                                                #
# ============================================================================ #
class Game_Interpreter
  if Marc::Queue::MSG_PARTY
    alias marc_queue_addons_command_129 command_129
    def command_129 # Change Party
      marc_queue_addons_command_129
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]]
        if actor != nil and @params[1] == 0
          $game_map.queue.push("#{actor.name} has joined #{$game_party.name}.")
        elsif actor != nil and @params[1] != 0
          $game_map.queue.push("#{actor.name} has left #{$game_party.name}.")
        end
      end
    end # command_129
  end
 
  if Marc::Queue::MSG_HP
    alias marc_queue_addons_command_311 command_311
    def command_311 # Change HP
      marc_queue_addons_command_311
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        value = operate_value(@params[1], @params[2], @params[3])
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        if value > 0
          $game_map.queue.push("#{name} recovered #{value} #{Vocab::hp}.")
        elsif value < 0
          $game_map.queue.push("#{name} lost #{value.abs} #{Vocab::hp}.")
        end
      end
    end # command_311
  end

  if Marc::Queue::MSG_MP
    alias marc_queue_addons_command_312 command_312
    def command_312 # Change MP
      marc_queue_addons_command_312
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        value = operate_value(@params[1], @params[2], @params[3])
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        if value > 0
          $game_map.queue.push("#{name} recovered #{value} #{Vocab::mp}.")
        elsif value < 0
          $game_map.queue.push("#{name} lost #{value.abs} #{Vocab::mp}.")
        end
      end
    end # command_312
  end
 
  if Marc::Queue::MSG_STATE
    alias marc_queue_addons_command_313 command_313
    def command_313 # Change State
      marc_queue_addons_command_313
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        state = $data_states[@params[2]]
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        if @params[1] == 0
          $game_map.queue.push("#{name}#{state.message1}")
        else
          $game_map.queue.push("#{name}#{state.message4}")
        end
      end
    end # command_313
  end
 
  if Marc::Queue::MSG_RECOVER
    alias marc_queue_addons_command_314 command_314
    def command_314 # Recover All
      marc_queue_addons_command_314
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        $game_map.queue.push("#{name} has been fully recovered.")
      end
    end # command_314
  end
 
  if Marc::Queue::MSG_EXP
    alias marc_queue_addons_command_315 command_315
    def command_315 # Change EXP
      marc_queue_addons_command_315
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        value = operate_value(@params[1], @params[2], @params[3])
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        if value > 0
          $game_map.queue.push("#{name} gained #{value} experience.")
        elsif value < 0
          $game_map.queue.push("#{name} lost #{value.abs} experience.")
        end
      end
    end # command_315
  end
 
  if Marc::Queue::MSG_LEVEL
    alias marc_queue_addons_command_316 command_316
    def command_316 # Change Level
      marc_queue_addons_command_316
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        value = operate_value(@params[1], @params[2], @params[3])
        actor = $game_actors[@params[0]] unless @params[0] == 0
        @params[0] == 0 ? name = $game_party.name : name = actor.name
        if @params[0] == 0
          if value > 0
            if value == 1
              $game_map.queue.push("#{name} gained a #{Vocab::level}.")
            else
              $game_map.queue.push("#{name} gained #{value} #{Vocab::level}s.")
            end
          elsif value < 0
            if value == -1
              $game_map.queue.push("#{name} lost a #{Vocab::level}.")
            else
              $game_map.queue.push
              ("#{name} lost #{value.abs} #{Vocab::level}s.")
            end
          end
        else
          $game_map.queue.push
          ("#{name} is now #{Vocab::level} #{actor.level + value}.")
        end
      end
    end # command_316
  end

  if Marc::Queue::MSG_PARAMETERS
    alias marc_queue_addons_command_317 command_317
    def command_317 # Change Parameters
      marc_queue_addons_command_317
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        value = operate_value(@params[2], @params[3], @params[4])
        actor = $game_actors[@params[0]]
        name = actor.name
        if actor != nil and value != 0
          case @params[1]
          when 0
            $game_map.queue.push
            ("#{name}'s maximum #{Vocab::hp} is now #{actor.maxhp}.")
          when 1
            $game_map.queue.push
            ("#{name}'s maximum #{Vocab::mp} is now #{actor.maxmp}.")
          when 2
            $game_map.queue.push("#{name}'s #{Vocab::atk} is now #{actor.atk}.")
          when 3
            $game_map.queue.push("#{name}'s #{Vocab::def} is now #{actor.def}.")
          when 4
            $game_map.queue.push("#{name}'s #{Vocab::spi} is now #{actor.spi}.")
          when 5
            $game_map.queue.push("#{name}'s #{Vocab::agi} is now #{actor.agi}.")
          end
        end
      end
    end # command_317
  end
 
  if Marc::Queue::MSG_SKILLS
    alias marc_queue_addons_command_318 command_318
    def command_318 # Change Skills
      marc_queue_addons_command_318
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]]
        if actor != nil
          name = actor.name
          skill = $data_skills[@params[2]]
          if @params[1] == 0
            $game_map.queue.push("#{name} learned #{skill.name}.")
          else
            $game_map.queue.push("#{name} forgot #{skill.name}.")
          end
        end
      end
    end # command_318
  end

  if Marc::Queue::MSG_EQUIPMENT
    alias marc_queue_addons_command_319 command_319
    def command_319 # Change Equipment
      marc_queue_addons_command_319
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]]
        if actor != nil
          name = actor.name
          if @params[1] == 0 or (@params[1] == 1 and actor.two_swords_style)
            equipment = $data_weapons[@params[2]]
          else
            equipment = $data_armors[@params[2]]
          end
          unless equipment.nil?
            $game_map.queue.push("#{name} has equipped #{equipment.name}.")
          else
            case @params[1]
            when 0
              $game_map.queue.push("#{name} has unequipped a weapon.")
            when 1
              $game_map.queue.push("#{name} has unequipped their shield.")
            when 2
              $game_map.queue.push("#{name} has unequipped their headgear.")
            when 3
              $game_map.queue.push("#{name} has unequipped their armor.")
            when 4
              $game_map.queue.push("#{name} has unequipped their accessory.")
            end
          end
        end
      end
    end # command_319
  end
 
  if Marc::Queue::MSG_NAME
    alias marc_queue_addons_command_320 command_320
    def command_320 # Change Name
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]]
        if actor != nil
          $game_map.queue.push("#{actor.name} is now known as #{@params[1]}.")
        end
      end
      marc_queue_addons_command_320
    end # command_320
  end
 
  if Marc::Queue::MSG_CLASS
    alias marc_queue_addons_command_321 command_321
    def command_321 # Change Class
      marc_queue_addons_command_321
      if $scene.is_a?(Scene_Map) and $game_switches[Marc::Queue::SWITCH]
        actor = $game_actors[@params[0]]
        new_class = $data_classes[@params[1]]
        if actor != nil and new_class != nil
          if new_class.name =~ /^[aeiou]/i
            $game_map.queue.push("#{actor.name} is now an #{new_class.name}.")
          else
            $game_map.queue.push("#{actor.name} is now a #{new_class.name}.")
          end
        end
      end
    end # command_321
  end
end # class Game_Interpreter

# ============================================================================ #
# Spriteset_Map                                                                #
# ---------------------------------------------------------------------------- #
# Aliased methods: initialize, update, dispose                                #
# ============================================================================ #
class Spriteset_Map
  alias marc_queue_initialize initialize
  def initialize
    marc_queue_initialize
    @queue = Marc_Queue.new(@viewport3) if $game_switches[Marc::Queue::SWITCH]
  end # initialize
 
  alias marc_queue_update update
  def update
    if $game_switches[Marc::Queue::SWITCH]
      @queue.update unless @queue.nil?
    else
      $game_map.queue.clear if $game_map.queue != nil
    end
    marc_queue_update
  end # update
 
  alias marc_queue_dispose dispose
  def dispose
    @queue.dispose unless @queue.nil?
    marc_queue_dispose
  end # dispose
end # class Spriteset_Map

# ============================================================================ #
# Marc_Queue                                                                  #
# ---------------------------------------------------------------------------- #
# Methods: initialize, update, dispose                                        #
# ============================================================================ #
class Marc_Queue < Sprite_Base
  def initialize(viewport)
    super(viewport)
    @counter = 0
    self.opacity = 0
  end # initialize
 
  def update
    return if $game_map.queue.empty?
    $game_map.queue.uniq! if Marc::Queue::REMOVE_DUPLICATES
    if self.bitmap.nil? and @counter == 0
      self.bitmap = Bitmap.new(Graphics.width, 24)
      self.bitmap.fill_rect(0, 0, Graphics.width, 24, Marc::Queue::BACKGROUND)
      self.bitmap.font.name = Marc::Queue::FONT
      self.bitmap.draw_text(0, 0, Graphics.width - 4, 24,
        $game_map.queue[0].to_s, Marc::Queue::ALIGNMENT)
      self.z = 500
    end
    if self.opacity < 255 and @counter < Marc::Queue::WAIT
      self.opacity += Marc::Queue::FADE_STEP
    end
    if @counter < Marc::Queue::WAIT
      @counter += 1
    else
      self.opacity -= Marc::Queue::FADE_STEP if self.opacity > 0
      if self.opacity <= 0
        $game_map.queue.shift
        self.bitmap = nil
        @counter = 0
      end
    end
  end # update
end # class Marc_Queue

Demo

Spoiler:

Creditos:Marc of Fall From Eden
avatar
luistop12
500
500

Masculino

Edad 28

Cantidad de envíos 759

Maker Cash 946

Reputación 42


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.