Enemy command talk scripts

I must have trouble expressing it, sorry. For Enemy talk or Enemy interaction there is no problem.
I wanted to talk about the command accessible in event (4th button of the 1st page) which allows to select a key item. This command is in conflict with "Actor inventory" in the same way as Enemy interaction and its "give" command was.
Compatibility patch
Spoiler: Vlue Advanced Select Item & Hime Actor Inventory
Code:
=begin
#===============================================================================
 Title: Patch for Advanced Select Item v1.1.1
 Author: V.M of D.T & Roninator2
 Date: Aug 17, 2019
--------------------------------------------------------------------------------
 ** Terms of Use
 * Free to use in non-commercial & commercial use
 * No real support. The script is provided as-is
--------------------------------------------------------------------------------
 ** Description
 Compatibility patch for Vlue Advanced Select Item
 and Hime Actor Inventory scripts
 
 Will now select key items from the main actor
 
=end

class Window_KeyItem
  alias r2_start_adv_sel_924h  start
  def start
    @actor = actor
    r2_start_adv_sel_924h
  end
  alias r2_include_adv_sel_923jf?  include?
  def include?(item,id)
    @actor ? @actor.usable?(item) : false
    r2_include_adv_sel_923jf?(item,id)
  end
  def actor
    @actor
  end
  def make_item_list
    @data = nil
    if !category.nil?
      category.each_index do |id|
        if all_items?(id)
          weapon = @actor.all_items.select {|item| include?(item,id) }
          armor = @actor.all_items.select {|item| include?(item,id) }
          items = @actor.all_items.select {|item| include?(item,id) }
          if @data.nil?
            @data = weapon + armor + items
          else
            if modifier == "&"
              @data & weapon
              @data & armor
              @data & items
            elsif modifier == "|"
              @data | weapon
              @data | armor
              @data | items
            else
              @data = weapon + armor + items
            end
          end
        else
          items = @actor.all_items.select {|item| include?(item,id) }
          if @data.nil?
            @data = items
          else
            if modifier == "&"
              @data = @data & items
            elsif modifier == "|"
              @data = @data | items
            else
              @data += items
            end
          end
        end
      end
    else
      @data = @actor.all_items.select {|item| include?(item,0) }
    end
  end

end
Compatibility patch
Spoiler: Vlue Advanced Select Item & Hime Actor Inventory
Code:
=begin
#===============================================================================
 Title: Patch for Advanced Select Item v1.1.1
 Author: V.M of D.T & Roninator2
 Date: Aug 17, 2019
--------------------------------------------------------------------------------
 ** Terms of Use
 * Free to use in non-commercial & commercial use
 * No real support. The script is provided as-is
--------------------------------------------------------------------------------
 ** Description
 Compatibility patch for Vlue Advanced Select Item
 and Hime Actor Inventory scripts
 
 Will now select key items from the main actor
 
=end

class Window_KeyItem
  alias r2_start_adv_sel_924h  start
  def start
    @actor = actor
    r2_start_adv_sel_924h
  end
  alias r2_include_adv_sel_923jf?  include?
  def include?(item,id)
    @actor ? @actor.usable?(item) : false
    r2_include_adv_sel_923jf?(item,id)
  end
  def actor
    @actor
  end
  def make_item_list
    @data = nil
    if !category.nil?
      category.each_index do |id|
        if all_items?(id)
          weapon = @actor.all_items.select {|item| include?(item,id) }
          armor = @actor.all_items.select {|item| include?(item,id) }
          items = @actor.all_items.select {|item| include?(item,id) }
          if @data.nil?
            @data = weapon + armor + items
          else
            if modifier == "&"
              @data & weapon
              @data & armor
              @data & items
            elsif modifier == "|"
              @data | weapon
              @data | armor
              @data | items
            else
              @data = weapon + armor + items
            end
          end
        else
          items = @actor.all_items.select {|item| include?(item,id) }
          if @data.nil?
            @data = items
          else
            if modifier == "&"
              @data = @data & items
            elsif modifier == "|"
              @data = @data | items
            else
              @data += items
            end
          end
        end
      end
    else
      @data = @actor.all_items.select {|item| include?(item,0) }
    end
  end

end
Thanks Roninator !

Original thread: https://forums.rpgmakerweb.com/threads/enemy-command-talk-scripts.109601/