Help or advice with Ninja Throw script by LockeZ[Solved]

So, I found this neat script that let's you use items for skills, e.x.: Spell= Trap Need: Dynamite Damage goes boom when using skill. I've been using common event to do the same, but, it won't stop from player using the skill in combat, meaning that if you dont have dynamite, you can still use the skill and get text "you don't have dynamite in inventory to use the skill" and player wastes a turn. This script greys out the skill and prevents player from using. It's all nice and works perfectly fine, but, I have issues when I want a player to requier more than one item in inventory to use, like Survivalist skill, e.x.: Skill=Surivivalist Need: Cloth and 1 Herb. If you have it you can heal anytime you want in and out of combat, but, the script only takes one item either Cloth or Herb depending which I put first in script, there is no way that I can think of to make it work inside the script and I'm stuck using common event page.
Any suggestions?

TL😀R:
Script forces me to use only one item or weapon to use skill, I want more than 1 to use it.

Spoiler
# Ninja Throw script by LockeZ

# Allows any skill to consume either an item or a weapon

# Utilize for whatever you want, no credit necessary



class Game_BattlerBase

attr_accessor :ninja_throw_skill_items

attr_accessor :ninja_throw_skill_weapons



alias ninja_throw_initialize initialize

def initialize

@ninja_throw_skill_items = {}

@ninja_throw_skill_weapons = {}



# Add your game's skills that use up items below this line. Examples follow.



@ninja_throw_skill_items[313] = 363 # Skill #30 requires item #3

@ninja_throw_skill_items[306] = 358 # Skill #31 requires item #5

@ninja_throw_skill_items[302] = 72 # Skill #32 requires weapon #5

@ninja_throw_skill_items[301] = 34 # Skill #32 requires weapon #5

@ninja_throw_skill_items[297] = 358 # Skill #32 requires weapon #5

@ninja_throw_skill_weapons [234] = 1 # Skill #31 requires item #5




# Don't edit stuff below this line.



ninja_throw_initialize

end



alias ninja_throw_skill_cost_payable? skill_cost_payable?

def skill_cost_payable?(skill)

if @ninja_throw_skill_items[skill.id] != nil

unless $game_party.has_item?($data_items[@ninja_throw_skill_items[skill.id]])

return false

end

end



if @ninja_throw_skill_weapons[skill.id] != nil

unless $game_party.has_item?($data_weapons[@ninja_throw_skill_weapons[skill.id]])

return false

end

end



ninja_throw_skill_cost_payable?(skill)

end



alias ninja_throw_pay_skill_cost pay_skill_cost

def pay_skill_cost(skill)

if @ninja_throw_skill_items[skill.id] != nil

$game_party.lose_item($data_items[@ninja_throw_skill_items[skill.id]], 1)

end



if @ninja_throw_skill_weapons[skill.id] != nil

$game_party.lose_item($data_weapons[@ninja_throw_skill_weapons[skill.id]], 1)

end



ninja_throw_pay_skill_cost(skill)

end

end
The way I would achieve this (notwithstanding that I would likely have coded it entirely differently in the first place and use notetags to define throwing requirements) would be to change the @ninja_skill_throw_items and @ninja_skill_throw_weapons hashmaps so that the value of each key is an array of all items/weapons required for that skill, then instead of checking a single value for paying the cost, I'd loop through the array to make sure all items are present/removed.
The way I would achieve this (notwithstanding that I would likely have coded it entirely differently in the first place and use notetags to define throwing requirements) would be to change the @ninja_skill_throw_items and @ninja_skill_throw_weapons hashmaps so that the value of each key is an array of all items/weapons required for that skill, then instead of checking a single value for paying the cost, I'd loop through the array to make sure all items are present/removed.
I might be stupid or something, but, I can't work it out. It keeps going around wihtout anything changing
I might be stupid or something, but, I can't work it out. It keeps going around wihtout anything changing
What have you tried?
Have you found or tried Throw script by The Sarah?
Spoiler: FFIX Style Throw
Ruby:
#------------------------------------------------------------------------------#
=begin

                          "FFIX Style" Throw Script

                                by The_Sarah
                                  (v1.2.1)
                  
--                                                                            --

                             ~~~ REQUIREMENTS ~~~
                      
                                    None
                            
--                                                                            --

                              ~~~ HOW TO USE ~~~

Step 1) Create a "Throw" skill in your Database like you normally would.


Step 2) In the Editable Region below, change the number 219 to the number
         of your Throw skill's id in the Database.
 
 
Step 3) For any character you want to be able to use the Throw skill, simply
         add a notetag saying "<Throw>" (without the speechmarks).
          - Add this <Throw> notetag in the relevant character's Note Box (in
            the Game Actors section of the Database).
 
 
Step 4) For any items, weapons or armour in your inventory that you would
         like to be throwable:
 
         i) You must write a Notetag in their Note Box sections in the Database.

        ii) A FULL LIST of the notetags you can write, as well as information
            on what they each do, can be found below.
    
       iii) This list is found under the "~ NOTETAGS KEY ~" section of this
            script intro (just below FEATURES).
 
    
Step 5) Enjoy the script!
         Maybe leave a like on my RPG Maker Forum Thread page? :P

 
--                                                                            --


                              ~~~ FEATURES ~~~
                        
   With this script, you can make any number of characters (who are Game Actors)
   in your game able to use the "Throw" skill.

   The Throw skill is a skill that (by default) is found underneath any chosen
   character's SKILL command and above that character's GUARD command when in
   battle.

   This skill will open a unique Throwable Item Window.
    - This window will then show the player a list of any Items, Weapons or
      Armour that they have in their inventory that you (the game maker) have
      decided are throwable in your game.

   The player can then pick from this list and throw the object at an enemy.

   The object thrown will decrease in the party's inventory by 1.

   Any damage a thrown object does is calculated on whatever you wrote in
   your "Throw" skill's damage formula (in the Database), as well as whatever
   Notetag you have assigned to the Item/Weapon/Armour thrown.


--                                                                            --


                            ~~~ NOTETAGS KEY ~~~

   The following section is a list of every Notetag you can put into the Note
   Box of an Item, Weapon or Armour in the game's Database to make them
   throwable.

   The list also includes information on what each Notetag does to the damage
   of your Throw skill.


   Please note, each variant on the Notetag applies a different effect to
   YOUR existing Throw skill's Damage Formula.

   So make sure to have already created a Throw Skill in the Database as well :)
________________________________________________________________________________

   Notetag             Effect           |    Notetag             Effect

  <throwheal>  = Throws for 1x healing  | <throwhalf>   = Throws for half damage

  <throwdmg0>  = Throws for 0   damage  | <throwdmg>    = Throws for 1x  damage
  <throwdmg1>  = Throws for 1x  damage  | <throwdmg2>   = Throws for 2x  damage
  <throwdmg3>  = Throws for 3x  damage  | <throwdmg4>   = Throws for 4x  damage
  <throwdmg5>  = Throws for 5x  damage  | <throwdmg6>   = Throws for 6x  damage
  <throwdmg7>  = Throws for 7x  damage  | <throwdmg8>   = Throws for 8x  damage
  <throwdmg9>  = Throws for 9x  damage  | <throwdmg10>  = Throws for 10x damage
  <throwdmg11> = Throws for 11x damage  | <throwdmg12>  = Throws for 12x damage
  <throwdmg13> = Throws for 13x damage  | <throwdmg14>  = Throws for 14x damage
  <throwdmg15> = Throws for 15x damage  | <throwdmg16>  = Throws for 16x damage
  <throwdmg17> = Throws for 17x damage  | <throwdmg18>  = Throws for 18x damage
  <throwdmg19> = Throws for 19x damage  | <throwdmg20>  = Throws for 20x damage
  <throwdmg21> = Throws for 21x damage  | <throwdmg22>  = Throws for 22x damage
  <throwdmg23> = Throws for 23x damage  | <throwdmg24>  = Throws for 24x damage
  <throwdmg25> = Throws for 25x damage  | <throwdmg50>  = Throws for 50x damage
  <throwdmg75> = Throws for 75x damage  | <throwdmg100> = Throws for 100x damage
  <throwdmg250> = Throws for 250x damage| <throwdmg500> = Throws for 500x damage
  <throwdmg750> = Throws for 750x damage|

  <throwdmg1000> = Throws for 1000x damage
  <throwdmg2500> = Throws for 2500x damage
  <throwdmg5000> = Throws for 5000x damage
  <throwdmg7500> = Throws for 7500x damage
  <throwdmg10000> = Throws for 10000x damage

________________________________________________________________________________


--                                                                            --


                            ~~~ TERMS OF USE ~~~
                    
    If you share a game with this script in it (freely OR commercially), you
                         MUST credit me in the game.

               Ideally like this: "Throw Script by The_Sarah"

    Or like this if you edited the script: "Original Throw Script by The_Sarah"


    Other than that, this script is free to download and use or edit in any
                    game or project (free or commercial).

                    
--                                                                            --


                              ~~~ REQUESTS ~~~

   If you would like me to add more damage variants via additional notetags,
   please request so in the RPG Maker Forum Thread I made to originally host
   this Script.

   I will reply to all requests when I have the time (which shouldn't be too
   long to be honest) and do my best to accomodate them.


--                                                                            --


                                ~~~ BUGS ~~~

                           No current known issues.

        
--                                                                            --


                           ~~~ SPECIAL THANKS ~~~

     * The_Sarah (aka me) for being awesome and making this script :O

     * TheoAllen (RPG Maker Forum user) for initially helping me with
       figuring out the make_damage_value method.

     * Kyonides  (RPG Maker Forum user) for helping with Module Instance
       variables and Regex.

     * A-Moonless-Night (RPG Maker Forum user) for Aliasing help as well as
       helping me to finally understand how to grab specific parts within a
       Regex string.

     * LockeZ Ninja Throw (Script) for helping me figure out how to decrease
       items when thrown.


--                                                                            --

                                ~~~ OUTRO ~~~

   And that's it!

   This is my second ever public script (and definitely the biggest public one
   I've made so far) and as a result it has many areas I'm sure can be cleaned
   up (looking at you "include?").

   But the community on the RPG Maker Forum has been mostly friendly so far, so
   I'm happy to allow anyone who wants to look at it and give me tips to do so
   (if they feel so kind).

   Have wonderful lives everyone.
   Be kind to eachother.
   Don't be ____ist or ___phobic towards others, remember we're all human!

                    Let's make wonderful games together!

                                                            - The_Sarah

=end
#------------------------------------------------------------------------------#
#=begin


module TheSarahThrow
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~#

#                 ~~~~----# - EDITABLE REGION - #----~~~~                      #
#                               IMPORTANT                                      #

# Change the number in this section to the number of your Throw skill in the
# Database (default 185):

                THROW_SKILL_ID      =      185         # Your Throw skill ID


#                    ~~# - END OF EDITABLE REGION - #~~                        #
              
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~#
end # End of TheSarahThrow module




#------------------------------------------------------------------------------#
#                                The Script                                    #
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
#                               Game Classes                                   #
#==============================================================================
# * Exisiting Class
# ** Game_Action
#------------------------------------------------------------------------------
#  This class handles battle actions. This class is used within the
#  Game_Battler class.
#==============================================================================
class Game_Action
  #--------------------------------------------------------------------------
  # * New Method
  # ** Set Throw action
  #--------------------------------------------------------------------------
  def set_throw_action
    if BattleManager.actor.thrown_item != 0
      set_skill(subject.throw_skill_id)
      self
    else
      next_action
    end
  end

end # End of Game_Action class


#==============================================================================
# * Existing Class
# ** Game_BattlerBase
#------------------------------------------------------------------------------
#  This base class handles battlers. It mainly contains methods for calculating
#  parameters. It is used as a super class of the Game_Battler class.
#==============================================================================
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # * New Method
  # ** Set Throw Skill ID
  #--------------------------------------------------------------------------
  def throw_skill_id
    return TheSarahThrow::THROW_SKILL_ID
  end

end # End of Game_BattlerBase class


#==============================================================================
# * Existing Class
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Calculate Damage (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gamebattler_makedmgval        make_damage_value
  def make_damage_value(user, item)
    if item.id == TheSarahThrow::THROW_SKILL_ID && user.is_a?(Game_Actor) && user.has_throw
      return thesarah_custom_damage_method(user, item)
    end
    thesarah_throwscript_gamebattler_makedmgval(user, item)
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Calculate Damage when Throw is used
  #--------------------------------------------------------------------------
  def thesarah_custom_damage_method(user, item)
    value = item.damage.eval(user, self, $game_variables)

    case user.thrown_item_notetag
    when /<throwdmg\s*(\d+)>/i
        value *= $1.to_i
    end

    if user.thrown_item_category == "Nothing to throw"
      value *= 0
      Audio.se_play("Audio/SE/Miss", 80, 100)
    end

    value *= 0.5 if user.thrown_item_notetag[/throwhalf/i]
    value *= -1  if user.thrown_item_notetag[/throwheal/i]
    user.reset_thrown_item()
    value *= item_element_rate(user, item)
    value *= pdr if item.physical?
    value *= mdr if item.magical?
    value *= rec if item.damage.recover?
    value = apply_critical(value) if @result.critical
    value = apply_variance(value, item.damage.variance)
    value = apply_guard(value)
    @result.make_damage(value.to_i, item)
  end

end # End of Game_Battler class


#==============================================================================
# * Existing Class
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :has_throw              # Checks if Actor has Throw command
  attr_accessor :thrown_item            # Checks Thrown Item ID
  attr_accessor :thrown_item_notetag    # Checks Thrown Item Notetag
  attr_accessor :thrown_item_category   # Checks Thrown Item Type/Category
  #--------------------------------------------------------------------------
  # * New Method
  # ** Reset Thrown Item
  #--------------------------------------------------------------------------
  def reset_thrown_item
    @thrown_item = 0
    @thrown_item_notetag = ""
    @thrown_item_category = ""
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Setup (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gameactor_setup          setup
  def setup(actor_id)
    thesarah_throwscript_gameactor_setup(actor_id)  # Calls original Method
    @has_throw = true if actor.note[/<Throw>/i];    # p(actor.note)
  end
  #--------------------------------------------------------------------------
  # * Existing Method (from Game_Battler)
  # ** Use Skill/Item (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gameactor_useitem              use_item
  def use_item(item)
    case @thrown_item_category
    when "Armour"
      if $game_party.has_item?($data_armors[@thrown_item])
          $game_party.lose_item($data_armors[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    when "Weapon"
      if $game_party.has_item?($data_weapons[@thrown_item])
          $game_party.lose_item($data_weapons[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    when  "Item"
      if $game_party.has_item?($data_items[@thrown_item])
          $game_party.lose_item($data_items[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    end
 
    thesarah_throwscript_gameactor_useitem(item)    # calls original method
  end

end # End of Game_Actor class


#------------------------------------------------------------------------------#
#                              Window Classes                                  #
#==============================================================================
# * Existing Class
# ** Window_ActorCommand
#------------------------------------------------------------------------------
#  This window is for selecting an actor's action on the battle screen.
#==============================================================================
class Window_ActorCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Existing Method   
  # ** Create Command List (aliased)   
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_winactorcmd_makecmdlist      make_command_list
  def make_command_list
    return unless @actor
    if BattleManager.actor.has_throw == true
      return thesarah_throwadded_make_command_list
    end
    thesarah_throwscript_winactorcmd_makecmdlist
  end
  #--------------------------------------------------------------------------
  # * New Method                        | To change skill order, edit where the
  # ** Create Command List with [Throw] | "add_throw_command" goes below.
  #--------------------------------------------------------------------------
  def thesarah_throwadded_make_command_list
    return unless @actor
    add_attack_command
    add_skill_commands
    add_throw_command
    add_guard_command
    add_item_command
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Add defined Throw Command to List
  #--------------------------------------------------------------------------
  def add_throw_command
  add_command("Throw", :throw)
  end

end # End of Window_ActorCommand class


#==============================================================================
# * New Class
# ** Window_BattleEnemy_Throw         (alternate version of Window_BattleEnemy)
#------------------------------------------------------------------------------
#  Window for selecting the enemy who is the action target on the battle
#  screen (after selecting item to throw).
#==============================================================================
class Window_BattleEnemy_Throw < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(info_viewport)
    super(0, info_viewport.rect.y, window_width, fitting_height(4))
    refresh
    self.visible = false
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    Graphics.width - 128
  end
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 2
  end
  #--------------------------------------------------------------------------
  # * Get Number of Items
  #--------------------------------------------------------------------------
  def item_max
    $game_troop.alive_members.size
  end
  #--------------------------------------------------------------------------
  # * Get Enemy Object
  #--------------------------------------------------------------------------
  def enemy
    $game_troop.alive_members[@index]
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    change_color(normal_color)
    name = $game_troop.alive_members[index].name
    draw_text(item_rect_for_text(index), name)
  end
  #--------------------------------------------------------------------------
  # * Show Window
  #--------------------------------------------------------------------------
  def show
    if @info_viewport
      width_remain = Graphics.width - width
      self.x = width_remain
      @info_viewport.rect.width = width_remain
      select(0)
    end
    super
  end
  #--------------------------------------------------------------------------
  # * Hide Window
  #--------------------------------------------------------------------------
  def hide
    @info_viewport.rect.width = Graphics.width if @info_viewport
    super
  end

end # End of Window_BattleEnemy_Throw class


#==============================================================================
# * New Class
# ** Window_ThrowItem                 (alternate version of Window_BattleItem)
#------------------------------------------------------------------------------
#  This class is for selecting items to use in the "Throw Item" Window.
#==============================================================================
class Window_ThrowItem < Window_ItemList
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(help_window, info_viewport)
    y = help_window.height
    super(0, y, Graphics.width, info_viewport.rect.y - y)
    self.visible = false
    @help_window = help_window
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Include in Item List?
  # Note to Refractors - You wouldn't believe what this used to look like.
  #--------------------------------------------------------------------------
  def include?(item)
    return true if item.is_a?(RPG::Item) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Item) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Item) && item.note[/throwdmg/i]

    return true if item.is_a?(RPG::Weapon) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Weapon) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Weapon) && item.note[/throwdmg/i]

    return true if item.is_a?(RPG::Armor) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Armor) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Armor) && item.note[/throwdmg/i]
  end
  #--------------------------------------------------------------------------
  # * Display in Enabled State?
  #--------------------------------------------------------------------------
  def enable?(item)
    true
  end
  #--------------------------------------------------------------------------
  # * Show Window
  #--------------------------------------------------------------------------
  def show
    select_last
    @help_window.show
    super
  end
  #--------------------------------------------------------------------------
  # * Hide Window
  #--------------------------------------------------------------------------
  def hide
    @help_window.hide
    super
  end

end # End of Window_ThrowItem class


#------------------------------------------------------------------------------#
#                               Scene Classes                                  #
#==============================================================================
# * Existing Class
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#  Basically it manages what happens in a battle.
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Create All Windows (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_createallwinds     create_all_windows
  def create_all_windows
    thesarah_throwscript_scenebattle_createallwinds
    create_throwitem_window       
    create_enemy_throw_window     
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Create Actor Commands Window (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_createactorcmdwin  create_actor_command_window
  def create_actor_command_window
    thesarah_throwscript_scenebattle_createactorcmdwin
    @actor_command_window.set_handler(:throw,  method(:command_throwitem))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** [Throw Item] Command
  #--------------------------------------------------------------------------
  def command_throwitem
    @throwitem_window.refresh
    @throwitem_window.show.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Create Throw Item Window
  #--------------------------------------------------------------------------
  def create_throwitem_window
    @throwitem_window = Window_ThrowItem.new(@help_window, @info_viewport)
    @throwitem_window.set_handler(:ok,     method(:on_throwitem_ok))
    @throwitem_window.set_handler(:cancel, method(:on_throwitem_cancel))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Throw Item [OK]
  #--------------------------------------------------------------------------
  def on_throwitem_ok
    @throwitem = @throwitem_window.item
    if @throwitem == nil
      @throwitem_window.hide
      Audio.se_play("Audio/SE/Buzzer1", 80, 100)
      @actor_command_window.activate
    else
        BattleManager.actor.input.set_item(@throwitem.id)
        BattleManager.actor.thrown_item          = @throwitem.id
        BattleManager.actor.thrown_item_notetag  = @throwitem.note
        if @throwitem.is_a?(RPG::Armor)
             BattleManager.actor.thrown_item_category = "Armour"
     elsif @throwitem.is_a?(RPG::Weapon)
             BattleManager.actor.thrown_item_category = "Weapon"
     elsif @throwitem.is_a?(RPG::Item)
             BattleManager.actor.thrown_item_category = "Item"
        end
        @throwitem_window.hide
        select_throw_enemy_selection
    end
    $game_party.last_item.object = @throwitem
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Throw Item [Cancel]
  #--------------------------------------------------------------------------
  def on_throwitem_cancel
    @throwitem_window.hide
    @actor_command_window.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Create Enemy Throw Window
  #--------------------------------------------------------------------------
  def create_enemy_throw_window
    @enemy_window_throw = Window_BattleEnemy_Throw.new(@info_viewport)
    @enemy_window_throw.set_handler(:ok,     method(:on_enemy_throw_ok))
    @enemy_window_throw.set_handler(:cancel, method(:on_enemy_throw_cancel))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Start Throw Enemy Selection
  #--------------------------------------------------------------------------
  def select_throw_enemy_selection
    @enemy_window_throw.refresh
    @enemy_window_throw.show.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Enemy [OK] (after picking an item to throw)
  #--------------------------------------------------------------------------
  def on_enemy_throw_ok
    BattleManager.actor.input.target_index = @enemy_window_throw.enemy.index
    @skill_window.hide
    @item_window.hide
    @enemy_window_throw.hide
    @throwitem_window.hide
    BattleManager.actor.input.set_throw_action
    next_command
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Enemy [Cancel] (after picking an item to throw)
  #--------------------------------------------------------------------------
  def on_enemy_throw_cancel
    @enemy_window_throw.hide
    BattleManager.actor.reset_thrown_item
    case @actor_command_window.current_symbol
    when :throw
      @throwitem_window.show.activate
    end
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Actor [OK] (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_onactorok        on_actor_ok
  def on_actor_ok
    thesarah_throwscript_scenebattle_onactorok
    @throwitem_window.hide
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Actor [Cancel] (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_onactorcancel    on_actor_cancel
  def on_actor_cancel
    thesarah_throwscript_scenebattle_onactorcancel
      case @actor_command_window.current_symbol
      when :throwitem               
        @throwitem_window.show.activate
      end
  end

end # End of Scene_Battle class




#------------------------------------------------------------------------------#
                              # End of Script #
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#


#=end
Have you found or tried Throw script by The Sarah?
Spoiler: FFIX Style Throw
Ruby:
#------------------------------------------------------------------------------#
=begin

                          "FFIX Style" Throw Script

                                by The_Sarah
                                  (v1.2.1)
                 
--                                                                            --

                             ~~~ REQUIREMENTS ~~~
                     
                                    None
                           
--                                                                            --

                              ~~~ HOW TO USE ~~~

Step 1) Create a "Throw" skill in your Database like you normally would.


Step 2) In the Editable Region below, change the number 219 to the number
         of your Throw skill's id in the Database.
 
 
Step 3) For any character you want to be able to use the Throw skill, simply
         add a notetag saying "<Throw>" (without the speechmarks).
          - Add this <Throw> notetag in the relevant character's Note Box (in
            the Game Actors section of the Database).
 
 
Step 4) For any items, weapons or armour in your inventory that you would
         like to be throwable:
 
         i) You must write a Notetag in their Note Box sections in the Database.

        ii) A FULL LIST of the notetags you can write, as well as information
            on what they each do, can be found below.
   
       iii) This list is found under the "~ NOTETAGS KEY ~" section of this
            script intro (just below FEATURES).
 
   
Step 5) Enjoy the script!
         Maybe leave a like on my RPG Maker Forum Thread page? :P

 
--                                                                            --


                              ~~~ FEATURES ~~~
                       
   With this script, you can make any number of characters (who are Game Actors)
   in your game able to use the "Throw" skill.

   The Throw skill is a skill that (by default) is found underneath any chosen
   character's SKILL command and above that character's GUARD command when in
   battle.

   This skill will open a unique Throwable Item Window.
    - This window will then show the player a list of any Items, Weapons or
      Armour that they have in their inventory that you (the game maker) have
      decided are throwable in your game.

   The player can then pick from this list and throw the object at an enemy.

   The object thrown will decrease in the party's inventory by 1.

   Any damage a thrown object does is calculated on whatever you wrote in
   your "Throw" skill's damage formula (in the Database), as well as whatever
   Notetag you have assigned to the Item/Weapon/Armour thrown.


--                                                                            --


                            ~~~ NOTETAGS KEY ~~~

   The following section is a list of every Notetag you can put into the Note
   Box of an Item, Weapon or Armour in the game's Database to make them
   throwable.

   The list also includes information on what each Notetag does to the damage
   of your Throw skill.


   Please note, each variant on the Notetag applies a different effect to
   YOUR existing Throw skill's Damage Formula.

   So make sure to have already created a Throw Skill in the Database as well :)
________________________________________________________________________________

   Notetag             Effect           |    Notetag             Effect

  <throwheal>  = Throws for 1x healing  | <throwhalf>   = Throws for half damage

  <throwdmg0>  = Throws for 0   damage  | <throwdmg>    = Throws for 1x  damage
  <throwdmg1>  = Throws for 1x  damage  | <throwdmg2>   = Throws for 2x  damage
  <throwdmg3>  = Throws for 3x  damage  | <throwdmg4>   = Throws for 4x  damage
  <throwdmg5>  = Throws for 5x  damage  | <throwdmg6>   = Throws for 6x  damage
  <throwdmg7>  = Throws for 7x  damage  | <throwdmg8>   = Throws for 8x  damage
  <throwdmg9>  = Throws for 9x  damage  | <throwdmg10>  = Throws for 10x damage
  <throwdmg11> = Throws for 11x damage  | <throwdmg12>  = Throws for 12x damage
  <throwdmg13> = Throws for 13x damage  | <throwdmg14>  = Throws for 14x damage
  <throwdmg15> = Throws for 15x damage  | <throwdmg16>  = Throws for 16x damage
  <throwdmg17> = Throws for 17x damage  | <throwdmg18>  = Throws for 18x damage
  <throwdmg19> = Throws for 19x damage  | <throwdmg20>  = Throws for 20x damage
  <throwdmg21> = Throws for 21x damage  | <throwdmg22>  = Throws for 22x damage
  <throwdmg23> = Throws for 23x damage  | <throwdmg24>  = Throws for 24x damage
  <throwdmg25> = Throws for 25x damage  | <throwdmg50>  = Throws for 50x damage
  <throwdmg75> = Throws for 75x damage  | <throwdmg100> = Throws for 100x damage
  <throwdmg250> = Throws for 250x damage| <throwdmg500> = Throws for 500x damage
  <throwdmg750> = Throws for 750x damage|

  <throwdmg1000> = Throws for 1000x damage
  <throwdmg2500> = Throws for 2500x damage
  <throwdmg5000> = Throws for 5000x damage
  <throwdmg7500> = Throws for 7500x damage
  <throwdmg10000> = Throws for 10000x damage

________________________________________________________________________________


--                                                                            --


                            ~~~ TERMS OF USE ~~~
                   
    If you share a game with this script in it (freely OR commercially), you
                         MUST credit me in the game.

               Ideally like this: "Throw Script by The_Sarah"

    Or like this if you edited the script: "Original Throw Script by The_Sarah"


    Other than that, this script is free to download and use or edit in any
                    game or project (free or commercial).

                   
--                                                                            --


                              ~~~ REQUESTS ~~~

   If you would like me to add more damage variants via additional notetags,
   please request so in the RPG Maker Forum Thread I made to originally host
   this Script.

   I will reply to all requests when I have the time (which shouldn't be too
   long to be honest) and do my best to accomodate them.


--                                                                            --


                                ~~~ BUGS ~~~

                           No current known issues.

       
--                                                                            --


                           ~~~ SPECIAL THANKS ~~~

     * The_Sarah (aka me) for being awesome and making this script :O

     * TheoAllen (RPG Maker Forum user) for initially helping me with
       figuring out the make_damage_value method.

     * Kyonides  (RPG Maker Forum user) for helping with Module Instance
       variables and Regex.

     * A-Moonless-Night (RPG Maker Forum user) for Aliasing help as well as
       helping me to finally understand how to grab specific parts within a
       Regex string.

     * LockeZ Ninja Throw (Script) for helping me figure out how to decrease
       items when thrown.


--                                                                            --

                                ~~~ OUTRO ~~~

   And that's it!

   This is my second ever public script (and definitely the biggest public one
   I've made so far) and as a result it has many areas I'm sure can be cleaned
   up (looking at you "include?").

   But the community on the RPG Maker Forum has been mostly friendly so far, so
   I'm happy to allow anyone who wants to look at it and give me tips to do so
   (if they feel so kind).

   Have wonderful lives everyone.
   Be kind to eachother.
   Don't be ____ist or ___phobic towards others, remember we're all human!

                    Let's make wonderful games together!

                                                            - The_Sarah

=end
#------------------------------------------------------------------------------#
#=begin


module TheSarahThrow
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~#

#                 ~~~~----# - EDITABLE REGION - #----~~~~                      #
#                               IMPORTANT                                      #

# Change the number in this section to the number of your Throw skill in the
# Database (default 185):

                THROW_SKILL_ID      =      185         # Your Throw skill ID


#                    ~~# - END OF EDITABLE REGION - #~~                        #
             
#=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~#
end # End of TheSarahThrow module




#------------------------------------------------------------------------------#
#                                The Script                                    #
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
#                               Game Classes                                   #
#==============================================================================
# * Exisiting Class
# ** Game_Action
#------------------------------------------------------------------------------
#  This class handles battle actions. This class is used within the
#  Game_Battler class.
#==============================================================================
class Game_Action
  #--------------------------------------------------------------------------
  # * New Method
  # ** Set Throw action
  #--------------------------------------------------------------------------
  def set_throw_action
    if BattleManager.actor.thrown_item != 0
      set_skill(subject.throw_skill_id)
      self
    else
      next_action
    end
  end

end # End of Game_Action class


#==============================================================================
# * Existing Class
# ** Game_BattlerBase
#------------------------------------------------------------------------------
#  This base class handles battlers. It mainly contains methods for calculating
#  parameters. It is used as a super class of the Game_Battler class.
#==============================================================================
class Game_BattlerBase
  #--------------------------------------------------------------------------
  # * New Method
  # ** Set Throw Skill ID
  #--------------------------------------------------------------------------
  def throw_skill_id
    return TheSarahThrow::THROW_SKILL_ID
  end

end # End of Game_BattlerBase class


#==============================================================================
# * Existing Class
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Calculate Damage (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gamebattler_makedmgval        make_damage_value
  def make_damage_value(user, item)
    if item.id == TheSarahThrow::THROW_SKILL_ID && user.is_a?(Game_Actor) && user.has_throw
      return thesarah_custom_damage_method(user, item)
    end
    thesarah_throwscript_gamebattler_makedmgval(user, item)
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Calculate Damage when Throw is used
  #--------------------------------------------------------------------------
  def thesarah_custom_damage_method(user, item)
    value = item.damage.eval(user, self, $game_variables)

    case user.thrown_item_notetag
    when /<throwdmg\s*(\d+)>/i
        value *= $1.to_i
    end

    if user.thrown_item_category == "Nothing to throw"
      value *= 0
      Audio.se_play("Audio/SE/Miss", 80, 100)
    end

    value *= 0.5 if user.thrown_item_notetag[/throwhalf/i]
    value *= -1  if user.thrown_item_notetag[/throwheal/i]
    user.reset_thrown_item()
    value *= item_element_rate(user, item)
    value *= pdr if item.physical?
    value *= mdr if item.magical?
    value *= rec if item.damage.recover?
    value = apply_critical(value) if @result.critical
    value = apply_variance(value, item.damage.variance)
    value = apply_guard(value)
    @result.make_damage(value.to_i, item)
  end

end # End of Game_Battler class


#==============================================================================
# * Existing Class
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :has_throw              # Checks if Actor has Throw command
  attr_accessor :thrown_item            # Checks Thrown Item ID
  attr_accessor :thrown_item_notetag    # Checks Thrown Item Notetag
  attr_accessor :thrown_item_category   # Checks Thrown Item Type/Category
  #--------------------------------------------------------------------------
  # * New Method
  # ** Reset Thrown Item
  #--------------------------------------------------------------------------
  def reset_thrown_item
    @thrown_item = 0
    @thrown_item_notetag = ""
    @thrown_item_category = ""
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Setup (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gameactor_setup          setup
  def setup(actor_id)
    thesarah_throwscript_gameactor_setup(actor_id)  # Calls original Method
    @has_throw = true if actor.note[/<Throw>/i];    # p(actor.note)
  end
  #--------------------------------------------------------------------------
  # * Existing Method (from Game_Battler)
  # ** Use Skill/Item (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_gameactor_useitem              use_item
  def use_item(item)
    case @thrown_item_category
    when "Armour"
      if $game_party.has_item?($data_armors[@thrown_item])
          $game_party.lose_item($data_armors[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    when "Weapon"
      if $game_party.has_item?($data_weapons[@thrown_item])
          $game_party.lose_item($data_weapons[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    when  "Item"
      if $game_party.has_item?($data_items[@thrown_item])
          $game_party.lose_item($data_items[@thrown_item], 1)
      else
          @thrown_item_category = "Nothing to throw"
      end
    end
 
    thesarah_throwscript_gameactor_useitem(item)    # calls original method
  end

end # End of Game_Actor class


#------------------------------------------------------------------------------#
#                              Window Classes                                  #
#==============================================================================
# * Existing Class
# ** Window_ActorCommand
#------------------------------------------------------------------------------
#  This window is for selecting an actor's action on the battle screen.
#==============================================================================
class Window_ActorCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Existing Method  
  # ** Create Command List (aliased)  
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_winactorcmd_makecmdlist      make_command_list
  def make_command_list
    return unless @actor
    if BattleManager.actor.has_throw == true
      return thesarah_throwadded_make_command_list
    end
    thesarah_throwscript_winactorcmd_makecmdlist
  end
  #--------------------------------------------------------------------------
  # * New Method                        | To change skill order, edit where the
  # ** Create Command List with [Throw] | "add_throw_command" goes below.
  #--------------------------------------------------------------------------
  def thesarah_throwadded_make_command_list
    return unless @actor
    add_attack_command
    add_skill_commands
    add_throw_command
    add_guard_command
    add_item_command
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Add defined Throw Command to List
  #--------------------------------------------------------------------------
  def add_throw_command
  add_command("Throw", :throw)
  end

end # End of Window_ActorCommand class


#==============================================================================
# * New Class
# ** Window_BattleEnemy_Throw         (alternate version of Window_BattleEnemy)
#------------------------------------------------------------------------------
#  Window for selecting the enemy who is the action target on the battle
#  screen (after selecting item to throw).
#==============================================================================
class Window_BattleEnemy_Throw < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(info_viewport)
    super(0, info_viewport.rect.y, window_width, fitting_height(4))
    refresh
    self.visible = false
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    Graphics.width - 128
  end
  #--------------------------------------------------------------------------
  # * Get Digit Count
  #--------------------------------------------------------------------------
  def col_max
    return 2
  end
  #--------------------------------------------------------------------------
  # * Get Number of Items
  #--------------------------------------------------------------------------
  def item_max
    $game_troop.alive_members.size
  end
  #--------------------------------------------------------------------------
  # * Get Enemy Object
  #--------------------------------------------------------------------------
  def enemy
    $game_troop.alive_members[@index]
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    change_color(normal_color)
    name = $game_troop.alive_members[index].name
    draw_text(item_rect_for_text(index), name)
  end
  #--------------------------------------------------------------------------
  # * Show Window
  #--------------------------------------------------------------------------
  def show
    if @info_viewport
      width_remain = Graphics.width - width
      self.x = width_remain
      @info_viewport.rect.width = width_remain
      select(0)
    end
    super
  end
  #--------------------------------------------------------------------------
  # * Hide Window
  #--------------------------------------------------------------------------
  def hide
    @info_viewport.rect.width = Graphics.width if @info_viewport
    super
  end

end # End of Window_BattleEnemy_Throw class


#==============================================================================
# * New Class
# ** Window_ThrowItem                 (alternate version of Window_BattleItem)
#------------------------------------------------------------------------------
#  This class is for selecting items to use in the "Throw Item" Window.
#==============================================================================
class Window_ThrowItem < Window_ItemList
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(help_window, info_viewport)
    y = help_window.height
    super(0, y, Graphics.width, info_viewport.rect.y - y)
    self.visible = false
    @help_window = help_window
    @info_viewport = info_viewport
  end
  #--------------------------------------------------------------------------
  # * Include in Item List?
  # Note to Refractors - You wouldn't believe what this used to look like.
  #--------------------------------------------------------------------------
  def include?(item)
    return true if item.is_a?(RPG::Item) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Item) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Item) && item.note[/throwdmg/i]

    return true if item.is_a?(RPG::Weapon) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Weapon) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Weapon) && item.note[/throwdmg/i]

    return true if item.is_a?(RPG::Armor) && item.note[/<throwheal>/i]
    return true if item.is_a?(RPG::Armor) && item.note[/<throwhalf>/i]
    return true if item.is_a?(RPG::Armor) && item.note[/throwdmg/i]
  end
  #--------------------------------------------------------------------------
  # * Display in Enabled State?
  #--------------------------------------------------------------------------
  def enable?(item)
    true
  end
  #--------------------------------------------------------------------------
  # * Show Window
  #--------------------------------------------------------------------------
  def show
    select_last
    @help_window.show
    super
  end
  #--------------------------------------------------------------------------
  # * Hide Window
  #--------------------------------------------------------------------------
  def hide
    @help_window.hide
    super
  end

end # End of Window_ThrowItem class


#------------------------------------------------------------------------------#
#                               Scene Classes                                  #
#==============================================================================
# * Existing Class
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#  Basically it manages what happens in a battle.
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Create All Windows (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_createallwinds     create_all_windows
  def create_all_windows
    thesarah_throwscript_scenebattle_createallwinds
    create_throwitem_window      
    create_enemy_throw_window    
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Create Actor Commands Window (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_createactorcmdwin  create_actor_command_window
  def create_actor_command_window
    thesarah_throwscript_scenebattle_createactorcmdwin
    @actor_command_window.set_handler(:throw,  method(:command_throwitem))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** [Throw Item] Command
  #--------------------------------------------------------------------------
  def command_throwitem
    @throwitem_window.refresh
    @throwitem_window.show.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Create Throw Item Window
  #--------------------------------------------------------------------------
  def create_throwitem_window
    @throwitem_window = Window_ThrowItem.new(@help_window, @info_viewport)
    @throwitem_window.set_handler(:ok,     method(:on_throwitem_ok))
    @throwitem_window.set_handler(:cancel, method(:on_throwitem_cancel))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Throw Item [OK]
  #--------------------------------------------------------------------------
  def on_throwitem_ok
    @throwitem = @throwitem_window.item
    if @throwitem == nil
      @throwitem_window.hide
      Audio.se_play("Audio/SE/Buzzer1", 80, 100)
      @actor_command_window.activate
    else
        BattleManager.actor.input.set_item(@throwitem.id)
        BattleManager.actor.thrown_item          = @throwitem.id
        BattleManager.actor.thrown_item_notetag  = @throwitem.note
        if @throwitem.is_a?(RPG::Armor)
             BattleManager.actor.thrown_item_category = "Armour"
     elsif @throwitem.is_a?(RPG::Weapon)
             BattleManager.actor.thrown_item_category = "Weapon"
     elsif @throwitem.is_a?(RPG::Item)
             BattleManager.actor.thrown_item_category = "Item"
        end
        @throwitem_window.hide
        select_throw_enemy_selection
    end
    $game_party.last_item.object = @throwitem
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Throw Item [Cancel]
  #--------------------------------------------------------------------------
  def on_throwitem_cancel
    @throwitem_window.hide
    @actor_command_window.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Create Enemy Throw Window
  #--------------------------------------------------------------------------
  def create_enemy_throw_window
    @enemy_window_throw = Window_BattleEnemy_Throw.new(@info_viewport)
    @enemy_window_throw.set_handler(:ok,     method(:on_enemy_throw_ok))
    @enemy_window_throw.set_handler(:cancel, method(:on_enemy_throw_cancel))
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Start Throw Enemy Selection
  #--------------------------------------------------------------------------
  def select_throw_enemy_selection
    @enemy_window_throw.refresh
    @enemy_window_throw.show.activate
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Enemy [OK] (after picking an item to throw)
  #--------------------------------------------------------------------------
  def on_enemy_throw_ok
    BattleManager.actor.input.target_index = @enemy_window_throw.enemy.index
    @skill_window.hide
    @item_window.hide
    @enemy_window_throw.hide
    @throwitem_window.hide
    BattleManager.actor.input.set_throw_action
    next_command
  end
  #--------------------------------------------------------------------------
  # * New Method
  # ** Enemy [Cancel] (after picking an item to throw)
  #--------------------------------------------------------------------------
  def on_enemy_throw_cancel
    @enemy_window_throw.hide
    BattleManager.actor.reset_thrown_item
    case @actor_command_window.current_symbol
    when :throw
      @throwitem_window.show.activate
    end
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Actor [OK] (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_onactorok        on_actor_ok
  def on_actor_ok
    thesarah_throwscript_scenebattle_onactorok
    @throwitem_window.hide
  end
  #--------------------------------------------------------------------------
  # * Existing Method
  # ** Actor [Cancel] (aliased)
  #--------------------------------------------------------------------------
  alias thesarah_throwscript_scenebattle_onactorcancel    on_actor_cancel
  def on_actor_cancel
    thesarah_throwscript_scenebattle_onactorcancel
      case @actor_command_window.current_symbol
      when :throwitem              
        @throwitem_window.show.activate
      end
  end

end # End of Scene_Battle class




#------------------------------------------------------------------------------#
                              # End of Script #
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#


#=end
This isn't it my friend. I want skills to use up items and weapons not to throw items and they use skills. The script above works perfectly fine, the only issue is I can't make it so that skill requiers to use different items 2 or more.
OK got it.
Try this
put all the items to be consumed in the array
[1, 2, 3, 4]
Spoiler: Lockez - Ninja Throw - Mod - Multiple items
Ruby:
=begin
 Ninja Throw script by LockeZ
 Allows any skill to consume either an item or a weapon
 Utilize for whatever you want, no credit necessary
 
This script does not use notetags, because screw you. Instead, near the top of
the script is a place to put lines indicating which skills require
which items/weapons. There are some example lines which you may delete. 

This script could also be used for any other type of skill 
which consumes an item, such as gun or bow skills that require ammo,
or spells that require reagents. Weapons which are equipped cannot be thrown.
If you use this script to make a skill use up an item,
it can also still cost MP or TP like any other skill. 

It is recommended that you name the skills the same names
as the weapons/items being thrown, since the cost is not shown.
If you want to show the cost, just put it in the skill's name. 

Unlike Final Fantasy, skills appear in your skill list whether you own the item
or not, they're just grayed out if you don't have enough items to throw them.
This allows you to teach the player these skills any way you want,
so for example you might require a character to pay gold at a trainer to learn 
the ability to throw mythril swords. If you want to dynamically add and remove 
skills based on the player's inventory, like Final Fantasy, 
then do that your own damn self with a common event.

Copy and paste the following 
@ninja_throw_skill_items[x] = v
@ninja_throw_skill_weapons[x] = v

where x is the ID of the skill
and v is the ID of the item/weapon

=end

class Game_BattlerBase
  attr_accessor :ninja_throw_skill_items
  attr_accessor :ninja_throw_skill_weapons
  
  alias ninja_throw_initialize initialize
  def initialize
    @ninja_throw_skill_items = {}
    @ninja_throw_skill_weapons = {}
    
    # Add your game's skills that use up items below this line.
    # Examples follow.
    @ninja_throw_skill_items[3] = [3, 4]     # Skill #30 requires item #3
    @ninja_throw_skill_items[31] = [5]     # Skill #31 requires item #5
    @ninja_throw_skill_weapons[4] = [1]     # Skill #32 requires weapon #5
    
    ninja_throw_initialize
  end
  
  alias ninja_throw_skill_cost_payable? skill_cost_payable?
  def skill_cost_payable?(skill)
    if @ninja_throw_skill_items[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      array.each do |i|
        unless $game_party.has_item?($data_items[i])
          return false
        end
      end
    end
    if @ninja_throw_skill_weapons[skill.id] != nil
      array = @ninja_throw_skill_weapons[skill.id]
      array.each do |i|
        unless $game_party.has_item?($data_weapons[i])
          return false
        end
      end
    end
    ninja_throw_skill_cost_payable?(skill)
  end
  
  alias ninja_throw_pay_skill_cost pay_skill_cost
  def pay_skill_cost(skill)
    if @ninja_throw_skill_items[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      array.each do |i|
        $game_party.lose_item($data_items[i], 1)
      end
    end
    if @ninja_throw_skill_weapons[skill.id] != nil
      array = @ninja_throw_skill_weapons[skill.id]
      array.each do |i|
        $game_party.lose_item($data_weapons[i], 1)
      end
    end
    ninja_throw_pay_skill_cost(skill)
  end
end
OK got it.
Try this
put all the items to be consumed in the array
[1, 2, 3, 4]
Spoiler: Lockez - Ninja Throw - Mod - Multiple items
Ruby:
=begin
 Ninja Throw script by LockeZ
 Allows any skill to consume either an item or a weapon
 Utilize for whatever you want, no credit necessary
 
This script does not use notetags, because screw you. Instead, near the top of
the script is a place to put lines indicating which skills require
which items/weapons. There are some example lines which you may delete.

This script could also be used for any other type of skill
which consumes an item, such as gun or bow skills that require ammo,
or spells that require reagents. Weapons which are equipped cannot be thrown.
If you use this script to make a skill use up an item,
it can also still cost MP or TP like any other skill.

It is recommended that you name the skills the same names
as the weapons/items being thrown, since the cost is not shown.
If you want to show the cost, just put it in the skill's name.

Unlike Final Fantasy, skills appear in your skill list whether you own the item
or not, they're just grayed out if you don't have enough items to throw them.
This allows you to teach the player these skills any way you want,
so for example you might require a character to pay gold at a trainer to learn
the ability to throw mythril swords. If you want to dynamically add and remove
skills based on the player's inventory, like Final Fantasy,
then do that your own damn self with a common event.

Copy and paste the following
@ninja_throw_skill_items[x] = v
@ninja_throw_skill_weapons[x] = v

where x is the ID of the skill
and v is the ID of the item/weapon

=end

class Game_BattlerBase
  attr_accessor :ninja_throw_skill_items
  attr_accessor :ninja_throw_skill_weapons
 
  alias ninja_throw_initialize initialize
  def initialize
    @ninja_throw_skill_items = {}
    @ninja_throw_skill_weapons = {}
  
    # Add your game's skills that use up items below this line.
    # Examples follow.
    @ninja_throw_skill_items[30] = [3, 4]     # Skill #30 requires item #3
    @ninja_throw_skill_items[31] = [5]     # Skill #31 requires item #5
    @ninja_throw_skill_weapons[32] = [5]     # Skill #32 requires weapon #5
  
    ninja_throw_initialize
  end
 
  alias ninja_throw_skill_cost_payable? skill_cost_payable?
  def skill_cost_payable?(skill)
    if @ninja_throw_skill_items[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      for i in 0..array.size - 1
        unless $game_party.has_item?($data_items[i])
          return false
        end
      end
    end
  
    if @ninja_throw_skill_weapons[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      for i in 0..array.size - 1
        unless $game_party.has_item?($data_items[i])
          return false
        end
      end
    end
  
    ninja_throw_skill_cost_payable?(skill)
  end
 
  alias ninja_throw_pay_skill_cost pay_skill_cost
  def pay_skill_cost(skill)
    if @ninja_throw_skill_items[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      for i in 0..array.size - 1
        $game_party.lose_item($data_items[i], 1)
      end
    end
  
    if @ninja_throw_skill_weapons[skill.id] != nil
      array = @ninja_throw_skill_items[skill.id]
      for i in 0..array.size - 1
        $game_party.lose_item($data_weapons[i], 1)
      end
    end
  
    ninja_throw_pay_skill_cost(skill)
  end
end
Tried, but I got crash. The same that I did before you but I made { } instead of [ ] to work with the aray.
@Trihan sorry my friend I didn't see your message. I tried doing it as mentioned in sentence above to put in array, but it's not working
Spoiler
1.png

The line is:
Spoiler
def skill_cost_payable?(skill)

if @ninja_throw_skill_items[skill.id] != nil

unless $game_party.has_item?($data_items[@ninja_throw_skill_items[skill.id]])

return false
Apologies, I made a few mistakes there. All fixed now.
Apologies, I made a few mistakes there. All fixed now.
I tried it out, it works now, but, now the skill dont need any TP or MP to use. I used a spell Called Dagger Fan that need 11TP I had 3TP and I still could use it. True, I couldn't use it when I was missing reagents needed for spell, but, I can cast it anytime I want with no expense
skill dont need any TP or MP to use
Last mistake.
All fixed now.
Last mistake.
All fixed now.
Seems to work now. Thanks. I have to test it more when I'm on break. RN im at work

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-or-advice-with-ninja-throw-script-by-lockez-solved.145970/