¡Bienvenid@ a Mundo Maker!

¿Quieres aprender todo sobre el RPG Maker?



Regístrate y forma parte de Mundo Maker.
Conectarse

Recuperar mi contraseña

Temas importantes
----------------------------------------
Páginas con recursos RPG Maker
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
Afiliados
Estadísticas
Tenemos 3396 miembros registrados.
El último usuario registrado es Discorded.

Nuestros miembros han publicado un total de 79807 mensajes en 11256 argumentos.
Navega con Google Chrome
[DESCARGA]

Aeromenu 1.0 y 1.5.7 (By cambrid-1997)

 :: RPG Maker :: Scripts

Ver el tema anterior Ver el tema siguiente Ir abajo

RPG Maker XP Aeromenu 1.0 y 1.5.7 (By cambrid-1997)

Mensaje por Cambrid-1997 el 2011-04-21, 18:17

Buno este es mi segundo script. BIEEEEN Very Happy !!!!.
El cms tiene scripts que ay que añadirlos a parte. Todos los script substituyen a otro script prk aun no se mucho de rgss, incluye un segundo sistema de monedas (está el Gold y los créditos(se pueden canviar)) Pero tiene un bug a proposito. Solo puedes tener un heroe en el grupo.
Bueno empezaré con el 1.0:
Screens:
http://img706.imageshack.us/img706/746/cmsdemostracin.png
Esta screen es que pasaria en caso de que pongas 2 heroes:
http://img98.imageshack.us/img98/9669/encasodeotroeroe.png
Script:(Este substituye a scene_menu)
Código:
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------

class Scene_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 = "Estado"
    s5 = "Guardar"
    s6 = "Salir"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.back_opacity = 160
    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)
      @menu_index_window.back_opacity = 160
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)

    end
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 150
    @playtime_window.y = 0
    @playtime_window.back_opacity = 160   
    @status_window = Window_MenuStatus.new
    @status_window.x = 470
    @status_window.y = 25
    @status_window.back_opacity = 160
    @money_window = Window_Gold.new
    @money_window.x = 320
    @money_window.y = 400
    @money_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
   

    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @status_window.dispose
    @money_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  def update
    @command_window.update
    @playtime_window.update
    @status_window.update
    @money_window.update
    if @command_window.active
      update_command
      return
    end
    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::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_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
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      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 
        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
      return
    end
  end
end
Script:(Este substituye a window_menustatus)
Código:
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  Muestra el estado en el menu
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # - Inicio de Objetos...
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 170, 455)
    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
  #--------------------------------------------------------------------------
  # - Actualizacion
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 0, y + 60)
      draw_actor_name(actor, x - 40, y + 60)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 100, 150, 50, "Profesión:")
      draw_actor_class(actor, x + -50, y + 130)
      draw_actor_level(actor, x + -65, y + 160)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 270, "Estado:")
      draw_actor_state(actor, x + -50, 220, 500)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 390, "Experiencia:")
      draw_actor_exp(actor, 0 + 0, 280 + 0)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 510, "Puntos vitales:")
      draw_actor_hp(actor, 0 + 0, 340 + 0)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 630, "Puntos mágicos:")     
      draw_actor_sp(actor, 0 + 0, 400 + 0)
   
    end
  end
  #--------------------------------------------------------------------------
  # - Renovacion del rectangulo de cursor
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end
Script:(Esto substituye a window_Gold)
Código:
=begin
Este es mi primer script creado de cero, son solo 20 lineas pero ya soy scripting!
=end
class Window_Gold < Window_Base
  def initialize
    super(0, 0, 160, 80)
    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
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -5, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, -5, cx, 32, $data_system.words.gold, 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120-cx-2, 32, $game_variables[10].to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 20, cx, 32, "C", 2) 
  end
end
Yo soy muy simple con los scripts y confio en hacer mejores scripts en un futuro no muy lejano. Salu2

PD. Doy gracias a Clark-CLK, orochii y Wecoc por ayudarme a translucir las ventanas y mostrar el mapa como fondo.

Y aquí el 1.5.7, este me costo mucho y ademas es un script muy largo, pero este solo se debe copiar y pegar encima de main.
Screens:
http://img38.imageshack.us/img38/953/aeromenu.png
Aquí el script:
Código:
=begin
script creado por cambrid-1997, pegar encima de main.
Descripción
Este script está echo para tener un nuevo cms mas moderno y con el tema Aero-Glass
me costo saber como utilizar los alias pero lo consegui. Doy creditos a Clark-CLK
por ayudar con los alias, los demas créditos están en la web.
Salu2
=end
class Scene_Menu
alias Reemplazar_def_main_scene_menu main
  #-----------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #-----------------------------------------------------------------------------
#Aquí tienen todo el menu entero por si quieren editarlo
  def main
    # コマンドウィンドウを作成
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Estado"
    s5 = "Guardar"
    s6 = "Salir"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.back_opacity = 160
    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)
      @menu_index_window.back_opacity = 160
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)

    end
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 150
    @playtime_window.y = 0
    @playtime_window.back_opacity = 160   
    @status_window = Window_MenuStatus.new
    @status_window.x = 470
    @status_window.y = 25
    @status_window.back_opacity = 160
    @money_window = Window_Gold.new
    @money_window.x = 320
    @money_window.y = 400
    @money_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
   

    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @status_window.dispose
    @money_window.dispose
    @spriteset.dispose
  end
  #-----------------------------------------------------------------------------
  def update
    @command_window.update
    @playtime_window.update
    @status_window.update
    @money_window.update
    if @command_window.active
      update_command
      return
    end
    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::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_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
      when 5
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      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 
        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
      return
    end
  end
end
#===============================================================================
#Aquí tienen completo el window gold.
class Window_Gold < Window_Base
alias window_gold_new initialize
  def initialize
    super(0, 0, 160, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -5, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, -5, cx, 32, $data_system.words.gold, 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120-cx-2, 32, $game_variables[10].to_s, 2)
    #$game_variables[10] el 10 es la variable ne donde se guardan los créditos
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, 20, cx, 32, "C", 2)
    #(124-cx, 20, cx, 32, "C", 2) la "C" es el nombre de la segunda moneda.
  end
end
#===============================================================================
class Window_MenuStatus < Window_Selectable
  alias New_Windoews_Menu_Status initialize
  #-----------------------------------------------------------------------------
  def initialize
    super(0, 0, 170, 455)
    self.contents = Bitmap.new(width - 32, height - 32)
    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 = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 0, y + 60)
      draw_actor_name(actor, x - 40, y + 60)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 100, 150, 50, "Profesión:")
      draw_actor_class(actor, x + -50, y + 130)
      draw_actor_level(actor, x + -65, y + 160)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 270, "Estado:")
      draw_actor_state(actor, x + -50, 220, 500)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 390, "Experiencia:")
      draw_actor_exp(actor, -45 + 0, 270 + 0)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 510, "Puntos vitales:")
      draw_actor_hp(actor, 0 + 0, 330 + 0)
      self.contents.font.color = system_color
      self.contents.draw_text(0, 70, 150, 630, "Puntos mágicos:")     
      draw_actor_sp(actor, 0 + 0, 390 + 0)
   
    end
  end
  #-----------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end
#===============================================================================
class Scene_Status
  alias Aero_Status main
  #-----------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  #-----------------------------------------------------------------------------
  def main
    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status.new(@actor)
    @status_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @status_window.dispose
    @spriteset.dispose
   
  end
  #-----------------------------------------------------------------------------
  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(3)
      @spriteset = Spriteset_Map.new
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      @spriteset = Spriteset_Map.new
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      @spriteset = Spriteset_Map.new
      return
    end
  end
end
#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------

class Scene_Item
  alias Aero_Item main
# ------------------------------------ 
  def main
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @item_window = Window_Item.new
    @item_window.help_window = @help_window
    @item_window.back_opacity = 160
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    @target_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @item_window.dispose
    @target_window.dispose
    @spriteset.dispose
  end
# ------------------------------------ 
  def update
    @help_window.update
    @item_window.update
    @target_window.update
    if @item_window.active
      update_item
      return
    end
    if @target_window.active
      update_target
      return
    end
  end
# ------------------------------------ 

  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(0)
      return
    end
    if Input.trigger?(Input::C)
      @item = @item_window.item
      unless @item.is_a?(RPG::Item)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      unless $game_party.item_can_use?(@item.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @item.scope >= 3
        @item_window.active = false
        @target_window.x = (@item_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      else
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $game_system.se_play(@item.menu_se)
          if @item.consumable
            $game_party.lose_item(@item.id, 1)
            @item_window.draw_item(@item_window.index)
          end
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
# ------------------------------------ 
  def update_target
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      unless $game_party.item_can_use?(@item.id)
        @item_window.refresh
      end
      @item_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.item_number(@item.id) == 0
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @target_window.index == -1
        used = false
        for i in $game_party.actors
          used |= i.item_effect(@item)
        end
      end
      if @target_window.index >= 0
        target = $game_party.actors[@target_window.index]
        used = target.item_effect(@item)
      end
      if used
        $game_system.se_play(@item.menu_se)
        if @item.consumable
          $game_party.lose_item(@item.id, 1)
          @item_window.draw_item(@item_window.index)
        end
        @target_window.refresh
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $scene = Scene_Map.new
          return
        end
      end
      unless used
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end
#==============================================================================
# ■ Scene_Skill
#------------------------------------------------------------------------------

class Scene_Skill
  alias Aero_Skill main
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @status_window = Window_SkillStatus.new(@actor)
    @status_window.back_opacity = 160
    @skill_window = Window_Skill.new(@actor)
    @skill_window.help_window = @help_window
    @skill_window.back_opacity = 160
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    @target_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @status_window.dispose
    @skill_window.dispose
    @target_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  def update
    @help_window.update
    @status_window.update
    @skill_window.update
    @target_window.update
    if @skill_window.active
      update_skill
      return
    end
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_skill
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(1)
      return
    end
    if Input.trigger?(Input::C)
      @skill = @skill_window.skill
      if @skill == nil or not @actor.skill_can_use?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @skill.scope >= 3
        @skill_window.active = false
        @target_window.x = (@skill_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        if @skill.scope == 4 || @skill.scope == 6
          @target_window.index = -1
        elsif @skill.scope == 7
          @target_window.index = @actor_index - 10
        else
          @target_window.index = 0
        end
      else
        if @skill.common_event_id > 0
          $game_temp.common_event_id = @skill.common_event_id
          $game_system.se_play(@skill.menu_se)
          @actor.sp -= @skill.sp_cost
          @status_window.refresh
          @skill_window.refresh
          @target_window.refresh
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Skill.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Skill.new(@actor_index)
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_target
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @skill_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    if Input.trigger?(Input::C)
      unless @actor.skill_can_use?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @target_window.index == -1
        used = false
        for i in $game_party.actors
          used |= i.skill_effect(@actor, @skill)
        end
      end
      if @target_window.index <= -2
        target = $game_party.actors[@target_window.index + 10]
        used = target.skill_effect(@actor, @skill)
      end
      if @target_window.index >= 0
        target = $game_party.actors[@target_window.index]
        used = target.skill_effect(@actor, @skill)
      end
      if used
        $game_system.se_play(@skill.menu_se)
        @actor.sp -= @skill.sp_cost
        @status_window.refresh
        @skill_window.refresh
        @target_window.refresh
        if $game_party.all_dead?
          $scene = Scene_Gameover.new
          return
        end
        if @skill.common_event_id > 0
          $game_temp.common_event_id = @skill.common_event_id
          $scene = Scene_Map.new
          return
        end
      end
      unless used
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end
#===============================================================================
class Scene_Equip
  alias Aero_equip main
# ------------------------------------ 
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
# ------------------------------------ 
  def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @left_window = Window_EquipLeft.new(@actor)
    @left_window.back_opacity = 160
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    @right_window.help_window = @help_window
    @right_window.back_opacity = 160
    @item_window1.help_window = @help_window
    @item_window1.back_opacity = 160
    @item_window2.help_window = @help_window
    @item_window2.back_opacity = 160
    @item_window3.help_window = @help_window
    @item_window3.back_opacity = 160
    @item_window4.help_window = @help_window
    @item_window4.back_opacity = 160
    @item_window5.help_window = @help_window
    @item_window5.back_opacity = 160
    @right_window.index = @equip_index
    @spriteset = Spriteset_Map.new
    refresh
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
    @spriteset.dispose
  end
# ------------------------------------ 
  def refresh
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    item1 = @right_window.item
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    if @right_window.active
      @left_window.set_new_parameters(nil, nil, nil)
    end
    if @item_window.active
      item2 = @item_window.item
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
# ------------------------------------ 
  def update
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    if @right_window.active
      update_right
      return
    end
    if @item_window.active
      update_item
      return
    end
  end
# ------------------------------------ 
  def update_right
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(2)
      return
    end
    if Input.trigger?(Input::C)
      if @actor.equip_fix?(@right_window.index)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
# ------------------------------------ 
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.equip_se)
      item = @item_window.item
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end
#===============================================================================
class Scene_End
  alias aero_end main
# ------------------------------------ 
  def main
    s1 = "Ir al título"
    s2 = "Salir"
    s3 = "Cancelar"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    @command_window.back_opacity = 160
    @spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @spriteset.dispose
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
# ------------------------------------ 
  def update
    @command_window.update
    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)
      case @command_window.index
      when 0
        command_to_title
      when 1
        command_shutdown
      when 2
        command_cancel
      end
      return
    end
  end
# ------------------------------------ 
  def command_to_title
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = Scene_Title.new
  end
# ------------------------------------ 
  def command_shutdown
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
  end
# ------------------------------------ 
  def command_cancel
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Menu.new(5)
  end
end
#===========================================================================
# *** HP/MP/ATB/LimitBreak bar Slanted Style Compatible with RTAB ***
# *** Version 2.1
#---------------------------------------------------------------------------
# by Clive
# based on Cogwheel's Bars and Sephiroth Spawn's Slanted Bars.
#---------------------------------------------------------------------------
# ----- GREAT THANKS to DerVVulfman for solving the lag problem
#------This is a plug and play script so it should work without any problem!
#=============================================================================
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Get the current EXP
  #--------------------------------------------------------------------------
  def now_exp
        return @exp - @exp_list[@level]
  end
  #--------------------------------------------------------------------------
  # * Get the next level's EXP
  #--------------------------------------------------------------------------
  def next_exp
        return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================
class Window_Base < Window 
  #==========================================================================
  # * Draw Slant Bar(by SephirothSpawn)
  #==========================================================================
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
          bar_color = Color.new(150, 0, 0, 255),
          end_color = Color.new(255, 255, 60, 255))
        for i in 0..height
          self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
        end
        for i in 1..(height - 1)
          r = 100 * (height - i) / height + 0 * i / height
          g = 100 * (height - i) / height + 0 * i / height
          b = 100 * (height - i) / height + 0 * i / height
          a = 255 * (height - i) / height + 255 * i / height
          self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
        end
        for i in 1..( (min.to_f / max.to_f) * width - 1)
          for j in 1..(height - 1)
                r = bar_color.red * (width - i) / width + end_color.red * i / width
                g = bar_color.green * (width - i) / width + end_color.green * i / width
                b = bar_color.blue * (width - i) / width + end_color.blue * i / width
                a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
                self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
          end
        end
  end
 
  #==========================================================================
  # * Draw HP
  #      actor : actor
  #      x      : draw spot x-coordinate
  #      y      : draw spot y-coordinate
  #      width : draw spot width
  #==========================================================================
  alias :draw_actor_hp_hpsp :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144) 
        draw_slant_bar(x, y + 25, actor.hp, actor.maxhp, width, 6,
          bar_color = Color.new(150, 0,0, 255),
          end_color = Color.new(255, 255, 60, 255))
        draw_actor_hp_hpsp(actor, x, y, width)
  end
  #==========================================================================
  # * Draw SP
  #      actor : actor
  #      x      : draw spot x-coordinate
  #      y      : draw spot y-coordinate
  #      width : draw spot width
  #==========================================================================
  alias :draw_actor_sp_hpsp :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
        draw_slant_bar(x, y + 25, actor.sp, actor.maxsp, width, 6,
          bar_color = Color.new(0, 0, 155, 255),
          end_color = Color.new(255, 255, 255, 255))
        draw_actor_sp_hpsp(actor, x, y, width)
  end
  #==========================================================================
  # * Draw EXP
  #      actor : actor
  #      x      : draw spot x-coordinate
  #      y      : draw spot y-coordinate
  #==========================================================================
  alias raz_bars_base_exp draw_actor_exp 
  def draw_actor_exp(actor, x, y)
        if actor.level == 99
          draw_slant_bar(500, 500 + 500, 50, 50, 200, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
        else
          draw_slant_bar(0, y + 25, actor.now_exp, actor.next_exp, 130, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(255, 255, 255, 255))
        end
        raz_bars_base_exp(actor, x, y)
  end
  #==========================================================================
  # * Draw Parameter
  #      actor : actor
  #      x      : draw spot x-coordinate
  #      y      : draw spot y-coordinate
  #      type  : parameter type (0-6)
  #==========================================================================
  alias raz_bars_base_parameter draw_actor_parameter 
  def draw_actor_parameter(actor, x, y, type)
        case type
        when 0
          para_color1 = Color.new(100,0,0)
          para_color2 = Color.new(255,0,0)
          para_begin = actor.atk
        when 1
          para_color1 = Color.new(100,100,0)
          para_color2 = Color.new(255,255,0)
          para_begin = actor.pdef
        when 2
          para_color1 = Color.new(100,0,100)
          para_color2 = Color.new(255,0,255)
          para_begin = actor.mdef
        when 3
          para_color1 = Color.new(50,0,100)
          para_color2 = Color.new(50,0,255)
          para_begin = actor.str
        when 4
          para_color1 = Color.new(0,100,0)
          para_color2 = Color.new(0,255,0)
          para_begin = actor.dex
        when 5
          para_color1 = Color.new(50,0,50)
          para_color2 = Color.new(255,0,255)
          para_begin = actor.agi
        when 6
          para_color1 = Color.new(0,100,100)
          para_color2 = Color.new(0,255,255)
          para_begin = actor.int
        end
        draw_slant_bar(x, y + 25, para_begin, 999, 155, 4, bar_color = para_color1,
          end_color = para_color2)
        raz_bars_base_parameter(actor, x, y, type)
  end
  #=========================================================================
  # * Draw Actor ATG
  #      actor : Actor
  #      x      : draw spot x-coordinate
  #      y      : draw spot y-coordinate
  #      width : draw spot width
  #=========================================================================
  def draw_actor_atg(actor, x, y, width = 144, height = 6)
        if @at_gauge == nil
          @plus_x = 0
          @rate_x = 0
          @plus_y = 16
          @plus_width = 0
          @rate_width = 100
          @width = @plus_width + width * @rate_width / 100
          @height = 6
          @align1 = 0
          @align2 = 1
          @align3 = 0
          grade1 = 1
          grade2 = 0
          color1 = Color.new(0, 0, 0)
          color2 = Color.new(255, 255, 192)
          color3 = Color.new(0, 0, 0, 192)
          color4 = Color.new(0, 0, 64, 192)
          color5 = Color.new(0, 64, 80)
          color6 = Color.new(255, 255, 255)#(0, 128, 160)
          color7 = Color.new(80, 0, 0)
          color8 = Color.new(255, 255,255) #(240,0,0)
          color9 = Color.new(80, 64, 32)
          color10 = Color.new(255, 255, 255) #(240, 192, 96)
          color11 = Color.new(80, 0, 64)
          color12 = Color.new(255,255, 255) #(240, 0, 192)
          gauge_rect_at(@width, @height, @align3, color1, color2, color3, color4,
                  color5, color6, color7, color8, color9, color10, color11, color12,
                  grade1, grade2)
        end
        if actor.rtp == 0
          at = (width + @plus_width) * actor.atp * @rate_width / 10000
        else
          at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
        end
        if at > width
          at = width
        end
        case @align1
        when 1
          x += (@rect_width - width) / 2
        when 2
          x += @rect_width - width
        end
        case @align2
        when 1
          y -= @height / 2
        when 2
          y -= @height
        end
        for i in 0..height
          self.contents.fill_rect(x + 1.5 + i, y + 12 + height - i, width - 2 , 3,
                Color.new(50, 50, 50, 255))
        end
        for i in 1..(height - 1)
          r = 100 * (height - i) / height + 0 * i / height
          g = 100 * (height - i) / height + 0 * i / height
          b = 100 * (height - i) / height + 0 * i / height
          a = 255 * (height - i) / height + 255 * i / height
          self.contents.fill_rect(x + 1.5 + i, y + 12 + height - i, width - 3, 3,
                Color.new(r, b, g, a))
        end
        if @align3 == 0
          rect_x = 0
        else
          x += @width - at - 1
          rect_x = @width - at - 1
        end
        if at == width
          for i in 0..height
                self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y -i +
                @plus_y, @at_gauge, Rect.new(rect_x, @height * 2, at, @height))
          end
        else
          if actor.rtp == 0
                for i in 0..height
                  self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y- i +
                        @plus_y, @at_gauge,Rect.new(rect_x, @height, at, @height))
                end
          else
                if actor.spell == true
                  for i in 0..height
                        self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
                          @plus_y, @at_gauge, Rect.new(rect_x, @height * 3, at, @height))
                  end
                else
                  for i in 0..height                     
                        self.contents.blt(x + i + @plus_x + @width * @rate_x / 100, y - i +
                          @plus_y, @at_gauge, Rect.new(rect_x, @height * 4, at, @height))
                  end
                end
          end
        end
  end
  end
Instrucciones: Pegar encima de main.
Tengan en cuenta que este es mi segundo script!
Salu2

Cambrid-1997
Iniciado
Iniciado

0/3

Créditos 30

Gracias : 2

Volver arriba Ir abajo

RPG Maker XP Re: Aeromenu 1.0 y 1.5.7 (By cambrid-1997)

Mensaje por Mukadelheid el 2011-04-22, 16:57

bien bien , sigue asi , recien acabo de ver , y vaya , eres todo un scripter ,. Cool

Deberías comenzar con pequeños edits , solo para ti mismo .Luego comenzar a hacer códigos mas largos para la comunidad , pero nunca te justifiques ;

Cambrid-1997 escribió:Tengan en cuenta que este es mi segundo script!

Los demás esperan tener un código 100% funcional y que se vea bien para usarlo .
Podrías juntar todo ese código y hacerlo uno que se valga por si mismo .

Mukadelheid
Principiante
Principiante

0/3

Créditos 331

Gracias : 28

Volver arriba Ir abajo

RPG Maker XP Re: Aeromenu 1.0 y 1.5.7 (By cambrid-1997)

Mensaje por Santi_Lee el 2014-01-18, 02:36

Siento revivir un tema ANTIGUISIMO, pero necesito ayuda :(
En la linea 15 me salta error:
''no implicit conversion from nil to integer''

Santi_Lee
Soñador
Soñador

3/3

Créditos 553

Gracias : 16

Volver arriba Ir abajo

RPG Maker XP Re: Aeromenu 1.0 y 1.5.7 (By cambrid-1997)

Mensaje por Contenido patrocinado Hoy a las 05:01


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


 :: RPG Maker :: Scripts

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