Ok, I know you are all anxiously awaiting a script that works for putting YOUR choice of item drops on a specific NPC/Monster. Much trial, error and cursing went into this very simple looking script mainly because of the caveat's mentioned below. READ THE CAVEATS or you will suffer endless frustration like I did, you've been warned.

//**********************
//Function to put items on NPC/Monsters at spawn time.
//Written by Morglin Argulan
//June 24-26, 2002.
//**********************

//Function Code
void NPCTreasure()
{
//30% chance for gold
if (Random(100) > 70) CreateItemOnObject("it_gold002", OBJECT_SELF, (Random(3) + 1));
//Always drop a pelt.
CreateItemOnObject("it_ratpelt001", OBJECT_SELF, 1);
}

//**********************

Now then how/where do you use this you might ask?

It's pretty easy, you copy the default onSpawn script for the NPC/Monster you are adding treasure to and SaveAs with a name like "spawn_<monstername>".

Next, right above the void main()line in the script paste the NPCTreasure function from above, make sure you change the item name(s) and the random numbers to match what you want and how often. You can have as many different items as possible drops as you like, just add more lines as needed.

Now, you comment out the line in the main() function of the onSpawn script that has the call to the GenererateNPCTreasure() function (just put // in front of it).

Lastly, right below the line you just commmented out put this function call:

NPCTreasure();

Save the script! Make sure that the critter you want this script to use has it in it's onSpawn dropdown list under the scripts tab. Save the critter, and update all instances if you want all the critters you put in to have the same stuff drop. Save the module and play it.

Now for the really IMPORTANT stuff!

***First caveat*** the name in the item string MUST be the item blueprint name NOT the tag or the item probably won't drop, what found best to do is make the prototype item with the same tag name as the blueprint, that seems to be best.

***Second caveat*** I couldn't get JUST gold to drop! The only way gold seems to drop is if there's at least one other item dropping as well. If anyone can figure out why this is let me know. I can get other single items to drop (like just a pelt) but can't get just gold, has to be gold AND something else, Bizaare eh? :=?

I hope this helps everyone that is working on getting specific items to drop off specific critters.

Happy scripting!

_________________
***********************
What about elvensies?
He's heard of elvensies
hasn't he?
***********************