This is the filter that 420 wrote for me a few years ago. I think it covers all or most of the item restrictions that GS had. Just include an ExecuteScript(sScript, oTarget); line in the module OnEnter before any module items are created on the target.
//420 Item Filter
//By: 420 6/25/04
//OnClientEnter should make the PC execute this script.
//This script should be named "420itemfilter"
void main()
{
object oPC = OBJECT_SELF;
object oItem;
int iCounter;
int iACProperty;
itemproperty ipItem;
//Check through all equiped items.
for (iCounter = 0; iCounter <= NUM_INVENTORY_SLOTS; iCounter++)
{
oItem = GetItemInSlot(iCounter, oPC);
//Delete any items with the listed properties, you may add more item properties
//to filter.
if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_HEALERS_KIT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP))
{
DestroyObject(oItem);
DelayCommand(0.001, SendMessageToPC(oPC, "*Item property violation.*"));
}
//Check to see what the value of the item is, if over 500,000 gp value,
//destroy it (this value allows 9 AC/11 AB max per item)
if(GetGoldPieceValue(oItem) >= 500001)
{
DestroyObject(oItem);
DelayCommand(0.001, SendMessageToPC(oPC, "*Item value higher than 500,000 gp.*"));
}
}
//Now do the exact same thing for all the items in the players inventory (whatever
//wasn't equiped
oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem) == TRUE)
{
//Delete any items with the listed properties, you may add more item properties
//to filter.
if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_HEALERS_KIT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) ||
GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP))
{
DestroyObject(oItem);
DelayCommand(0.001, SendMessageToPC(oPC, "*Item property violation.*"));
}
//Check to see what the value of the item is, if over 500,000 gp value,
//destroy it (this value allows 9 AC/11 AB max per item)
if(GetGoldPieceValue(oItem) >= 500001)
{
DestroyObject(oItem);
DelayCommand(0.001, SendMessageToPC(oPC, "*Item value higher than 500,000 gp.*"));
}
oItem = GetNextItemInInventory(oPC);
}
}