Script (?) to check for item existence? Run X before Skill fires?

Okay, I'm very new to RPG Maker. I'm more used to Doom95 modding, but while my main computer is down, I thought I'd try my hand at this. I apologize up front if this isn't the right place to post this.

I'm using RPG Maker XP. I'm trying to set something up where the use of a Skill, consumes an Item, BUT, without the Item, the Skill cannot be used.

I've looked at several ways of going about this. Blizzard's Script Collection, for example, but I don't want to add that much unneeded code to my project. Then, I happened upon someone's post somewhere about attaching a Common Event to a Skill.
I know this was written for a different version of RPG Maker, but the basics of it worked just fine. This presented a few problems:

1) Using it as suggested, with a "fake skill" being fired first that then triggers the "real skill," I end up with a character that makes a "fake attack" that does 0 damage, and that's very annoying. I don't know how to bypass this or have it skip the "fake attack" sequence.

2) Editing the Common Event to handle everything in the base Skill results in the Common Event firing AFTER the Skill is used. Meaning, the Skill gets used whether or not the Character(s) have the Item in question.



See, in ZScript, I could go about this by using IF/OR type statements. Here... I'm not sure what the hecc I'm doing. So, in short, I need:

1) A Script that forces a check for the specific Item ID and if there's any remaining, and if not, cancels the attempted use of the Skill
2) A way to make the Item Check Common Event fire BEFORE the Skill is actually executed.
3) A way to make the "Fake Attack" not actually do anything BUT fire the Common Event (i.e. not perform a fake attack on the target and pop a big 0 over it and make it flash).

Or, more simply, if someone developed a "Firearms and Ammo" type thing where the Firearms are actually Skills and not Weapons, that would work, too.

I greatly appreciate any help I can get.
Here's the script from Tons of Add-ons as a stand-alone:
Ruby:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Item Requirement for Skills by Blizzard
# Version: 1.0
# Type: Game Alteration
# Date: 7.12.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# 
#   This add-on can make skills require items to be used. Those skills cannot
#   be used if the appropriate number of items is not in the inventory. Items
#   will be consumed ONLY IF THEY ARE CONSUMABLE! Enemies do not consume items
#   when they use the same skills.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module BlizzCFG
  
  def self.item_reqs(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Item Requirement Database
#   
#   Use following template to configure your database below:
#     
#     when SKILL_ID then return [ITEM_ID, QUANTITY]
#   
#   SKILL_ID - ID of the skill
#   ITEM_ID  - ID of the required item
#   QUANTITY - how many items the skill requires
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 1 then return [1, 1]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Item Requirement Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return [0, 0]
  end
  
end
#==============================================================================
# Game_Battler
#==============================================================================
class Game_Battler
  
  alias skill_effect_item_reqs_later skill_effect
  def skill_effect(user, skill)
    result = skill_effect_item_reqs_later(user, skill)
    data = BlizzCFG.item_reqs(skill.id)
    if user.is_a?(Game_Actor) && data.all? {|i| i > 0}
      $game_party.lose_item(data[0], data[1])
    end
    return result
  end
  
  alias skill_can_use_item_reqs_later? skill_can_use?
  def skill_can_use?(skill_id)
    data = BlizzCFG.item_reqs(skill_id)
    if self.is_a?(Game_Actor) && $game_party.item_number(data[0]) < data[1]
      return false
    end
    return skill_can_use_item_reqs_later?(skill_id)
  end
  
end
Holy Beans! Thank you SO much! I'll test this as soon as I can! It works perfectly. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/script-to-check-for-item-existence-run-x-before-skill-fires.160919/