Item/Equip/Status Window from Harts Horn

These scripts were found during looking for certain Item window script. It was well known to some RMXP users, although its author or homepage was unknown to them. Anyway, finally I found it, but unfortunately the homepage(http://hartshorn-id.hp.infoseek.co.jp/index.html ) seemed to be abandoned for while.

1. Item Window
http://hartshorn-id.hp.infoseek.co.jp/material/item.html
This script provides 'simple' item grouping. To customize it, you have to edit some parts(like Harts_Window_ItemCommand, Harts_Window_ItemList). Since it has its own item grouping, it may not work well with item grouping scripts like KGC's or XRXS'.(perhaps, you can make it work with them, but I don't think you need to do it)
Content Hidden Spoiler
#==============================================================================
# â–  Harts_Window_ItemTitle
#------------------------------------------------------------------------------
#  アイテム画面で、タイトルを表示するウィンドウ。
#==============================================================================

class Harts_Window_ItemTitle < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, $data_system.words.item, 1)
  end
end

#==============================================================================
# â–  Harts_Window_ItemCommand
#------------------------------------------------------------------------------
#  アイテムの種別選択を行うウィンドウです。
#==============================================================================

class Harts_Window_ItemCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 160, 288)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 8
    @commands = ["ユーズアイテム", "バトルアイテム", $data_system.words.weapon, $data_system.words.armor1, $data_system.words.armor2, $data_system.words.armor3, $data_system.words.armor4, "イベントアイテム"]
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    y = index * 32
    self.contents.draw_text(4, y, 128, 32, @commands[index])
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    case self.index
    when 0
      @text = @commands[0]
    when 1
      @text = @commands[1]
    when 2
      @text = @commands[2]
    when 3
      @text = @commands[3]
    when 4
      @text = @commands[4]
    when 5
      @text = @commands[5]
    when 6
      @text = @commands[6]
    when 7
      @text = @commands[7]
    end
    @help_window.set_text(@text)
  end
end

#==============================================================================
# â–  Window_Item
#------------------------------------------------------------------------------
#  アイテム画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================

class Harts_Window_ItemList < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(160, 0, 480, 416)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
  end
  #--------------------------------------------------------------------------
  # ● アイテム一覧設定
  #     command : 選択中のコマンド
  #--------------------------------------------------------------------------
  def set_item(command)
    refresh
    case command
    when 0
      for i in 1...$data_items.size
        if ($data_items[i].occasion == 0 or $data_items[i].occasion == 2) and $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
    when 1
      for i in 1...$data_items.size
        if ($data_items[i].occasion == 1 and $game_party.item_number(i) > 0)
          @data.push($data_items[i])
        end
      end
    when 2
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
    when 3
      for i in 1...$data_armors.size
        if $data_armors[i].kind == 0 and $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    when 4
      for i in 1...$data_armors.size
        if $data_armors[i].kind == 1 and $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    when 5
      for i in 1...$data_armors.size
        if $data_armors[i].kind == 2 and $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    when 6
      for i in 1...$data_armors.size
        if $data_armors[i].kind == 3 and $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    when 7
      for i in 1...$data_items.size
        if $data_items[i].occasion == 3 and $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
    end
    # 項目数が 0 でなければビットマップを作成し、全項目を描画
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.clear
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 種類別アイテム数の取得
  #--------------------------------------------------------------------------
  def item_number
    return @item_max
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 32
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 400, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 416, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

#==============================================================================
# â–  Harts_Scene_Item
#------------------------------------------------------------------------------
#  アイテム画面の処理を行うクラスです。再定義
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # タイトルウィンドウを作成
    @itemtitle_window = Harts_Window_ItemTitle.new
    #コマンドウィンドウを作成
    @itemcommand_window = Harts_Window_ItemCommand.new
    @command_index = @itemcommand_window.index
    #アイテムウィンドウを作成
    @itemlist_window = Harts_Window_ItemList.new
    @itemlist_window.active = false
    #ヘルプウィンドウを作成
    @help_window = Window_Help.new
    @help_window.x = 0
    @help_window.y = 416
    # ヘルプウィンドウを関連付け
    @itemcommand_window.help_window = @help_window
    @itemlist_window.help_window = @help_window
    # ターゲットウィンドウを作成 (不可視・非アクティブに設定)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    # アイテムウィンドウ内容表示
    @itemlist_window.set_item(@command_index)
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @itemtitle_window.dispose
    @itemcommand_window.dispose
    @itemlist_window.dispose
    @help_window.dispose
    @target_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @itemtitle_window.update
    @itemcommand_window.update
    @itemlist_window.update
    @help_window.update
    @target_window.update
    if @command_index != @itemcommand_window.index
      @command_index = @itemcommand_window.index
      @itemlist_window.set_item(@command_index)
    end
    # コマンドウィンドウがアクティブの場合: update_itemcommand を呼ぶ
    if @itemcommand_window.active
      update_itemcommand
      return
    end
    # アイテムウィンドウがアクティブの場合: update_itemlist を呼ぶ
    if @itemlist_window.active
      update_itemlist
      return
    end
    # ターゲットウィンドウがアクティブの場合: update_target を呼ぶ
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_itemcommand
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュー画面に切り替え
      $scene = Scene_Menu.new(0)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 選択中のコマンドのアイテムがない場合
      if @itemlist_window.item_number == 0
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定  SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブにする
      @itemcommand_window.active = false
      @itemlist_window.active = true
      @itemlist_window.index = 0
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_itemlist
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテムウィンドウをアクティブにする
      @itemcommand_window.active = true
      @itemlist_window.active = false
      @itemlist_window.index = 0
      @itemcommand_window.index = @command_index
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムウィンドウで現在選択されているデータを取得
      @item = @itemlist_window.item
      # 使用アイテムではない場合
      unless @item.is_a?(RPG::Item)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 使用できない場合
      unless $game_party.item_can_use?(@item.id)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # 効果範囲が味方の場合
      if @item.scope >= 3
        # ターゲットウィンドウをアクティブ化
        @itemlist_window.active = false
        @target_window.x = 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
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # アイテムの使用時 SE を演奏
          $game_system.se_play(@item.menu_se)
          # 消耗品の場合
          if @item.consumable
            # 使用したアイテムを 1 減らす
            $game_party.lose_item(@item.id, 1)
            # アイテムウィンドウの項目を再描画
            @itemlist_window.draw_item(@itemlist_window.index)
          end
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ターゲットウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_target
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテム切れなどで使用できなくなった場合
      unless $game_party.item_can_use?(@item.id)
        # アイテムウィンドウの内容を再作成
        @itemlist_window.refresh
      end
      # ターゲットウィンドウを消去
      @itemlist_window.active = true
      @target_window.visible = false
      @target_window.active = false
      @itemlist_window.set_item(@command_index)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムを使い切った場合
      if $game_party.item_number(@item.id) == 0
        # ブザー SE を演奏
        $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
        # アイテムの使用時 SE を演奏
        $game_system.se_play(@item.menu_se)
        # 消耗品の場合
        if @item.consumable
          # 使用したアイテムを 1 減らす
          $game_party.lose_item(@item.id, 1)
          # アイテムウィンドウの項目を再描画
          @itemlist_window.draw_item(@itemlist_window.index)
          @itemlist_window.set_item(@command_index)
        end
        # ターゲットウィンドウの内容を再作成
        @target_window.refresh
        # 全滅の場合
        if $game_party.all_dead?
          # ゲームオーバー画面に切り替え
          $scene = Scene_Gameover.new
          return
        end
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      # アイテムを使わなかった場合
      unless used
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end
Expand to see the code.


Content Hidden Spoiler
http://hartshorn-id.hp.infoseek.co.jp/material/item1/item1.GIF[/IMG]



2. Equip Window
http://hartshorn-id.hp.infoseek.co.jp/material/equip.html
Like any other 'improved' equip window scripts, it shows actor's all status changes. But it has an additional feature: Equipment optimization(that means, you can equip yout strongest equipments only selecting one command).
Content Hidden Spoiler
#==============================================================================
# â–  Harts_Window_EquipTitle
#------------------------------------------------------------------------------
#  装備画面で、タイトルを表示するウィンドウ。
#==============================================================================

class Harts_Window_EquipTitle < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, $data_system.words.equip, 1)
  end
end

#==============================================================================
# â–  Harts_Window_EquipCommand
#------------------------------------------------------------------------------
#  装備の選択を行うウィンドウです。
#==============================================================================

class Harts_Window_EquipCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(160, 0, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 3
    @column_max = 3
    @commands = ["装備", "最強装備", "終わる"]
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    x = index * 160 + 4
    self.contents.draw_text(x, 0, 128, 32, @commands[index], 1)
  end
end

#==============================================================================
# â–  Harts_Window_EquipItem
#------------------------------------------------------------------------------
#  装備画面で、装備変更の候補となるアイテムの一覧を表示するウィンドウです。
#==============================================================================

class Harts_Window_EquipItem < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor      : アクター
  #     equip_type : 装備部位 (0~3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(272, 256, 368, 160)
    @actor = actor
    @equip_type = equip_type
    @column_max = 1
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 最強アイテムのid取得
  #--------------------------------------------------------------------------
  def max_item_id
    if @equip_type == 0
      if @actor.weapon_id == 0
        max = 0
      else
        max = $data_weapons[@actor.weapon_id].atk
      end
    elsif @equip_type == 1
      if @actor.armor1_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor1_id].pdef
      end
    elsif @equip_type == 2
      if @actor.armor2_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor2_id].pdef
      end
    elsif @equip_type == 3
      if @actor.armor3_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor3_id].pdef
      end
    end
    for i in [email protected]
      if @equip_type == 0
        if max <= $data_weapons[@data[i].id].atk
          max = $data_weapons[@data[i].id].atk
          item_id = @data[i].id
        end
      elsif @equip_type >= 1
        if max <= $data_armors[@data[i].id].pdef
          max = $data_armors[@data[i].id].pdef
          item_id = @data[i].id
        end
      end
    end
    return item_id
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 装備可能な武器を追加
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    # 装備可能な防具を追加
    if @equip_type >= 1
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    # 空白を追加
    @data.push(nil)
    # ビットマップを作成し、全項目を描画
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4
    y = index * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 280, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 296, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

#==============================================================================
# â–  Harts_Window_EquipLeft
#------------------------------------------------------------------------------
#  装備画面で、アクターのパラメータ変化を表示するウィンドウです。
#==============================================================================

class Harts_Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクター
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 32, 64)
    draw_actor_name(@actor, 4 + 96, 0)
    draw_actor_level(@actor, 4 + 96, 32)
    draw_actor_parameter(@actor, 4, 80, 0)
    draw_actor_parameter(@actor, 4, 112, 1)
    draw_actor_parameter(@actor, 4, 144, 2)
    draw_actor_parameter(@actor, 4, 192, 3)
    draw_actor_parameter(@actor, 4, 224, 4)
    draw_actor_parameter(@actor, 4, 256, 5)
    draw_actor_parameter(@actor, 4, 288, 6)
    if @new_atk != nil and @new_atk != @actor.atk
      if @new_atk > @actor.atk
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 80, 40, 32, "→", 1)
      self.contents.draw_text(200, 80, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil and @new_pdef != @actor.pdef
      if @new_pdef > @actor.pdef
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 112, 40, 32, "→", 1)
      self.contents.draw_text(200, 112, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil and @new_mdef != @actor.mdef
      if @new_mdef > @actor.mdef
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 144, 40, 32, "→", 1)
      self.contents.draw_text(200, 144, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil and @new_str != @actor.str
      if @new_str > @actor.str
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 192, 40, 32, "→", 1)
      self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil and @new_dex != @actor.dex
      if @new_dex > @actor.dex
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 224, 40, 32, "→", 1)
      self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil and @new_agi != @actor.agi
      if @new_agi > @actor.agi
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 256, 40, 32, "→", 1)
      self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil and @new_int != @actor.int
      if @new_int > @actor.int
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 288, 40, 32, "→", 1)
      self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 装備変更後のパラメータ設定
  #     new_atk  : 装備変更後の攻撃力
  #     new_pdef : 装備変更後の物理防御
  #     new_mdef : 装備変更後の魔法防御
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end

#==============================================================================
# â–  Harts_Scene_Equip
#------------------------------------------------------------------------------
#  装備画面の処理を行うクラスです。
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクターインデックス
  #     equip_index : 装備インデックス
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = -1, command_index = 0, equip_active = false, command_active = true)
    @actor_index = actor_index
    @equip_index = equip_index
    @command_index = command_index
    @equip_active = equip_active
    @command_active = command_active
  end
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # アクターを取得
    @actor = $game_party.actors[@actor_index]
    # ウィンドウを作成
    @title_window = Harts_Window_EquipTitle.new
    @command_window = Harts_Window_EquipCommand.new
    @help_window = Window_Help.new
    @help_window.y = 416
    @left_window = Harts_Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window0 = Harts_Window_EquipItem.new(@actor, -1)
    @item_window1 = Harts_Window_EquipItem.new(@actor, 0)
    @item_window2 = Harts_Window_EquipItem.new(@actor, 1)
    @item_window3 = Harts_Window_EquipItem.new(@actor, 2)
    @item_window4 = Harts_Window_EquipItem.new(@actor, 3)
    @item_window5 = Harts_Window_EquipItem.new(@actor, 4)
    # ヘルプウィンドウを関連付け
    @right_window.help_window = @help_window
    @item_window0.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # カーソル位置を設定
    @command_window.index = @command_index
    @right_window.index = @equip_index
    # アクティブウィンドウを設定
    @command_window.active = @command_active
    @right_window.active = @equip_active
    refresh
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @title_window.dispose
    @command_window.dispose
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window0.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    # アイテムウィンドウの可視状態設定
    @item_window0.visible = (@right_window.index == -1)
    @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
    # 現在のアイテムウィンドウを @item_window に設定
    case @right_window.index
    when -1
      @item_window = @item_window0
    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, nil, nil, nil, nil)
    end
    # アイテムウィンドウがアクティブの場合
    if @item_window.active
      # 現在選択中のアイテムを取得
      item2 = @item_window.item
      # 装備を変更
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # 装備変更後のパラメータを取得
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      # 装備を戻す
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # レフトウィンドウに描画
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @title_window.update
    @command_window.update
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active
      update_command
      return
    end
    # ライトウィンドウがアクティブの場合: update_right を呼ぶ
    if @right_window.active
      update_right
      return
    end
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュー画面に切り替え
      $scene = Scene_Menu.new(2)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      case @command_window.index
      # 装備の場合
      when 0
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ライトウィンドウをアクティブ化
        @right_window.active = true
        @command_window.active = false
        @right_window.index = 0
        @command_window.index = -1
        return
      # 最強装備の場合 
      when 1
        # 装備 SE を演奏
        $game_system.se_play($data_system.equip_se)
        # 最強装備の取得
        max_weapon_id = @item_window1.max_item_id
        max_armor1_id = @item_window2.max_item_id
        max_armor2_id = @item_window3.max_item_id
        max_armor3_id = @item_window4.max_item_id
        # 最強装備実行
        @actor.equip(0, max_weapon_id)
        @actor.equip(1, max_armor1_id)
        @actor.equip(2, max_armor2_id)
        @actor.equip(3, max_armor3_id)
        # ライトウィンドウ、アイテムウィンドウの内容を再作成
        @right_window.refresh
        @left_window.refresh
        @item_window1.refresh
        @item_window2.refresh
        @item_window3.refresh
        @item_window4.refresh
        return
      #終わるの場合
      when 2
        # キャンセル SE を演奏
        $game_system.se_play($data_system.cancel_se)
        # メニュー画面に切り替え
        $scene = Scene_Menu.new(2)
        return
      end
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::R)
      # カーソル SE を演奏
      $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, @command_window.index)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::L)
      # カーソル SE を演奏
      $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, @command_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ライトウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_right
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブ化
      @right_window.active = false
      @command_window.active = true
      @right_window.index = -1
      @command_window.index = 0
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備固定の場合
      if @actor.equip_fix?(@right_window.index)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブ化
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::R)
      # カーソル SE を演奏
      $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, @command_window.index, true, false)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::L)
      # カーソル SE を演奏
      $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, @command_window.index, true, false)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # ライトウィンドウをアクティブ化
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備 SE を演奏
      $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
Expand to see the code.


Content Hidden Spoiler
http://hartshorn-id.hp.infoseek.co.jp/material/equip1/equip1.GIF[/IMG]

This script would not work well with Equip-extend scripts(like KGC's, Guillaume777's.........).

3. Status Window
http://hartshorn-id.hp.infoseek.co.jp/material/status.html
To use this script, you should have gauge picture named 'bar.png'(see attachment).
[spoiler]
[code]
#==============================================================================
# â–  Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。再定義
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 次のレベルまでの EXP の割合取得
#--------------------------------------------------------------------------
def exp_rate
return @exp_list[@level+1] > 0 ? (@exp - @exp_list[@level]) * 100 / (@exp_list[@level+1] - @exp_list[@level]) : 100
end
end

#==============================================================================
# â–  Harts_Window_StatusTitle
#------------------------------------------------------------------------------
#  アイテム画面で、タイトルを表示するウィンドウ。
#==============================================================================

class Harts_Window_StatusTitle < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, "ステータス", 1)
end
end

#==============================================================================
# â–  Harts_Window_StatusName
#------------------------------------------------------------------------------
#  ステータス画面で表示する、名前ウィンドウです。
#==============================================================================

class Harts_Window_StatusName < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 480, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
end
end

#==============================================================================
# â–  Window_Status
#------------------------------------------------------------------------------
#  ステータス画面で表示する、ステータスウィンドウです。
#==============================================================================

class Harts_Window_Status < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# バトラーグラフィックロード
bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(16, 0, bitmap, src_rect)
# バーグラフィックロード
bar = Bitmap.new("./Graphics/Pictures/bar.png")
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 4 + 144, 32)
draw_actor_state(@actor, 4 + 144, 64)

hpbar = @actor.hp * 100 / @actor.maxhp
spbar = @actor.sp * 100 / @actor.maxsp
self.contents.blt(390, 107, bar, Rect.new(0, 0, 102, 6))
self.contents.blt(390, 139, bar, Rect.new(0, 0, 102, 6))
if hpbar < 25
self.contents.blt(391, 108, bar, Rect.new(0, 20, hpbar, 4))
elsif hpbar < 50
self.contents.blt(391, 108, bar, Rect.new(0, 16, hpbar, 4))
else
self.contents.blt(391, 108, bar, Rect.new(0, 12, hpbar, 4))
end
if spbar < 25
self.contents.blt(391, 140, bar, Rect.new(0, 20, spbar, 4))
elsif spbar < 50
self.contents.blt(391, 140, bar, Rect.new(0, 16, spbar, 4))
else
self.contents.blt(391, 140, bar, Rect.new(0, 12, spbar, 4))
end
draw_actor_hp(@actor, 320, 80, 172)
draw_actor_sp(@actor, 320, 112, 172)

strbar = @actor.str * 100 / 999
dexbar = @actor.dex * 100 / 999
agibar = @actor.agi * 100 / 999
intbar = @actor.int * 100 / 999
self.contents.blt(480, 176, bar, Rect.new(0, 0, 102, 6))
self.contents.blt(480, 208, bar, Rect.new(0, 0, 102, 6))
self.contents.blt(480, 240, bar, Rect.new(0, 0, 102, 6))
self.contents.blt(480, 272, bar, Rect.new(0, 0, 102, 6))
self.contents.blt(481, 177, bar, Rect.new(0, 24, strbar, 4))
self.contents.blt(481, 209, bar, Rect.new(0, 24, dexbar, 4))
self.contents.blt(481, 241, bar, Rect.new(0, 24, agibar, 4))
self.contents.blt(481, 273, bar, Rect.new(0, 24, intbar, 4))
draw_actor_parameter(@actor, 320, 288, 0)
draw_actor_parameter(@actor, 320, 320, 1)
draw_actor_parameter(@actor, 320, 352, 2)
draw_actor_parameter(@actor, 320, 160, 3)
draw_actor_parameter(@actor, 320, 192, 4)
draw_actor_parameter(@actor, 320, 224, 5)
draw_actor_parameter(@actor, 320, 256, 6)

self.contents.blt(320, 59, bar, Rect.new(0, 6, 202, 6))
self.contents.blt(321, 60, bar, Rect.new(0, 24, @actor.exp_rate * 2, 4))
self.contents.font.color = system_color
self.contents.draw_text(320, 0, 80, 32, "EXP")
self.contents.draw_text(320, 32, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 0, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 32, 84, 32, @actor.next_rest_exp_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(4, 192, 96, 32, "装備")
draw_item_name($data_weapons[@actor.weapon_id], 16, 224)
draw_item_name($data_armors[@actor.armor1_id], 16, 256)
draw_item_name($data_armors[@actor.armor2_id], 16, 288)
draw_item_name($data_armors[@actor.armor3_id], 16, 320)
draw_item_name($data_armors[@actor.armor4_id], 16, 352)
end
end

#==============================================================================
# â–  Harts_Scene_Status
#------------------------------------------------------------------------------
#  ステータス画面の処理を行うクラスです。再定義
#==============================================================================

class Scene_Status
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor_index : アクタ&#
Why did you all flame my topic. Screw your fucking forums.
Reposted. Seems Attached files are not affected, but who knows......
Due to a hack attempt, I cannot post here saying how great this scripting find is.

Waitaminute...
?? It's in a language.... I can't understand... Can you convert to english?
Here's a simple demo I made. (However, I didn't translate comments..)
question: how do I get the equip window script to work with guillame777's multi slot script?

The problem is, on the equip screen, every other slot looks like this:

http://img.photobucket.com/albums/v68/s ... a/0002.png[/img]

Except the R-Hand slot, which looks like this:

http://img.photobucket.com/albums/v68/s ... a/0003.png[/img]

As you can see, the R-Hand equip window is messed up.

I don't know how to script, but if you can direct me to which line(s) of text to edit, I will be fine. And just in case you need to know, I put the equip window script directly above the multi slot script.

Help would be greatly appreciated.
That's why I say 'It may not work well with any Equip-Extend scripts'. I think it needs massive edit or rewrite, but since I'm not scripter....
It's all in Japanese, but other than that, it is a very nice script.
Recently, I edited Harts Horn Item & Equip for SDK2. Since I'm not a scripter, as you see, I cannot make them better. They're WIP, and Equip script has a problem(which I cannot find out the cause).

Harts Horn Item SDK2 Edit WIP Spoiler
#==============================================================================
# Harts Horn Item
#------------------------------------------------------------------------------
# http://hartshorn-id.hp.infoseek.co.jp/
# Edited by L
#==============================================================================

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Harts Horn Item', 'Harts Horn', '??', '2004-??-??')

#--------------------------------------------------------------------------
# * Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1])

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Harts Horn Item')


module HARTS_ITEM_CUSTOMIZE
  # Set Item element name for Item Grouping.  This is for Element tag.
  ETC_ITEM_ELE = 'Sell Item'
  KEY_ITEM_ELE = 'Event Item'
  CHARM_ITEM_ELE = 'Charm' #what charm? I know there's a script which can make charm(If you played Diablo2:LoD, you'll know).
 
  # Set Item Group Word
  Item = 'Item'
  Consumed_Item = 'Use Item'
  Battle_Item = 'Battle Item'
  Weapon = 'Weapon'
  Defensive = 'Equipments'
  Body_Armor = 'Armor'
  Shield = 'Shield'
  Headgear = 'Helmet'
  Accessories = 'Accessory'
  Other = 'Other'
  Event = 'Event Item'
  Charm = 'Charm'
  All = 'All'
 
  # Set Item Kind Group
  Item_Kind_Group = [Item, Weapon, Defensive, Accessories, Other, Event, All]
 
  # Set Help Text(If nil, it will use Group Word)
  Item_Kind_Help = [nil,
                    nil,
                    nil,
                    nil,
                    'Shows items that cannot be used, but can be sold',
                    nil,
                    'Shows all items except event item']
end

#==============================================================================
# â–  Harts_Window_ItemTitle
#------------------------------------------------------------------------------
#  アイテム画面で、タイトルを表示するウィンドウ。
#==============================================================================

class Harts_Window_ItemTitle < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, "Item", 1)
  end
end

#==============================================================================
# â–  Harts_Window_ItemCommand
#------------------------------------------------------------------------------
#  アイテムの種別選択を行うウィンドウです。
#==============================================================================

class Harts_Window_ItemCommand < Window_Command
  include HARTS_ITEM_CUSTOMIZE
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    return if @help_window.nil?
    if Item_Kind_Help[self.index] != nil
      @help_window.set_text(Item_Kind_Help[self.index])
    else
      @help_window.set_text(Item_Kind_Group[self.index])
    end
  end
end

#==============================================================================
# â–  Window_Item
#------------------------------------------------------------------------------
#  アイテム画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================

class Harts_Window_ItemList < Window_Selectable
  include HARTS_ITEM_CUSTOMIZE
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(160, 0, 480, 416)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
  end
  #--------------------------------------------------------------------------
  # ● アイテム一覧設定
  #     command : 選択中のコマンド
  #--------------------------------------------------------------------------
  def set_item(command)
    refresh
    # Customize Point - Set Item Group by Index
    case command
    when 0
      get_item_list
    when 1
      get_weapon_list
    when 2
      get_defensive_list
    when 3
      get_accessory_list
    when 4
      get_etc_item_list
    when 5
      get_event_item_list
    when 6
      get_item_list
      get_weapon_list
      get_defensive_list
      get_accessory_list
      get_etc_item_list
    end
    # 項目数が 0 でなければビットマップを作成し、全項目を描画
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.clear
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 種類別アイテム数の取得
  #--------------------------------------------------------------------------
  def item_number
    return @item_max
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 32
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    if number > 1
      self.contents.draw_text(x + 400, y, 16, 32, ":", 1)
      self.contents.draw_text(x + 416, y, 24, 32, number.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
  #Customize Point - Item Grouping
  #--------------------------------------------------------------------------
  def get_item_list
    get_consumed_item_list
    get_battle_item_list   
  end
  #--------------------------------------------------------------------------
  def get_battle_item_list
    for i in 1...$data_items.size
      if ($data_items[i].occasion == 1 and $game_party.item_number(i) > 0)
        @data.push($data_items[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_consumed_item_list
    for i in 1...$data_items.size
      if ($data_items[i].occasion == 0 or $data_items[i].occasion == 2) and $game_party.item_number(i) > 0       
        @data.push($data_items[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_weapon_list
    for i in 1...$data_weapons.size
      if $game_party.weapon_number(i) > 0
        @data.push($data_weapons[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_defensive_list
    get_shield_list
    get_headgear_list
    get_armor_list
  end
  #--------------------------------------------------------------------------
  def get_shield_list
    for i in 1...$data_armors.size
      if $data_armors[i].kind == 0 and $game_party.armor_number(i) > 0
        @data.push($data_armors[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_headgear_list
    for i in 1...$data_armors.size
      if $data_armors[i].kind == 1 and $game_party.armor_number(i) > 0
        @data.push($data_armors[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_armor_list
    for i in 1...$data_armors.size
      if $data_armors[i].kind == 2 and $game_party.armor_number(i) > 0
        @data.push($data_armors[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_accessory_list
    for i in 1...$data_armors.size
      if $data_armors[i].kind >= 3 and $game_party.armor_number(i) > 0
        @data.push($data_armors[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_etc_item_list
    for i in 1...$data_items.size
      if $data_items[i].occasion == 3 and $game_party.item_number(i) > 0 and $data_items[i].element_set.include?($data_system.elements.index(ETC_ITEM_ELE))
        @data.push($data_items[i])         
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_event_item_list
    for i in 1...$data_items.size
      if $data_items[i].occasion == 3 and $game_party.item_number(i) > 0 and $data_items[i].element_set.include?($data_system.elements.index(KEY_ITEM_ELE))
        @data.push($data_items[i])
      end
    end
  end
  #--------------------------------------------------------------------------
  def get_charm_list
    for i in 1...$data_items.size
      if $data_items[i].occasion == 3 and $game_party.item_number(i) > 0 and $data_items[i].element_set.include?($data_system.elements.index(CHARM_ITEM_ELE))
        @data.push($data_items[i])         
      end
    end
  end 
  #-------------------------------------------------------------------------- 
end

#==============================================================================
# â–  Harts_Scene_Item
#------------------------------------------------------------------------------
#  アイテム画面の処理を行うクラスです。再定義
#==============================================================================

class Scene_Item < SDK::Scene_Base
  include HARTS_ITEM_CUSTOMIZE
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main_window
    # タイトルウィンドウを作成
    @itemtitle_window = Harts_Window_ItemTitle.new
    #コマンドウィンドウを作成 
    item_commands = Item_Kind_Group
    @itemcommand_window = Harts_Window_ItemCommand.new(160, item_commands)
    @itemcommand_window.y = 64
    if @itemcommand_window.height >= 352
      @itemcommand_window.height = 352
    end
    @command_index = @itemcommand_window.index
    #アイテムウィンドウを作成
    @itemlist_window = Harts_Window_ItemList.new
    @itemlist_window.active = false
    #ヘルプウィンドウを作成
    @help_window = Window_Help.new
    @help_window.x = 0
    @help_window.y = 416
    # ヘルプウィンドウを関連付け
    @itemcommand_window.help_window = @help_window
    @itemlist_window.help_window = @help_window
    # ターゲットウィンドウを作成 (不可視・非アクティブに設定)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    # アイテムウィンドウ内容表示
    @itemlist_window.set_item(@command_index)
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
    if @command_index != @itemcommand_window.index
      @command_index = @itemcommand_window.index
      @itemlist_window.set_item(@command_index)
    end
    # コマンドウィンドウがアクティブの場合: update_itemcommand を呼ぶ
    if @itemcommand_window.active
      update_itemcommand
      return
    end
    # アイテムウィンドウがアクティブの場合: update_itemlist を呼ぶ
    if @itemlist_window.active
      update_itemlist
      return
    end
    # ターゲットウィンドウがアクティブの場合: update_target を呼ぶ
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_itemcommand
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュー画面に切り替え
      $scene = Scene_Menu.new(0)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 選択中のコマンドのアイテムがない場合
      if @itemlist_window.item_number == 0
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定  SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブにする
      @itemcommand_window.active = false
      @itemlist_window.active = true
      @itemlist_window.index = 0
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_itemlist
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテムウィンドウをアクティブにする
      @itemcommand_window.active = true
      @itemlist_window.active = false
      @itemlist_window.index = 0
      @itemcommand_window.index = @command_index
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムウィンドウで現在選択されているデータを取得
      @item = @itemlist_window.item
      # 使用アイテムではない場合
      unless @item.is_a?(RPG::Item)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 使用できない場合
      unless $game_party.item_can_use?(@item.id)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # 効果範囲が味方の場合
      if @item.scope >= 3
        # ターゲットウィンドウをアクティブ化
        @itemlist_window.active = false
        @target_window.x = 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
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # アイテムの使用時 SE を演奏
          $game_system.se_play(@item.menu_se)
          # 消耗品の場合
          if @item.consumable
            # 使用したアイテムを 1 減らす
            $game_party.lose_item(@item.id, 1)
            # アイテムウィンドウの項目を再描画
            @itemlist_window.draw_item(@itemlist_window.index)
          end
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ターゲットウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_target
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテム切れなどで使用できなくなった場合
      unless $game_party.item_can_use?(@item.id)
        # アイテムウィンドウの内容を再作成
        @itemlist_window.refresh
      end
      # ターゲットウィンドウを消去
      @itemlist_window.active = true
      @target_window.visible = false
      @target_window.active = false
      @itemlist_window.set_item(@command_index)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムを使い切った場合
      if $game_party.item_number(@item.id) == 0
        # ブザー SE を演奏
        $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
        # アイテムの使用時 SE を演奏
        $game_system.se_play(@item.menu_se)
        # 消耗品の場合
        if @item.consumable
          # 使用したアイテムを 1 減らす
          $game_party.lose_item(@item.id, 1)
          # アイテムウィンドウの項目を再描画
          @itemlist_window.draw_item(@itemlist_window.index)
          @itemlist_window.set_item(@command_index)
        end
        # ターゲットウィンドウの内容を再作成
        @target_window.refresh
        # 全滅の場合
        if $game_party.all_dead?
          # ゲームオーバー画面に切り替え
          $scene = Scene_Gameover.new
          return
        end
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      # アイテムを使わなかった場合
      unless used
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Expand to see the code.

Maybe someone can make grouping method better, like tibuda did.

Harts Horn Equip Edit Spoiler
#==============================================================================
# Harts Horn Equip
#------------------------------------------------------------------------------
# http://hartshorn-id.hp.infoseek.co.jp/
# Edited by L
#==============================================================================

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Harts Horn Equip', 'Harts Horn', '??', '2004-??-??')

#--------------------------------------------------------------------------
# * Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1])

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Harts Horn Equip')

#==============================================================================
# â–  Harts_Window_EquipTitle
#------------------------------------------------------------------------------
#  装備画面で、タイトルを表示するウィンドウ。
#==============================================================================

class Harts_Window_EquipTitle < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, 'Equip', 1)
  end
end

#==============================================================================
# â–  Harts_Window_EquipCommand
#------------------------------------------------------------------------------
#  装備の選択を行うウィンドウです。
#==============================================================================

class Harts_Window_EquipCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(160, 0, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 3
    @column_max = 3
    @commands = ["Equip", "Optimize", "Exit"]
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #     color : 文字色
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    x = index * 160 + 4
    self.contents.draw_text(x, 0, 128, 32, @commands[index], 1)
  end
end

#==============================================================================
# â–  Harts_Window_EquipItem
#------------------------------------------------------------------------------
#  装備画面で、装備変更の候補となるアイテムの一覧を表示するウィンドウです。
#==============================================================================

class Harts_Window_EquipItem < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor      : アクター
  #     equip_type : 装備部位 (0~3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(272, 256, 368, 160)
    @actor = actor
    @equip_type = equip_type
    @column_max = 1
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 最強アイテムのid取得
  #--------------------------------------------------------------------------
  def max_item_id
    if @equip_type == 0
      if @actor.weapon_id == 0
        max = 0
      else
        max = $data_weapons[@actor.weapon_id].atk
      end
    elsif @equip_type == 1
      if @actor.armor1_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor1_id].pdef
      end
    elsif @equip_type == 2
      if @actor.armor2_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor2_id].pdef
      end
    elsif @equip_type == 3
      if @actor.armor3_id == 0
        max = 0
      else
        max = $data_armors[@actor.armor3_id].pdef
      end
    end
    for i in [email protected]
      if @equip_type == 0
        if max <= $data_weapons[@data[i].id].atk
          max = $data_weapons[@data[i].id].atk
          item_id = @data[i].id
        end
      elsif @equip_type >= 1
        if max <= $data_armors[@data[i].id].pdef
          max = $data_armors[@data[i].id].pdef
          item_id = @data[i].id
        end
      end
    end
    return item_id
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 装備可能な武器を追加
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    # 装備可能な防具を追加
    if @equip_type >= 1
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    # 空白を追加
    @data.push(nil)
    # ビットマップを作成し、全項目を描画
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
    i = @item_max-1
    x = 4 + i % @column_max * (288 + 32)
    y = i / @column_max * 32
    self.contents.draw_text(x+4, y, 100, 32, '[Remove]')
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4
    y = index * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 280, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 296, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

#==============================================================================
# â–  Harts_Window_EquipLeft
#------------------------------------------------------------------------------
#  装備画面で、アクターのパラメータ変化を表示するウィンドウです。
#==============================================================================

class Harts_Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor : アクター
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 32, 64)
    draw_actor_name(@actor, 4 + 96, 0)
    draw_actor_level(@actor, 4 + 96, 32)
    draw_actor_parameter(@actor, 4, 80, 0)
    draw_actor_parameter(@actor, 4, 112, 1)
    draw_actor_parameter(@actor, 4, 144, 2)
    draw_actor_parameter(@actor, 4, 192, 3)
    draw_actor_parameter(@actor, 4, 224, 4)
    draw_actor_parameter(@actor, 4, 256, 5)
    draw_actor_parameter(@actor, 4, 288, 6)
    if @new_atk != nil and @new_atk != @actor.atk
      if @new_atk > @actor.atk
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 80, 40, 32, "→", 1)
      self.contents.draw_text(200, 80, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil and @new_pdef != @actor.pdef
      if @new_pdef > @actor.pdef
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 112, 40, 32, "→", 1)
      self.contents.draw_text(200, 112, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil and @new_mdef != @actor.mdef
      if @new_mdef > @actor.mdef
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 144, 40, 32, "→", 1)
      self.contents.draw_text(200, 144, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil and @new_str != @actor.str
      if @new_str > @actor.str
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 192, 40, 32, "→", 1)
      self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil and @new_dex != @actor.dex
      if @new_dex > @actor.dex
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 224, 40, 32, "→", 1)
      self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil and @new_agi != @actor.agi
      if @new_agi > @actor.agi
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 256, 40, 32, "→", 1)
      self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil and @new_int != @actor.int
      if @new_int > @actor.int
        self.contents.font.color = system_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.draw_text(160, 288, 40, 32, "→", 1)
      self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 装備変更後のパラメータ設定
  #     new_atk  : 装備変更後の攻撃力
  #     new_pdef : 装備変更後の物理防御
  #     new_mdef : 装備変更後の魔法防御
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end

#==============================================================================
# â–  Harts_Scene_Equip
#------------------------------------------------------------------------------
#  装備画面の処理を行うクラスです。
#==============================================================================

class Scene_Equip < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     actor_index : アクターインデックス
  #     equip_index : 装備インデックス
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = -1, command_index = 0, equip_active = false, command_active = true)
    @actor_index = actor_index
    @equip_index = equip_index
    @command_index = command_index
    @equip_active = equip_active
    @command_active = command_active
  end
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main_window
    # アクターを取得
    @actor = $game_party.actors[@actor_index]
    # ウィンドウを作成
    @title_window = Harts_Window_EquipTitle.new
    @command_window = Harts_Window_EquipCommand.new
    @help_window = Window_Help.new
    @help_window.y = 416
    @left_window = Harts_Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window0 = Harts_Window_EquipItem.new(@actor, -1)
    @item_window1 = Harts_Window_EquipItem.new(@actor, 0)
    @item_window2 = Harts_Window_EquipItem.new(@actor, 1)
    @item_window3 = Harts_Window_EquipItem.new(@actor, 2)
    @item_window4 = Harts_Window_EquipItem.new(@actor, 3)
    @item_window5 = Harts_Window_EquipItem.new(@actor, 4)
    # ヘルプウィンドウを関連付け
    @right_window.help_window = @help_window
    @item_window0.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # カーソル位置を設定
    @command_window.index = @command_index
    @right_window.index = @equip_index
    # アクティブウィンドウを設定
    @command_window.active = @command_active
    @right_window.active = @equip_active
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    # アイテムウィンドウの可視状態設定
    @item_window0.visible = (@right_window.index == -1)
    @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
    # 現在のアイテムウィンドウを @item_window に設定
    case @right_window.index
    when -1
      @item_window = @item_window0
    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, nil, nil, nil, nil)
    end
    # アイテムウィンドウがアクティブの場合
    if @item_window.active
      # 現在選択中のアイテムを取得
      item2 = @item_window.item
      # 装備を変更
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # 装備変更後のパラメータを取得
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      # 装備を戻す
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # レフトウィンドウに描画
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
    refresh
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active
      update_command
      return
    end
    # ライトウィンドウがアクティブの場合: update_right を呼ぶ
    if @right_window.active
      update_right
      return
    end
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュー画面に切り替え
      $scene = Scene_Menu.new(2)
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      case @command_window.index
      # 装備の場合
      when 0
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ライトウィンドウをアクティブ化
        @right_window.active = true
        @command_window.active = false
        @right_window.index = 0
        @command_window.index = -1
        return
      # 最強装備の場合 
      when 1
        # 装備 SE を演奏
        $game_system.se_play($data_system.equip_se)
        # 最強装備の取得
        max_weapon_id = @item_window1.max_item_id
        max_armor1_id = @item_window2.max_item_id
        max_armor2_id = @item_window3.max_item_id
        max_armor3_id = @item_window4.max_item_id
        # 最強装備実行
        @actor.equip(0, max_weapon_id)
        @actor.equip(1, max_armor1_id)
        @actor.equip(2, max_armor2_id)
        @actor.equip(3, max_armor3_id)
        # ライトウィンドウ、アイテムウィンドウの内容を再作成
        @right_window.refresh
        @left_window.refresh
        @item_window1.refresh
        @item_window2.refresh
        @item_window3.refresh
        @item_window4.refresh
        return
      #終わるの場合
      when 2
        # キャンセル SE を演奏
        $game_system.se_play($data_system.cancel_se)
        # メニュー画面に切り替え
        $scene = Scene_Menu.new(2)
        return
      end
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::R)
      # カーソル SE を演奏
      $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, @command_window.index)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::L)
      # カーソル SE を演奏
      $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, @command_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ライトウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_right
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブ化
      @right_window.active = false
      @command_window.active = true
      @right_window.index = -1
      @command_window.index = 0
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備固定の場合
      if @actor.equip_fix?(@right_window.index)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブ化
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # R ボタンが押された場合
    if Input.trigger?(Input::R)
      # カーソル SE を演奏
      $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, @command_window.index, true, false)
      return
    end
    # L ボタンが押された場合
    if Input.trigger?(Input::L)
      # カーソル SE を演奏
      $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, @command_window.index, true, false)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # ライトウィンドウをアクティブ化
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備 SE を演奏
      $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

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Expand to see the code.

It looks normal, but has equip item selecting problem. I tried to find out, but haven't found out why yet.


Note:
You may use them and edit them for you, but please, do not post these somewhere other place.(God, I already...)
Hey, this is a cool script, cuz I've been looking for something like this. But there's a problem with the way the optimization works. It doesn't take into account what is already equipped, so it's pretty pointless to use it.

For an example, I'll say there's a Helmet 1, Helmet 2, and Helmet 3; and an Armor 1, Armor 2, and Armor 3 (3 being the best, and 1 being the worst). If you have Helmet 2, and Armor 3 equipped and you push Optimize, it's going to equip Helmet 3, and Armor 2. <--This is the problem.

Since it sees that Armor 2 is the best available armor in stock, it's going to equip that even though you already had a better one on. But it is going to equip the right Helmet, but that's just because you didn't have the best one already equipped. So if you keep pushing optimize, it's just going to keep switching between the two different equipment sets, which are both inferior to the true optimal.

Sorry if that's confusing :/

Also, it would be nice to have an Empty option to remove all equipment (or maybe just the equipment slots the user can specify in the script).

Edit: Also, is it at all possible to add an Evasion stat thing to this? Cuz in my game one slot is completely devoted to Evasion-giving items that don't boost any other stats, so they aren't put in when optimize is pressed.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=1952