Doubt with a Command Window on Script

Hello everyone!
I have a problem with a command window in my script, I have created a conditional derivation, The first one has three options just like the second one, the difference is that the first one is destined to appear when the user selects that specific item, while The second is the default for all items.

If you could help me I would thank you all!
Screenshot_4.png.fb949ffa54e6cadd426797af632e719f.png

What happens is that it only shows one of the two command lists, which makes the other command list totally impossible. If they had a solution, they would like it very much!

I've moved this thread to Learning Ruby. Thank you.

Moved to: Learning Ruby
Ohhh, sorry about that!
Can you post the entire script you wrote? So we can understand the whole context on what you're trying to do.
look into how window_command's inherit their commands to itemcommand and menucommand.
it looks to me like you're trying to link an item to a higher window_command which is not meant for it.
Oh! Sorry for not attaching the script, my first language is Spanish so the information shown in the header is written in that language, I just try to write my best in English.
Here is the script:
Spoiler: Script
Code:
#==============================================================================
# Resident Evil 2 Menú
# Modificaciones hechas por DorFenn
# Ver. 1.2 (alpha)
#==============================================================================
# ¡Gracias a los siguientes scripters por sus guiones originales!
# Resident Evil Menu - by. AlanZdr    « zelindroprogramacao.blogspot.com »
# Menu Horror Game - by. Fatyguero    « rmakercom.net »
#==============================================================================

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Ésta clase ejecuta el menú
#==============================================================================
module RE_MENU 
  #--------------------------------------------------------------------------
  # * Recetas para combinar items
  # * Ajuste el recipiento [a] = [b, c, d] siendo
  # * A el valor representativo de la receta
  # * B y C el valor de los items a combinar
  # * D El item que se obtendrá
  #--------------------------------------------------------------------------
 
  Recipe = {}             # Ejemplo: En la demo 
  #--------------------------------------------------------------------------
  # * Vocabulario del menú
  #--------------------------------------------------------------------------
  # * Palabra que explica que el arma está equipada
  Equip = "Equipado: "
  # * Para descartar items
  Descarte = "Tirar"
  # * Para combinar objetos
  Combine = "Combinar"
  # * Para usar items
  Use = "Usar"
  # * Para llamar el menú de misiones
  Mision = "Misiones"
  # * Para llamar el menú de Mensajes
  Mensajes = "Mensajes"
  # * Para llamar el menú de Informes
  Informes = "Diario"
  # * Para equipar las armas
  Equipe = "Equipar"
  # * Palabra utilizada para la pestaña "Items"
  Inventario = "Objetos"
  # * Palabra utilizada para la pestaña "Objetos Importantes"
  Key_itens = "Importantes"
  # * Para la ventana informativa de Items, la palabra que explica la
  # * Descripción de un objeto
  Help_desc = "Descripción: "
  # * Para la ventana informativa de Items, la palabra que acompaña el nombre
  # * Del item [Preferentemente dejarlo en blanco porque queda mejor]
  Help_name = ""

 
  #--------------------------------------------------------------------------
  # * Sonido que se escucha al combinar dos objetos
  #--------------------------------------------------------------------------
  def self.playcombine
      Sound.play_use_item
  end

end

module RE_CONDITION 
  #-----------------------------------------------------------------------------
  # Array que contiene los datos de la animación que se mostrara en el menú.
  # los elementos son:
  # [PosicionX, PosicionY, Ancho, Alto, "Nombre de la carpeta", Frames, Tiempo de
  # espera entre frames,]
  #-----------------------------------------------------------------------------
 
  Condicion =
  [
  [120,30,115,115, "Linea", 17, 5,],
  ]
  #----------------------------------------------------------------------------
  end

module RE
  module ITEM
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Ajustes de la Ventana Informativa de Items -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # La ventana informativa, muestra en mejor detalle, las descripciones.
    # Ajusta los parametros de abajo de la manera que creas conveniente.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    STATUS_FONT_SIZE = 20       # Tamaño de fuente [Default: 20].
    MAX_ICONS_DRAWN  = 10       # Número máximo de items para dibujar. 
    
  end # ITEM
end # RE

module RE
  module REGEXP
  module BASEITEM
    
    IMAGE    = /<(?:IMAGE|image):[ ](.*)>/i
    
  end # BASEITEM
  end # REGEXP
end # RE

#==============================================================================
# ■ DataManager
#==============================================================================

module DataManager
 
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_aso load_database; end
  def self.load_database
    load_database_aso
    load_notetags_aso
  end
 
  #--------------------------------------------------------------------------
  # new method: load_notetags_aso
  #--------------------------------------------------------------------------
  def self.load_notetags_aso
    groups = [$data_items, $data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_aso
      end
    end
  end
 
end # DataManager

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :image
 
  #--------------------------------------------------------------------------
  # common cache: load_notetags_aso
  #--------------------------------------------------------------------------
  def load_notetags_aso
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when RE::REGEXP::BASEITEM::IMAGE
        @image = $1.to_s
      end
    } # self.note.split
    #---
  end
 
end # RPG::BaseItem

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_item_index
  attr_accessor :scene_item_oy
 
end # Game_Temp

# Draw BIG Icon
#----------------------------
module ICON_SIZE
  ICON_WIDTH = 64
  ICON_HEIGHT = 64
  end
  include ICON_SIZE
class Window_Base < Window
 
  def draw_icon(icon_index, x, y, enabled = true)
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    if ICON_WIDTH > 24
      target = Rect.new(x - ICON_WIDTH / 4, y - ICON_HEIGHT / 4, ICON_WIDTH, ICON_HEIGHT)
    elsif ICON_WIDTH <= 24
      target = Rect.new(x , y, ICON_WIDTH, ICON_HEIGHT)
    end
    contents.stretch_blt(target, bitmap, rect)
  end
end

#==============================================================================
# ** Window_Help
#------------------------------------------------------------------------------
#  Ésta ventana muestra las descripciones de los objetos.
#==============================================================================
# Ventana condición
#=============================================================================

class RE_Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Inicializando los objetos
  #     line_number : número de lineas
  #--------------------------------------------------------------------------
  def initialize(line_number = 4)
    super(0, 150, 345, Graphics.height - 150)
  end
  #--------------------------------------------------------------------------
  # * Configuración de texto
  #     text : texto
  #--------------------------------------------------------------------------
  def set_text(text)
    if text != @text
      @text = text
      refresh
    end
  end
  #--------------------------------------------------------------------------
  # * Limpeza
  #--------------------------------------------------------------------------
  def clear
    set_text("")
  end
  #--------------------------------------------------------------------------
  # * Definición del item
  #     item : habilidades, items, etc.
  #--------------------------------------------------------------------------
  def set_item(item)
    set_text(item ? item.description : "")
    @item = item
  end
  #--------------------------------------------------------------------------
  # * Renovación
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    if @item != nil
    
      draw_text(5, 70, 150, 50, RE_MENU::Help_desc)
      draw_text(5, 100, 300, 100, @text)
      draw_text(5, 0 , 350, 50, RE_MENU::Help_name + @item.name)
    end
  
  end
end
 class Window_ItemData < Window_Base 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, item_window)
    super(dx, dy, Graphics.width - dx, fitting_height(4))
    @item_window = item_window
    @item = nil
    refresh
  end 
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window= (window)
    @item_window = window
    update_item(@item_window.item)
  end
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    update_item(@item_window.item)
  end 
  #--------------------------------------------------------------------------
  # update_item
  #--------------------------------------------------------------------------
  def update_item(item)
    return if @item == item
    @item = item
    refresh   
  end 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear   
    reset_font_settings
    contents.font.size = RE::ITEM::STATUS_FONT_SIZE #Font.default_size
  end

  end 
  #--------------------------------------------------------------------------
  # draw_icons
  #--------------------------------------------------------------------------
  def draw_icons(dx, dy, dw, icons)
    dx += dw - 4
    dx -= icons.size * 24
    for icon_id in icons
      draw_icon(icon_id, dx, dy)
      dx += 24
    end
    if icons.size == 0
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
      draw_text(4, dy, contents.width-8, line_height, text, 2)
    end
  end
# Window_ItemData

class RE_Window_Condition < Window_Base
  def initialize(line_number = 10)
    super(0,0,244, Graphics.height - 265)  # (x, y, ancho, largo) Posición y tamaño de ventana
    @actor = $game_party.members[0]
    @status_face_val
    refresh
  end
end
  #=============================================================================
  # Cargar el personaje en uso
  #=============================================================================
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # Definir metodo Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_geninfo   (line_height * 0)
  end
  #--------------------------------------------------------------------------
  # Dibujar la cara y estado del personaje
  #--------------------------------------------------------------------------
  def draw_geninfo(y)
    draw_actor_face(@actor = $game_actors[1], 10, 15)# si no cumple condicion dibuja face Nº1
    contents.font.size = contents.font.size * 1  # Tamaño de la fuente
  end

#===========================================================================
# CREANDO EL MENU HORIZONTAL
#===========================================================================
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
#  Ésta ventana muestra las pestañas del menú [Items, Archivos y Salir]
#==============================================================================
class MenuCommand < Window_HorzCommand
  #--------------------------------------------------------------------------
  # * Inicializar el método de comando inicial (método de clase)
  #--------------------------------------------------------------------------
  def self.init_command_position
    @@last_command_symbol = nil
  end
  #--------------------------------------------------------------------------
  # * Inicializando el objeto
  #--------------------------------------------------------------------------
  def initialize
    super(244, 0)
  end
  #--------------------------------------------------------------------------
  # * Adquirir el ancho de la ventana
  #--------------------------------------------------------------------------
  def window_width
    return 300
  end
 
  #--------------------------------------------------------------------------
  # * Adquirir el largo de la ventana
  #--------------------------------------------------------------------------
  def window_height
    50
  end
  #--------------------------------------------------------------------------
  # * Adquirir el número de lineas de comandos
  #--------------------------------------------------------------------------
  def col_max
    return 3
  end
  def visible_line_number
    10
  end
  #--------------------------------------------------------------------------
  # * Crear lista de comandos
  #--------------------------------------------------------------------------
  def make_command_list
    add_main_commands
    add_game_end_command
  end
  #--------------------------------------------------------------------------
  # * Adquirir los comandos principales
  #--------------------------------------------------------------------------
  def add_main_commands
    add_command(RE_MENU::Inventario,   :item,   main_commands_enabled)
    add_command(RE_MENU::Key_itens, :key_item, main_commands_enabled)
  end
 
  #--------------------------------------------------------------------------
  # * Definir la habilitación de los comandos principales
  #--------------------------------------------------------------------------
  def main_commands_enabled
    $game_party.exists
  end
  #--------------------------------------------------------------------------
  # * Añadir el comando Salir
  #--------------------------------------------------------------------------
  def add_game_end_command
    add_command(Vocab::game_end, :game_end)
  end
  #--------------------------------------------------------------------------
  # * Definir el resultado del botón de confirmación
  #--------------------------------------------------------------------------
  def process_ok
    @@last_command_symbol = current_symbol
    super
  end
  #--------------------------------------------------------------------------
  # * Definición de la ventana de items
  #     item_window : ventana de item
  #--------------------------------------------------------------------------
  def item_window=(item_window)
    @item_window = item_window
    @item_window.category = current_symbol
  end
end

class Window_ItemList < Window_Selectable
  #--------------------------------------------------------------------------
  # * Iniciando el objeto
  #     x      : coordenada X
  #     y      : coordenada Y
  #     width  : anchura
  #     height : altura
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    self.windowskin = Cache.system("Window_comb")
    @category = :none
    @data = []
  end
  #--------------------------------------------------------------------------
  # * Definir la categoría
  #--------------------------------------------------------------------------
  def category=(category)
    return if @category == category
    @category = category
    refresh
    self.oy = 0
  end
  #--------------------------------------------------------------------------
  # * Adquirir número de columnas
  #--------------------------------------------------------------------------
  def col_max
    return 2
  end
 
  #--------------------------------------------------------------------------
  # * Adquirir el número máximo de items
  #--------------------------------------------------------------------------
  def item_max
    @data ? @data.size : 1
  end
  #--------------------------------------------------------------------------
  # * Adquirir el espaciado entre items
  #--------------------------------------------------------------------------
  def spacing
    return 5
  end
 
  #--------------------------------------------------------------------------
  # * Adquirir altura del item
  #--------------------------------------------------------------------------
  def item_height
    80
  end
  #--------------------------------------------------------------------------
  # * Adquerir la información del objeto
  #--------------------------------------------------------------------------
  def item
    @data && index >= 0 ? @data[index] : nil
  end
  #--------------------------------------------------------------------------
  # * Definir la habilitación del selección
  #--------------------------------------------------------------------------
  def current_item_enabled?
    enable?(@data[index])
  end
  #--------------------------------------------------------------------------
  # * Inclusión del item en la lista
  #     item : item
  #--------------------------------------------------------------------------
  def include?(item)
    case @category
    when :item
      item.is_a?(RPG::Item) && !item.key_item? or item.is_a?(RPG::Weapon)
    when :key_item
      item.is_a?(RPG::Item) && item.key_item?
    else
      false
    end
  end
  #--------------------------------------------------------------------------
  # * Definir items disponibles para usar
  #--------------------------------------------------------------------------
  def usable?(item)
    if item.is_a?(RPG::Weapon)
      return true
    else
      return $game_party.usable?(item)
    end
    return false
  
  end
  #--------------------------------------------------------------------------
  # * Definir la habilitación del item
  #     item : item
  #--------------------------------------------------------------------------
  def enable?(item)
    #$game_party.usable?(item)
    return true
  end
  #--------------------------------------------------------------------------
  # * Creación de la lista de items
  #--------------------------------------------------------------------------
  def make_item_list
    @data = $game_party.all_items.select {|item| include?(item) }
    @data.push(nil) if include?(nil)
  end
  #--------------------------------------------------------------------------
  # * Retorno a la selección anterior
  #--------------------------------------------------------------------------
 
  def select_last
    select(@data.index($game_party.last_item.object) || 0)
  end
  #--------------------------------------------------------------------------
  # * Dibujar el item
  #--------------------------------------------------------------------------
 
  def draw_item_name(item, x, y, enabled = true, width = 80)
    return unless item
    draw_icon(item.icon_index, x + 30, y + 20, enabled)
    change_color(normal_color, enabled)
  end
  #--------------------------------------------------------------------------
  # * Dibujando un item
  #     index : índice del item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
  
    if item
      rect = item_rect(index)
      rect.width -= 4
      draw_item_name(item, rect.x , rect.y, true)
      rect.y -= 30
      draw_item_number(rect, item)
    end
  end
 
  #--------------------------------------------------------------------------
  # * Dibujar el número de items poseídos
  #     rect : retângulo
  #     item : item
  #--------------------------------------------------------------------------
  def draw_item_number(rect, item)
    draw_text(rect, sprintf(" %2d", $game_party.item_number(item)), 2)
  end
  #--------------------------------------------------------------------------
  # * Actualización de la ventana de ayuda
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_item(item)
    @help_window.refresh
  end
 
  #--------------------------------------------------------------------------
  # * Renovación
  #--------------------------------------------------------------------------
  def refresh
    make_item_list
    create_contents
    draw_all_items
    update_help
  end
end
class Comand_itens < Window_Command
  #--------------------------------------------------------------------------
  # * inicializando un objeto
  #--------------------------------------------------------------------------
  def initialize
    super(195, 150)  #(300, 200)
    self.windowskin = Cache.system("Window_comb")
    refresh
  end
  #--------------------------------------------------------------------------
  # * adquirir el largo de la ventana
  #--------------------------------------------------------------------------
  def window_width
    return 150
  end
  def window_height
    return 100
  end
  def activeCombine=(active)
    @activecombine = active
  end
  def usename=(name)
    @usename = name
  end
  def activeCombine
    return @activecombine
  end
  def usename
    return @usename
  end
  def important=(value)
    @important = value
  end
  def important
    return @important
  end
  def isuse=(value)
    @isuse = value
  end
  def isuse
    return @isuse
  end
  def mision=(name)
    @mision = name
  end
  def mision=(value)
    @mision = value
  end
    def mensajes=(name)
    @mensajes = name
  end
  def mensajes=(value)
    @mensajes = value
  end
  def informes=(name)
    @informes = name
  end
  def informes=(value)
    @informes = value
  end
  #--------------------------------------------------------------------------
  # * Creación de la lista de comandos
  #--------------------------------------------------------------------------
  def make_command_list
   if
    add_command(RE_MENU::Mision,  :mision,  isuse)
    add_command(RE_MENU::Informes,  :informes,  isuse)
    add_command(RE_MENU::Mensajes,  :mensajes,  isuse)
  else
    add_command(usename,   :usar,   isuse)
    add_command(RE_MENU::Combine,  :combine,  activeCombine)
    add_command(RE_MENU::Descarte,  :discart,  important)   
   end
  end
end
 
#---------------------------------------------------------------------------
# Arrancando la Escena del menu
#---------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase 
  include RE_CONDITION  #nuevo include RE_Condición
  def start
    super()
    create_Help_window
    create_command_window
    create_item_window
    create_status_window
    create_command_itens
    create_Equip_window
    create_alpha
    @iscombine = false
    @actor = $game_party.members[0]
    @ventana = RE_Window_Condition.new
    @ventana.z = 1    #2
    @condicion = []
    Condicion.each do |inner_array|
      cuyo_curr_index = @condicion.size
      @condicion[cuyo_curr_index] = []
      for i in 1..inner_array[5]
        sprite = Sprite.new()
        sprite.bitmap = Cache.picture(inner_array[4] + "/" + i.to_s)
        sprite.x = inner_array[0]
        sprite.y = inner_array[1]
        sprite.z = 9999 # Profundidad de la imagen.
        sprite.zoom_x = inner_array[2].to_f / sprite.bitmap.width
        sprite.zoom_y = inner_array[3].to_f / sprite.bitmap.height
        #----------------------------------------------------------------------
        # EDITABLE!!! : Condicionales que cambiaran el color de la imagen según
        # que porcentaje alcance el HP del personaje además del estado en el que esté.
        # Se puede modificar tanto el porcentaje como los colores de la imagen.
        #----------------------------------------------------------------------
        if @actor.state?(2) # Poison(Envenenado)
          @Status_window.draw_text(110, 10 , 120, 50, "Envenenado")# Dibujando texto ( x, y, ancho, largo, "texto")
          sprite.color.set(255, 0, 255, 255)   
        elsif @actor.hp <= @actor.mhp * 0.01 # Dead(Muerto)
          @Status_window.draw_text(110, 10 , 120, 50, "Muerto")# Dibujando texto ( x, y, ancho, largo, "texto")
          sprite.color.set(255, 0, 0 ,255)
          SceneManager.goto(Scene_Gameover)
        elsif @actor.hp <= @actor.mhp * 0.25 # Danger(Peligro)
          @Status_window.draw_text(110, 10 , 120, 50, "Peligro")# Dibujando texto ( x, y, ancho, largo, "texto")
          sprite.color.set(255, 64, 0)       
        elsif @actor.hp <= @actor.mhp * 0.60 # Caution(Precaucion)
          @Status_window.draw_text(110, 10 , 120, 50, "Precaución")# Dibujando texto ( x, y, ancho, largo, "texto"
          sprite.color.set(255, 255, 64, 255)
        elsif @actor.hp >= @actor.mhp * 0.61 # Normal
          @Status_window.draw_text(110, 10 , 120, 50, "Bien")# Dibujando texto ( x, y, ancho, largo, "texto"
          end
        sprite.visible = true
        #----------------------------------------------------------------------
        index = @condicion[cuyo_curr_index].size
        @condicion[cuyo_curr_index][index] = sprite
      end
      index = @condicion[cuyo_curr_index].size
      @condicion[cuyo_curr_index][index] = 0
      @condicion[cuyo_curr_index][index + 1] = 0
      @condicion[cuyo_curr_index][index + 2] = inner_array[6]
      @condicion[cuyo_curr_index][index + 3] = inner_array[5]
    end
  end
 
  def update
    super()
    @condicion.each do |inner_array|
      inner_array[inner_array.size - 4] += 1
      if inner_array[inner_array.size - 4] == inner_array[inner_array.size - 2]
        inner_array[inner_array.size - 4] = 0
        inner_array[inner_array[inner_array.size - 3]].visible = false
        inner_array[inner_array.size - 3] += 1
        inner_array[inner_array.size - 3] = 0 if inner_array[inner_array.size - 3] == inner_array[inner_array.size - 1]
        inner_array[inner_array[inner_array.size - 3]].visible = true
      end
    end
  end
 
  def terminate
    super()
    @condicion.each do |inner_array|
      inner_array.each do |element|
        if element.is_a?(Sprite)
          element.bitmap.dispose()
          element.dispose()
        end
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # * Creación de la ventana de comandos
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = MenuCommand.new
    @command_window.set_handler(:item,      method(:command_item))
    @command_window.set_handler(:key_item,      method(:command_item))
    @command_window.set_handler(:game_end,  method(:command_game_end))
    @command_window.set_handler(:cancel,    method(:return_scene))
  end
 
  #--------------------------------------------------------------------------
  # * Creación de la ventana de items
  #--------------------------------------------------------------------------
  def create_item_window
    wy = @command_window.y + @command_window.height + 100
    wh = Graphics.height - wy
    @item_window = Window_ItemList.new(344, wy, 200, wh)
    @item_window.help_window = @help_window
    @item_window.set_handler(:ok,     method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:on_item_cancel))
    @command_window.item_window = @item_window
    #@command_window.item_window = @item_window
  end
  #--------------------------------------------------------------------------
  # * Creacion de la venatana de comandos de uso en items
  #--------------------------------------------------------------------------
  def create_command_itens
    @command_item = Comand_itens.new
    @command_item.set_handler(:usar,      method(:use_item))
    @command_item.set_handler(:combine,      method(:combine_item))
    @command_item.set_handler(:discart,  method(:discart_item))
    @command_item.set_handler(:cancel,    method(:return_itens))
    @command_item.set_handler(:mision,      method(:mision))
    @command_item.set_handler(:mensajes,      method(:mensajes))
    @command_item.set_handler(:informes,      method(:informes))
    @command_item.visible = false
    @command_item.active = false
  end
  #-----------------------------------------------------------------------#
  def create_alpha
  #-----------------------------------------------------------------------#
  @tint = Sprite.new( @viewport )
  @tint.bitmap = Bitmap.new( "Graphics/Pictures/Alpha" )
  @tint.opacity = 255
  #-----------------------------------------------------------------------#
  end
  #--------------------------------------------------------------------------
  # * Creación de las ventanas
  #--------------------------------------------------------------------------
  def create_status_window
    @Status_window = Window_Base.new(0,0,245,150)
    @Status_window.contents.clear
    @Status_window.draw_actor_face(@actor = $game_party.members[0], 10, 15)# Si no cumple condición dibuja face Nº1   
    @Status_window.draw_text(115, -10 , 120, 50, @actor.name)
  end
    def create_Help_window
    @help_window = RE_Window_Help.new()
  end
  #def create_condition_window
    #@Condition_window = Window_Base.new(0,0,245,150)  #RE_Window_Condition.new()
  #end
 
  #--------------------------------------------------------------------------
  # new method: create_data_window
  #--------------------------------------------------------------------------


  def create_Equip_window
    @Equip_window = Window_Base.new(244,50,300,100)
    @Equip_window.contents.clear
    if @actor.equips[0] != nil
      @Equip_window.draw_icon(@actor.equips[0].icon_index, 180, 20, true)
      @Equip_window.draw_text(0, -15 , 120, 50, RE_MENU::Equip)
      @Equip_window.draw_text(0, 15 , 150, 50, @actor.equips[0].name)
    end
    
    
  end
  def use_item
    if @item.is_a?(RPG::Weapon)
      @actor.change_equip(0,@item)
      Sound.play_equip
    else
      Sound.play_use_item
      @actor.use_item(@item)
      use_item_to_actors
      
    end
    return_itens
    refresh
    check_common_event
  end
  def use_item_to_actors
    $game_party.members.each do |target|
      @item.repeats.times { target.item_apply(@actor, @item) }
    end
  end
  def check_common_event
    if $game_temp.common_event_reserved?
      SceneManager.goto(Scene_Map)
      @iscombine = false
    end
  end
  def combine_item
    if @iscombine == false
      @iscombine = true
      @combineitem = @item
    else
      recipe = RE_MENU::Recipe
      if @combineitem.id == @item.id
        if $game_party.item_number(@item) <= 1
          @combineitem = nil
        end
      end
      if @combineitem != nil
        for x in 1..recipe.size
        recipe1 = recipe[x]
        
          if recipe1[0] == @combineitem.id and recipe1[1] == @item.id
            @iscombine = false
            combineitens(x)
            break
          elsif recipe1[1] == @combineitem.id and recipe1[0] == @item.id
            @iscombine = false
            combineitens(x)
            break
          end
        end
      end
      if @iscombine == true
        Sound.play_buzzer
          @iscombine = false
      end
      
    end
    refresh
    return_itens
    
    
  end
  def combineitens(x)
    RE_MENU::playcombine
    $game_party.gain_item(@item, -1, true)
    $game_party.gain_item(@combineitem, -1, true)
    for y in 0..$data_items.size
        novoitem = $data_items[y] if y == RE_MENU::Recipe[x][2]
    end
    $game_party.gain_item(novoitem, 1)
  end
  def discart_item
    $game_party.gain_item(@item, -1, true)
    return_itens
  end
  def return_itens
    @command_item.visible = false
    @command_item.active = false
    @item_window.active = true
    @item_window.refresh   
  end
  def mision
    Sound.play_use_item
    SceneManager.goto(Scene_Quest)
  end
  def mensajes
    Sound.play_use_item
    SceneManager.goto(Scene_Mail)
  end
  def informes
    Sound.play_use_item
    SceneManager.goto(Scene_Notebook)
  end
  def refresh
    contents.clear   
  end
 
  #--------------------------------------------------------------------------
  # * Item [Confirmación]
  #--------------------------------------------------------------------------
  def on_item_ok
    @item = @item_window.item
    if @item != nil
      if @item.is_a?(RPG::Weapon)
        @command_item.activeCombine = false
        @command_item.usename = RE_MENU::Use
      else
        @command_item.activeCombine = true
        @command_item.usename = RE_MENU::Use
      end
      if @item.is_a?(RPG::Item) and @item.key_item?
        @command_item.important = false
      else
        @command_item.important = true
      end
      if @item_window.usable?(@item)
        @command_item.isuse = true
      else
        @command_item.isuse = false
      end
    
      @command_item.refresh
      @command_item.visible = true
      @command_item.active = true
    else
      Sound.play_buzzer
      @item_window.active = true
    end
    @help_window.set_item(@item)
  end
  #--------------------------------------------------------------------------
  # * Item [Cancelamiento]
  #--------------------------------------------------------------------------
  def on_item_cancel   
    @item_window.unselect
    refresh     
    @command_window.activate
    @iscombine = false
  end
  def refresh
    contents.clear   
  end   
 
  #--------------------------------------------------------------------------
  # * Comando [Item]
  #--------------------------------------------------------------------------
  def command_item
    @command_window.item_window = @item_window
    @item_window.activate
    @item_window.select_last
  end
  #--------------------------------------------------------------------------
  # * Comando [Fin del Juegos]
  #--------------------------------------------------------------------------
  def command_game_end
    SceneManager.call(Scene_End)
  end
  #--------------------------------------------------------------------------
  # * Comandos individuales [Cancelamiento]
  #--------------------------------------------------------------------------
  def on_personal_cancel
    @status_window.unselect
    @command_window.activate
  end
 
  def refresh
    @actor = $game_party.members[0]
    @item_window.refresh
    @Equip_window.contents.clear
    if @actor.equips[0] != nil
      @Equip_window.draw_icon(@actor.equips[0].icon_index, 180, 20, true)
      @Equip_window.draw_text(0, -15 , 120, 50, RE_MENU::Equip)
      @Equip_window.draw_text(0, 15 , 150, 50, @actor.equips[0].name)
    end
    @Status_window.contents.clear   
    @Status_window.draw_actor_face(@actor = $game_party.members[0], 10, 15)# si no cumple condicion dibuja face Nº1
    @Status_window.draw_text(115, -10 , 120, 50, @actor.name)   
    @Status_window.draw_text(110, 10 , 120, 50, "Bien")
  end
end
battler.use_item() is a method, not a function.
it doesn't return anything, it just runs code.

you can't use what it doesn't return to control a conditional, because it'll always return nil, which is read as false.

what you can do is pass down the item in question as a parameter or property, the same way you pass down "username", "activeCombine", "important", "isuse", etc.
which.... from the way they're written, I gather they're ported from a MV plugin.
so, whomever ported them, or yourself, just copy/pasted it without looking.

Code:
class Command_items < Window_Command
 def initialize
  ...
  @used_item = nil
 end
 
 def used_item
  return @used_item
 end

def used_item=(item)
  @used_item = item
end

def make_command_list
   if used_item == $data_items[X]  #<-----------------
   ... ...
  else
   ... ...
  end
end
end

then, upon item usage, pass down the parameter:

Code:
class Scene_Menu < Scene_MenuBase
def on_item_ok
   @item = @item_window.item
   if @item != nil
     ...
     @command_item.used_item = @item  #<----------
     @command_item.refresh
     @command_item.visible = true
     @command_item.active = true
   else
     Sound.play_buzzer
     @item_window.active = true
   end
   @help_window.set_item(@item)
  end
end
battler.use_item() is a method, not a function.
it doesn't return anything, it just runs code.

you can't use what it doesn't return to control a conditional, because it'll always return nil, which is read as false.

what you can do is pass down the item in question as a parameter or property, the same way you pass down "username", "activeCombine", "important", "isuse", etc.
which.... from the way they're written, I gather they're ported from a MV plugin.
so, whomever ported them, or yourself, just copy/pasted it without looking.

Code:
class Command_items < Window_Command
 def initialize
  ...
  @used_item = nil
 end
 
 def used_item
  return @used_item
 end

def used_item=(item)
  @used_item = item
end

def make_command_list
   if used_item == $data_items[X]  #<-----------------
   ... ...
  else
   ... ...
  end
end
end

then, upon item usage, pass down the parameter:

Code:
class Scene_Menu < Scene_MenuBase
def on_item_ok
   @item = @item_window.item
   if @item != nil
     ...
     @command_item.used_item = @item  #<----------
     @command_item.refresh
     @command_item.visible = true
     @command_item.active = true
   else
     Sound.play_buzzer
     @item_window.active = true
   end
   @help_window.set_item(@item)
  end
end
Thank you! Thank you so much, you don't know how long I was trying (Maybe it was the wrong way, but I was trying (?)) It worked great!

Original thread: https://forums.rpgmakerweb.com/threads/doubt-with-a-command-window-on-script.114357/