[XP] 2 botones mas en menú [Aporte]

OP

~Doku

Banneado
Mensajes
1.024
Reacciones
0
Puntos
0
Ubicación
Mafia
Hola, vengo a aportar uno de los fabulosos script de falcao.

-Nombre: 2 botones mas en menú

-Autor: Falcao

Lo que hace este script es añadir 2 botones extras al menú.

-Instrucciones:

Basta con copiar y pegar como un nuevo script a sus proyectos... en el segundo botón nuevo "Info" sirve para mostrar una imagen ya sea para información del juego un logotipo o lo que vos querrás poner de imagen, ve al script en el module Falcao_Custom_Menu edita esto Imagen_Info = "" entre las comillas se pone el nombre de la imagen a mostrarse debe estar en la carpeta Pictures.

-Script:

Código:
#=================================================================#
#=================================================================#
#  #*****************#      Custom menu ADD-ON agrega 2 botones  #
#  #*** By Falcao ***#      nuevos con opsiones como ver comandos #          
#  #*****************#      y ver info de una imagen customisada  #
#        RMXP                                                    #
#  makerpalace.onlinegoo.com                                      #
#=================================================================#

module Falcao_Custom_Menu
#------------------------------------------------------------------  
# Nombre de la opsion 6
Opsion_6 = "Comandos"
#------------------------------------------------------------------
# Nombre de la opsion 7
Opsion_7 = "Info"
#------------------------------------------------------------------
# Imagen a mostrarse al seleccionar opsion 7 info por defecto,
# Poner el nombre de la imagen entre las comillas
Imagen_Info = ""
#------------------------------------------------------------------
#        * Funsion Opsional
# Si usas la Scena_Deluxe que muestra los opsiones como juekebox.etc
# Cambiar esta opsion a true, el script modificara un poco el menu
# Y te mandara al scene deluxe
Scena_Deluxe = false
#------------------------------------------------------------------
end

class Window_Comandos < Window_Base
  def initialize
    super(0, 100, 640, 285)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    #---------------------------------------------------------------
    # * Editar aqui abajo los nombres de teclas de comandos
    #---------------------------------------------------------------
    self.contents.draw_text (30, 0, 180, 32,"Tecla C")
    self.contents.draw_text (30, 35, 180, 32, "Tecla X")
    self.contents.draw_text (30, 70, 180, 32, "Otra")
    self.contents.draw_text (30, 105, 180, 32, "Otra")
    self.contents.draw_text (30, 140, 180, 32, "Otra")
    self.contents.draw_text (30, 175, 180, 32, "Otra")
    self.contents.draw_text (30, 210, 180, 32, "Otra")
    #---------------------------------------------------------------
    # * Editar aqui abajo la descripsion de cada tecla
    #---------------------------------------------------------------
    self.contents.draw_text (150, 0, 180, 32, "Accion Boton")
    self.contents.draw_text (150, 35, 180, 32, "Menu/salir")
    self.contents.draw_text (150, 70, 180, 32, "Descripsion")
    self.contents.draw_text (150, 105, 180, 32, "Descripsion")
    self.contents.draw_text (150, 140, 180, 32, "Descripsion")
    self.contents.draw_text (150, 175, 180, 32, "Descripsion")
    self.contents.draw_text (150, 210, 180, 32, "Descripsion")
    #-------------------------------------------------------------
    # * Aqui se edita el estado del protagonista
    #-------------------------------------------------------------
    self.contents.draw_text (410, 0, 180, 32, "Protagonista")
    self.contents.draw_text (410, 135, 180, 32, "Estado")
    actor = $game_party.actors[0]
    draw_actor_graphic(actor, 420,  120)
    draw_actor_name(actor, 450, 50)
    draw_actor_level(actor, 450, 70)
    draw_actor_state(actor, 480, 135)
    draw_actor_hp(actor, 410, 170)
    draw_actor_sp(actor, 410, 200)
  end
end

class Window_Titulo < Window_Base
  def initialize
    super(0, 0, 640, 100)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.size = 30
    self.contents.draw_text(0, 10, 608, 50, "Comandos",1)
  end
end

class Scene_Comandos
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = "Atras"
    s2 = "Salir"
    @command_window = Window_Command.new(160, [s1,s2])
    @command_window.index = @menu_index
    @comandos_window = Window_Comandos.new
    @titulo_window = Window_Titulo.new
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 385
    @local_window = Window_Local.new
    @local_window.x = 159
    @local_window.y = 385
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 480
    @playtime_window.y = 385
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @comandos_window.dispose
    @titulo_window.dispose
    @command_window.dispose
    @steps_window.dispose
    @local_window.dispose
    @playtime_window.dispose
  end
    def update
    @command_window.update
    @steps_window.update
    @playtime_window.update
    if @command_window.active
      update_command
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(5)
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Menu.new(5)
      when 1  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
          end
      return
    end
  end
end
#---------------------------------------------------------------
# * Aqui se dibuja la imajen a mostrarse si es que existe
#---------------------------------------------------------------
class Window_InfoPic < Window_Base
  def initialize
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.size = 30
    self.contents.draw_text(0, 200, 608, 50, "No Hay Imagen Informativa",1)
    pic_Info = RPG::Cache.picture(Falcao_Custom_Menu::Imagen_Info)  
    cw = pic_Info.width 
    ch = pic_Info.height 
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(0 , 0,pic_Info, src_rect)
  end
end

class Scene_Info_Pic
  def main
    @wimdow_info = Window_InfoPic.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @wimdow_info.dispose
  end
  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
    end
  end
end
#---------------------------------------------------------------
# * Aqui se dibuja la ventana de nombre de mapa
#---------------------------------------------------------------
class Window_Local < Window_Base
  def initialize
    super(0, 0, 322, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    data = load_data("Data/MapInfos.rxdata")
    self.contents.font.color = system_color
    self.contents.draw_text(0, 18, 150, 32, "Localización:")
    self.contents.font.color = normal_color
    self.contents.draw_text(90, 18, 150, 32, data[$game_map.map_id].name, 2)
  end
end
#---------------------------------------------------------------
# * aqui se crea el menu persinalizado
#---------------------------------------------------------------
class Scene_Menu
  include Falcao_Custom_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = Opsion_6
    s7 = Opsion_7
    if Scena_Deluxe == true
      s8 = "Mas Opsiones"
    else;  s8 = "Salir"
    end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7,s8])
    @command_window.index = @menu_index
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 287
    @playtime_window.height = 120
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 405
    @gold_window.height = 76
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  def update
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  # item
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  # skill
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 5  # end game
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Comandos.new
      when 6 
          $game_system.se_play($data_system.decision_se)
          $scene = Scene_Info_Pic.new
        when 7
          $game_system.se_play($data_system.decision_se)
          if Scena_Deluxe == true
            $scene = Scene_Deluxe.new 
          else
          $scene = Scene_End.new  
        end
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 1  # skill
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

Saludos.
 
Mensajes
790
Reacciones
155
Puntos
0
Ubicación
Venezuela
Re: [XP]2 botones mas en menú[Aporte]

¡Si!... ¡Muy bueno!... Pero nuevamente, no me servirá ._.

Pero como dije anteriormente, a alguien mas le servirá.

Sigue aportando!
 
Arriba Pie