void script()
{
     object oItem;
     int nSlot;
     oItem = GetFirstItemInInventory(OBJECT_SELF);
     while (GetIsObjectValid(oItem))
     {
     if (GetLocalInt(oItem, "Prototype") == TRUE)
     {
     if (GetBaseItemType(oItem) == BASE_ITEM_ARMOR) nSlot = INVENTORY_SLOT_CHEST;
     else if (GetBaseItemType(oItem) == BASE_ITEM_CLOAK) nSlot = INVENTORY_SLOT_CLOAK;
     else if (GetBaseItemType(oItem) == BASE_ITEM_SMALLSHIELD) nSlot = INVENTORY_SLOT_LEFTHAND;
     else if (GetBaseItemType(oItem) == BASE_ITEM_LARGESHIELD) nSlot = INVENTORY_SLOT_LEFTHAND;
     else if (GetBaseItemType(oItem) == BASE_ITEM_TOWERSHIELD) nSlot = INVENTORY_SLOT_LEFTHAND;
     else if (GetBaseItemType(oItem) == BASE_ITEM_HELMET) nSlot = INVENTORY_SLOT_HEAD;
     else nSlot = INVENTORY_SLOT_RIGHTHAND;
     ActionEquipItem(oItem, nSlot); return;
     }
     oItem = GetNextItemInInventory(OBJECT_SELF);
     }
}

void main()
{
     DelayCommand(0.1, script());
}