//Give the bounty a random armor n = Random(nMaxArmr)+ 1; switch (n) { case 1: sArmor = "nw_aarcl011"; break; //light armors case 2: sArmor = "nw_maarcl046"; break; case 3: sArmor = "x0_maarcl010"; break; case 4: sArmor = "nw_maarcl083"; break; case 5: sArmor = "x2_maarcl027"; break; case 6: sArmor = "nw_maarcl084"; break; case 7: sArmor = "x2_maarcl025"; break; case 8: sArmor = "nw_maarcl087"; break; case 9: sArmor = "x2_maarcl029"; break; case 10: sArmor = "x2_mduerar008"; break; }//SendMessageToPC(oPC, "Using Case "+IntToString(n)+" For Armor");return sArmor;}
Couldn't you just use the standard palette, unenchanted armors resrefs? Then you could just reapply the enhancement bonus after it is already spawned in the inventory. I don't see why you would need to spawn +6 versions of stuff, wipe them, and then add enhancement. Seems like an extra step for nothing.
Sakes,It could be there are custom items created with the same tag as the original chain shirt (someone forgot to change). Scripts do look for tags instead of resrefs from my experience. Also from your results case 2: sArmor = "nw_maarcl046"; is not working as there are 9 results instead of 10!
I ran into similar issues with Niccolo when I was programming him. Because no players are in the area when he spawns, the default NWN thing to do is to lower his process priority into the dirt. Without enough processing power dedicated to him, he would very reliably do very stupid things.Because Nic is constantly doing things, I handled it with the very naughty method of permanently setting his priority to a higher level. This wouldn't be a good idea for bounties, as enough of them hungrily chomping away will have a meaningful impact on server performance. However, temporarily buffing their priority while they handle their business could solve the problem.Check out Nic for reference material, but you're going to be interested in the SetAILevel function.Alternatively, you could try altering the AI to spawn and equip items when players are present. Having a player in the same area is generally enough for NWN to give AI priority to a creature.