Let me give you a few things to think about. You might not understand what I am saying, but take the time to try to figure it out.
When you get it, you will have a much better understanding of what you want to do. I don't want to give it to you w/o your taking a moment to think, and learn. It's the best way.
- Are the rat tails "stackable". like potions or arrows?
- Or are they unique, have different tags or resrefs for each tail?
This will affect how you go about finding them in the PC's inventory.
If the rat tail is stackable , you can find if they have the item in their inventory by using the GetItemPossessedBy method. Then use the GetItemStackSize method to see if they have the requisite quantity.
If they are unique items with different tags, you can use the same method, but will have to run the check multiple times, one for each tag/item.
The most likely situation is they are the same item (same tag and resref), and are not stsckable, In this case you mus set up a loop using the "while" loop to search the pc's inventory, setting up a counting variable to track each instance found, set each one as a local object on the pc so that if they have the requisite quantity, you can remove them from the players inventory when you dole out the reward.
Sounds like a daunting task? if you are new to nwscripting, it should be. Never fear, this is about as complicated as most scripting gets. Get a feel; for this and you will be ok. It's actually not that hard. Use the lexicon. Give it a try and whatever happens I will get you a working script in a couple of days that will get you close, if someone else doesn't do it first.
Keep trying and post your questions in the mean time.