Bypassing Window_Target

I'm in the process of making a one person CMS.
However, something I need to do is bypass Window_Target

So when you use an item in Scene_item, it instanly uses it on Actor 1.

Can someone tell me how to successfully do this?
Try this out

  1. class Scene_Item
  2.   def update_item
  3.     # If B button was pressed
  4.     if Input.trigger?(Input::B)
  5.       # Play cancel SE
  6.       $game_system.se_play($data_system.cancel_se)
  7.       # Switch to menu screen
  8.       $scene = Scene_Menu.new(0)
  9.       return
  10.     end
  11.     # If C button was pressed
  12.     if Input.trigger?(Input::C)
  13.       # Get currently selected data on the item window
  14.       @item = @item_window.item
  15.       # If not a use item
  16.       unless @item.is_a?(RPG::Item)
  17.         # Play buzzer SE
  18.         $game_system.se_play($data_system.buzzer_se)
  19.         return
  20.       end
  21.       # If it can't be used
  22.       unless $game_party.item_can_use?(@item.id)
  23.         # Play buzzer SE
  24.         $game_system.se_play($data_system.buzzer_se)
  25.         return
  26.       end
  27.       # Play decision SE
  28.       $game_system.se_play($data_system.decision_se)
  29.       # If effect scope is an ally
  30.       if @item.scope >= 3
  31.         # Activate target window
  32.         activate_item
  33.         # Set cursor position to effect scope (single / all)
  34.         if @item.scope == 4 || @item.scope == 6
  35.           activate_item
  36.         else
  37.           activate_item
  38.         end
  39.       # If effect scope is other than an ally
  40.       else
  41.         # If command event ID is valid
  42.         if @item.common_event_id > 0
  43.           # Command event call reservation
  44.           $game_temp.common_event_id = @item.common_event_id
  45.           # Play item use SE
  46.           $game_system.se_play(@item.menu_se)
  47.           # If consumable
  48.           if @item.consumable
  49.             # Decrease used items by 1
  50.             $game_party.lose_item(@item.id, 1)
  51.             # Draw item window item
  52.             @item_window.draw_item(@item_window.index)
  53.           end
  54.           # Switch to map screen
  55.           $scene = Scene_Map.new
  56.           return
  57.         end
  58.       end
  59.       return
  60.     end
  61.     def activate_item
  62.        if $game_party.item_number(@item.id) == 0
  63. #         Play buzzer SE
  64.         $game_system.se_play($data_system.buzzer_se)
  65.         return
  66.       end
  67.      #  If target is all
  68.       if @target_window.index == -1
  69.         # Apply item effects to entire party
  70.         used = false
  71.         for i in $game_party.actors
  72.           used |= i.item_effect(@item)
  73.         end
  74.       end
  75.       # If single target
  76.       if @target_window.index >= 0
  77.         # Apply item use effects to target actor
  78.         target = $game_party.actors[@target_window.index]
  79.         used = target.item_effect(@item)
  80.       end
  81.       # If an item was used
  82.       if used
  83.         # Play item use SE
  84.         $game_system.se_play(@item.menu_se)
  85.         # If consumable
  86.         if @item.consumable
  87.           # Decrease used items by 1
  88.           $game_party.lose_item(@item.id, 1)
  89.           # Redraw item window item
  90.           @item_window.draw_item(@item_window.index)
  91.         end
  92.         # Remake target window contents
  93.         # If all party members are dead
  94.         if $game_party.all_dead?
  95.           # Switch to game over screen
  96.           $scene = Scene_Gameover.new
  97.           return
  98.         end
  99.         # If common event ID is valid
  100.         if @item.common_event_id > 0
  101.           # Common event call reservation
  102.           $game_temp.common_event_id = @item.common_event_id
  103.           # Switch to map screen
  104.           $scene = Scene_Map.new
  105.           return
  106.         end
  107.       end
  108.       # If item wasn't used
  109.       unless used
  110.         # Play buzzer SE
  111.      #   $game_system.se_play($data_system.buzzer_se)
  112.       end
  113.       return
  114.     end
  115.   end
  116.   def update_target
  117.     end
  118.   end
Expand to see the code.
Thanks very much star, it works a treat.
=3

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