If I know how to add stats to a generic item and rename it, I could make randomish loot on certain creatures. Maybe conceptually the below code will better help show what I'm trying to accomplish.
object oItem = CreateItemOnObject("longsword", OBJECT_SELF);
effect Effect1;
Effect1 = EffectAttackIncrease(2);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, Effect1, oItem);
SetName (oItem, "Some Longsword");