Drupogame


Si quieres formar parte del staff tienes que enviar un MP al administrador o al Co-Administrador
Conectarse

Recuperar mi contraseña

Buscar
 
 

Resultados por:
 


Rechercher Búsqueda avanzada

Los posteadores más activos del mes

Estadísticas
Tenemos 97 miembros registrados.
El último usuario registrado es Sondorax

Nuestros miembros han publicado un total de 6208 mensajes en 777 argumentos.
Compañeros
Crear foro
Crear foro
Crear foro
Crear foro
PFC
Crear foro
Crear foro
Otakus Activos
Diviértete acá
Crear foro
Foro de anime y RM2k3/XP/VX
contador.
contador de visitas
Noviembre 2018
LunMarMiérJueVieSábDom
   1234
567891011
12131415161718
19202122232425
2627282930  

Calendario Calendario


[Script XP] Menu Estilo FF III

Ir abajo

[Script XP] Menu Estilo FF III

Mensaje por Akeo el Miér Mar 23, 2011 12:35 pm

Descripción:
Crea un menú parecido al del juego Final Fantasy III.

Spoiler:


Código:
#===============================================================================


# Final Fantay III Menu Style
#-------------------------------------------------------------------------------
# - By Zero Maverick Hunter -
# - Created - 20 / 08 / 2007 -
# - Based on FF3 Real Menu -
#===============================================================================


#
# Intrucciones:
#
# Necesitas poner las Faces de los personajes en la carpeta "Pictures". Su tamaño
# es de 80 x 80 o 100 x 100 píxeles, y se llaman así:
#  "Z" + "Nombre del Battler del Personaje"*
#
#===============================================================================



#===============================================================================


# Window_Base
#-------------------------------------------------------------------------------
# Adding Faces to the Menu and applying some changes
#===============================================================================



class Window_Base < Window

 def ff3_color
  return Color.new(50, 230, 255, 255)
 end

 def draw_actor_face(actor, x, y)
  face = RPG::Cache.picture("Z" + actor.character_name)
  fw = face.width
  fh = face.height
  src_rect = Rect.new(0, 0, fw, fh)
  self.contents.blt(x - fw / 23, y - fh, face, src_rect)
 end

 def draw_actor_level(actor, x, y)
  self.contents.font.color = ff3_color
  self.contents.draw_text(x, y, 32, 32, "Nv")
  self.contents.font.color = normal_color
  self.contents.draw_text(x + 80, y, 24, 32, actor.level.to_s, 2)
 end

 def draw_actor_hp(actor, x, y, width = 144)
  self.contents.font.color = ff3_color
  self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  if width - 32 >= 108
    hp_x = x + width - 108
    flag = true
  elsif width - 32 >= 48
    hp_x = x + width - 48
    flag = false
  end
  self.contents.font.color = actor.hp == 0 ? knockout_color :
    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  self.contents.draw_text(hp_x + 20, y, 48, 32, actor.hp.to_s, 2)
  if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(hp_x + 68, y, 12, 32, "/", 1)
    self.contents.draw_text(hp_x + 115, y, 48, 32, actor.maxhp.to_s)
  end
 end

 def draw_actor_sp(actor, x, y, width = 144)
  self.contents.font.color = ff3_color
  self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  if width - 32 >= 108
    sp_x = x + width - 108
    flag = true
  elsif width - 32 >= 48
    sp_x = x + width - 48
    flag = false
  end
  self.contents.font.color = actor.sp == 0 ? knockout_color :
    actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  self.contents.draw_text(sp_x + 20, y, 48, 32, actor.sp.to_s, 2)
  if flag
    self.contents.font.color = normal_color
    self.contents.draw_text(sp_x + 68, y, 12, 32, "/", 1)
    self.contents.draw_text(sp_x + 115, y, 48, 32, actor.maxsp.to_s)
  end
 end
end

#===============================================================================


# Window_Stats
#-------------------------------------------------------------------------------
# This Window shows the  Money and Steps
#===============================================================================



class Window_FF3_Stats < Window_Base

 def initialize
  super(0, 0, 135, 127)
  self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = $fontface
  self.contents.font.size = $fontsize
  refresh
 end

 def refresh
  self.contents.clear
  self.contents.clear
  self.contents.font.color = ff3_color
  self.contents.draw_text(2, -8, 120, 32, "Pasos")
  self.contents.font.color = normal_color
  self.contents.draw_text(-20, 20, 120, 32, $game_party.steps.to_s, 2)

  cx = contents.text_size($data_system.words.gold).width
  self.contents.font.color = normal_color
  self.contents.draw_text(0, 67, 120-cx-2, 32, $game_party.gold.to_s, 2)
  self.contents.font.color = ff3_color
  self.contents.draw_text(2, 42, cx, 32, $data_system.words.gold, 2)
 end
end

#===============================================================================


# Window_FF3_PlayTime
#-------------------------------------------------------------------------------
# This Window shows the Played Time, just minutes and hours
#===============================================================================



class Window_FF3_PlayTime < Window_Base

 def initialize
  super(0, 0, 120, 97)
  self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = $fontface
  self.contents.font.size = $fontsize
  refresh
 end

 def refresh
  self.contents.clear
  self.contents.font.color = ff3_color
  self.contents.draw_text(4, 0, 120, 24, "Tiempo")
  @total_sec = Graphics.frame_count / Graphics.frame_rate
  hour = @total_sec / 60 / 60
  min = @total_sec / 60 % 60
  sec = @total_sec % 60
  text = sprintf("%2d:%02d", hour, min)
  self.contents.font.color = normal_color
  self.contents.draw_text(-38, 38, 120, 24, text, 2)
 end

 def update
  super
  if Graphics.frame_count / Graphics.frame_rate != @total_sec
    refresh
  end
 end
end

#===============================================================================


# Window_MenuStatus
#-------------------------------------------------------------------------------
# Writes part of the actors status
#===============================================================================



class Window_FF3_MenuStatus < Window_Selectable

 def initialize
  super(0, 0, 545, 480)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.contents.font.name = $fontface
  self.contents.font.size = $fontsize
  refresh
  self.active = false
  self.index = -1
 end

 def refresh
  self.contents.clear
  @item_max = $game_party.actors.size
  for i in 0...$game_party.actors.size
    x = 94
    y = i * 114
    actor = $game_party.actors[i]
    draw_actor_face(actor, 7, y + 104)
    draw_actor_name(actor, x + 30, y)
    draw_actor_level(actor, x + 50, y + 33)
    draw_actor_hp(actor, x + 50, y + 50)
    draw_actor_sp(actor, x + 50, y + 67)
  end
 end

 def update_cursor_rect
  if @index < 0
    self.cursor_rect.empty
  else
    self.cursor_rect.set(-3, @index * 114, self.width - 150, 107)
  end
 end
end

#===============================================================================


# FF3 Menu Style
#-------------------------------------------------------------------------------
# Combine multiple kind of Windows to make the Scene_Menu like in FF3
#===============================================================================



class Scene_Menu

 def initialize(menu_index = 0, order_index = 0)
  @menu_index = menu_index
  @order_index = order_index
  @changer = 0
  @where = 0
  @checker = 0
 end
 
 def main
  s1 = "  Items"
  s2 = "  Magic"
  s3 = "  Equip"
  s4 = "  Status"
  s5 = "  Save"
  @command_window = Window_Command.new(120, [s1, s2, s3, s4, s5])
  @command_window.x = 475
  @command_window.y = 0
  @command_window.z = 110
  @command_window.index = @menu_index
  @command_window.opacity = 255

  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

  u1 = "  Order"
  @order_window = Window_Command.new(110, [u1])
  @order_window.x = 0
  @order_window.y = 0
  @order_window.index = @order_index
  @order_window.opacity = 255
  @order_window.active = false
  @order_window.visible = false

  if $game_party.actors.size == 1
    @order_window.disable_item(0)
  end

  @status_window = Window_FF3_MenuStatus.new
  @status_window.x = 50
  @status_window.y = 0
  @status_window.opacity = 255

  @time_window = Window_FF3_PlayTime.new
  @time_window.x = 475
  @time_window.y = 256
  @time_window.z = 110
  @time_window.opacity = 255

  @stats_window = Window_FF3_Stats.new
  @stats_window.x = 460
  @stats_window.y = 353
  @stats_window.z = 110
  @stats_window.opacity = 255

  Graphics.transition
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end
  Graphics.freeze
  @command_window.dispose
  @order_window.dispose
  @status_window.dispose
  @time_window.dispose
  @stats_window.dispose
 end

 def update
  @time_window.update
  @stats_window.update
  @command_window.update
  if @command_window.active
    update_command
    return
  end
  @order_window.update
  if @order_window.active
    update_order
    return
  end
  @status_window.update
  if @status_window.active
    update_status
    return
  end
 end
 
 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::LEFT)
    $game_system.se_play($data_system.decision_se)
    @command_window.active = false
    @command_window.visible = false
    @time_window.visible = false
    @stats_window.visible = false
    @status_window.x = 110
    @order_window.visible = true
    @order_window.active = true
    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
    if $game_party.actors.size == 1 and @command_window.index == 5
      $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_Item.new
    when 1
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 2
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 3
      $game_system.se_play($data_system.decision_se)
      @command_window.active = false
      @status_window.active = true
      @status_window.index = 0
    when 4
      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
    end
    return
  end
 end

 def update_order
  if Input.trigger?(Input::RIGHT)
    $game_system.se_play($data_system.cancel_se)
    @order_window.active = false
    @order_window.visible = false
    @command_window.visible = true
    @time_window.visible = true
    @stats_window.visible = true
    @status_window.x = 50
    @command_window.active = true
    return
  end
  if Input.trigger?(Input::C)
    if $game_party.actors.size == 1
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.decision_se)
    @checker = 0
    @order_window.active = false
    @status_window.active = true
    @status_window.index = 0
    return
  end
 end

 def update_status
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    if @command_window.visible
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
    end
    if @order_window.visible
      @status_window.active = false
      @order_window.active = true
      @status_window.index = -1
    end
    return
  end
  if Input.trigger?(Input::C)
    if @command_window.visible
      case @command_window.index
      when 1
        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
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
    end
    if @order_window.visible
      case @order_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        if @checker == 0
          @changer = $game_party.actors[@status_window.index]
          @where = @status_window.index
          @checker = 1
        else
          $game_party.actors[@where] = $game_party.actors[@status_window.index]
          $game_party.actors[@status_window.index] = @changer
          @checker = 0
          @status_window.refresh
        end
      end
    end
    return
  end
 end
end

Instrucciones:
Coloca el script sobre Main.
Sigue las instrucciones en la parte superior del script.
Para cambiar el orden de los personajes, pulsa '<-' (izquierda) en el menú.

Créditos:
Script creado por Zero Maverick Hunter.

_______________________________



avatar
Akeo
Administrador
Administrador

Mensajes : 1876
Fecha de inscripción : 02/01/2011
Edad : 24

Ver perfil de usuario http://drupogame.superforo.net

Volver arriba Ir abajo

Re: [Script XP] Menu Estilo FF III

Mensaje por The_King_Jaas el Miér Mar 23, 2011 4:13 pm

Este fue uno de los primeros menús que conocí en mi vida como maker, es muy bueno y recomendable.

_______________________________




avatar
The_King_Jaas
Co-Administrador
Co-Administrador

Mensajes : 1737
Fecha de inscripción : 02/02/2011

Ver perfil de usuario

Volver arriba Ir abajo

Volver arriba

- Temas similares

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